/* =========================
GLOBAL FIXES
========================= */
html, body {
    overflow-x: hidden;
}

* {
    max-width: 100%;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

.container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

/* =========================
TABLET
========================= */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 42px;
    }

    .hero {
        padding: 60px 0;
    }

    .info-section,
    .info-section.reverse {
        flex-direction: column;
        gap: 40px;
        text-align: center;
        padding: 70px 0;
    }

    .text-box {
        max-width: 100%;
    }

    .image-box {
        width: 100%;
        max-width: 420px;
        height: auto;
        margin: 0 auto;
    }

    .image-box::before {
        width: 260px;
        height: 260px;
    }

    .image-box img {
        width: 100%;
        max-width: 320px;
        height: auto;
        margin: 0 auto;
    }
}

/* =========================
MOBILE HEADER / NAV
========================= */
@media (max-width: 768px) {
    .header-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .nav a {
        margin: 0;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
        max-width: 220px;
    }

    .book-btn,
    .search {
        width: 100%;
    }

    .breadcrumb {
        font-size: 12px;
        line-height: 1.5;
    }

    .hero {
        padding: 45px 0;
    }

    .hero h1 {
        font-size: 32px;
        line-height: 1.15;
    }

    .hero p {
        font-size: 17px;
    }

    .jump-links {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .main {
        padding: 60px 0;
    }

    .main-content {
        font-size: 16px;
        line-height: 1.7;
    }

    .quote {
        font-size: 22px;
    }
}

/* =========================
MAIN IMAGE/TEXT SECTIONS FIX
========================= */
@media (max-width: 768px) {
    .info-section,
    .info-section.reverse {
        flex-direction: column !important;
        gap: 30px;
        padding: 55px 0;
    }

    .text-box {
        order: 1;
        max-width: 100%;
        text-align: center;
    }

    .image-box {
        order: 2;
        position: relative;
        width: 100%;
        max-width: 300px;
        height: 300px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-box::before {
        width: 210px;
        height: 210px;
    }

    .image-box.orange::before {
        left: 0;
        top: 0;
    }

    .image-box.red::before {
        right: 0;
        bottom: 0;
    }

    .image-box.dark::before {
        left: 0;
        top: 0;
    }

    .image-box img {
        width: 180px;
        height: 240px;
        object-fit: cover;
        position: relative;
        z-index: 2;
    }

    .text-box h2 {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 16px;
    }

    .text-box p {
        font-size: 16px;
    }

    .outline-btn,
    .download-btn {
        width: 100%;
        max-width: 320px;
    }

    .download-box {
        padding: 35px 0;
    }

    .text-section {
        padding: 60px 0;
    }

    .text-section h2 {
        font-size: 30px;
        line-height: 1.2;
    }
}

/* =========================
FOOTER
========================= */
@media (max-width: 768px) {
    .footer {
        padding: 35px 0 40px;
    }

    .footer-top,
    .footer-middle {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-logo h2 {
        font-size: 38px;
    }

    .footer-partners,
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-bottom {
        text-align: center;
    }
}

/* =========================
TRF PAGES FIX
========================= */
@media (max-width: 992px) {
    .trf-layout,
    .dashboard {
        flex-direction: column;
    }

    .trf-sidebar,
    .sidebar {
        width: 100%;
        border-bottom-right-radius: 0;
    }

    .trf-sidebar nav,
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
    }

    .trf-sidebar__item,
    .sidebar li {
        flex: 1 1 50%;
        text-align: center;
        min-width: 160px;
    }

    .trf-main,
    .main-content {
        padding: 20px 16px 30px;
    }

    .trf-tab,
    .page-title {
        position: static;
        transform: none;
        display: inline-block;
        margin-bottom: 18px;
        border-radius: 0 0 14px 14px;
    }

    .content-box,
    .trf-result-card {
        max-width: 100%;
    }

    .form {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .form label {
        width: 100%;
    }

    .form input {
        width: 100%;
        max-width: 320px;
    }
}

/* =========================
TRF RESULT MOBILE
========================= */
@media (max-width: 768px) {
    .trf-header {
        height: auto;
        padding: 14px 16px;
    }

    .trf-header__logo {
        font-size: 42px;
    }

    .trf-layout {
        min-height: auto;
    }

    .trf-result-top {
        flex-direction: column;
        gap: 24px;
    }

    .trf-info-table {
        width: 100%;
    }

    .trf-row {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .trf-label,
    .trf-value {
        padding: 10px 12px;
    }

    .trf-label {
        font-weight: 700;
        padding-bottom: 4px;
    }

    .trf-value {
        padding-top: 0;
    }

    .trf-score-head {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .trf-score-head__center,
    .trf-score-head__right {
        text-align: left;
    }

    .trf-photo-box {
        width: 100%;
        margin-top: 0;
    }

    .trf-photo {
        width: 160px;
        height: 160px;
    }

    .trf-footer,
    .bottom-bar {
        justify-content: center;
        text-align: center;
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* =========================
VERY SMALL PHONES
========================= */
@media (max-width: 480px) {
    .container {
        width: 92%;
    }

    .hero h1 {
        font-size: 26px;
    }

    .text-box h2,
    .text-section h2 {
        font-size: 24px;
    }

    .quote {
        font-size: 19px;
    }

    .image-box {
        max-width: 260px;
        height: 260px;
    }

    .image-box::before {
        width: 180px;
        height: 180px;
    }

    .image-box img {
        width: 140px;
        height: 200px;
    }

    .trf-sidebar__item,
    .sidebar li {
        flex: 1 1 100%;
    }

    .score-grid {
        grid-template-columns: 1fr 1fr;
    }
}