/*=====================================================
STUDY SAHARA
CONSOLIDATED RESPONSIVE CSS
======================================================*/

/* ===================================================
   1. LARGE LAPTOP / DESKTOP (max-width: 1399px)
   =================================================== */
@media (max-width: 1399px) {
    .hero-section {
        min-height: 680px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-description {
        max-width: 540px;
    }

    .challenge-wrapper {
        grid-template-columns: 1fr 90px 1fr;
        gap: 25px;
    }

    .journey-wrapper {
        gap: 18px;
    }

    .success-wrapper {
        gap: 22px;
    }

    .smart-match-wrapper {
        gap: 45px;
    }

    .final-cta-wrapper {
        padding: 55px;
    }

    .premium-cta {
        padding: 80px 0;
    }
}

/* ===================================================
   2. TABLET LANDSCAPE (max-width: 1199px)
   =================================================== */
@media (max-width: 1199px) {
    /* Layout & Navbar */
    .container {
        max-width: 960px;
    }

    .premium-navbar {
        height: 78px;
    }

    .navbar-brand img {
        height: 58px;
    }

    .premium-navbar > .container {
        padding-inline: 18px;
    }

    .navbar-toggler {
        width: 56px;
        height: 56px;
        border-radius: 18px;
        padding: 0;
    }

    .navbar-nav {
        gap: 10px;
    }

    .nav-actions {
        margin-left: 40px;
    }

    .section-padding {
        padding: 65px 0;
    }

    /* Hero */
    .hero-section {
        min-height: 620px;
        padding: 75px 0;
        background: 
            linear-gradient(
                to right,
                rgba(255, 255, 255, 0.98) 0%,
                rgba(255, 255, 255, 0.94) 48%,
                rgba(255, 255, 255, 0.55) 68%,
                rgba(255, 255, 255, 0) 100%
            ),
            url("../images/student-loan.webp") right center / 58% auto no-repeat,
            #ffffff;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .hero-description {
        max-width: 500px;
    }

    .hero-features {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Challenge, Journey, Success */
    .challenge-wrapper {
        grid-template-columns: 1fr 70px 1fr;
        gap: 18px;
    }

    .challenge-column {
        padding: 28px;
    }

    .journey-wrapper {
        grid-template-columns: repeat(3, 1fr);
        row-gap: 50px;
    }

    .journey-progress {
        display: none;
    }

    .success-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }

    .success-card.featured {
        grid-column: span 2;
    }

    /* Services & Other Components */
    .service-card {
        padding: 32px 25px;
    }

    .service-card h4 {
        font-size: 21px;
    }

    .smart-match-wrapper {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .premium-cta {
        padding: 75px 0;
    }

    .cta-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .final-cta-wrapper {
        padding: 50px;
    }

    #eligibilityModal .modal-dialog {
        max-width: 900px;
    }
}

/* ===================================================
   3. TABLET PORTRAIT / MEDIUM DEVICES (max-width: 991px)
   =================================================== */
@media (max-width: 991px) {
    /* Global Settings */
    body {
        font-size: 15px;
    }

    .section-padding {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 45px;
    }

    .section-title {
        font-size: 34px;
    }

    /* Navigation & Top Bar */
    .top-bar,
    .scroll-down {
        display: none;
    }

    .premium-navbar {
        height: 78px;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .navbar-brand img {
        height: 62px;
    }

    .navbar-collapse {
        position: fixed;
        top: 78px;
        left: 0;
        width: 100%;
        height: calc(100vh - 78px);
        background: #ffffff;
        z-index: 9999;
        overflow-y: auto;
        padding: 24px;
    }

    .navbar-nav {
        gap: 4px;
        padding: 20px 0;
    }

    .navbar-nav .nav-link {
        justify-content: flex-start;
        border-radius: 14px;
        padding: 14px 18px;
        height: auto;
    }

    .nav-actions {
        margin: 20px 0 0;
        width: 100%;
    }

    .premium-navbar .btn {
        width: 100%;
    }

    /* Grids */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Hero */
    .hero-section {
        min-height: auto;
        padding: 90px 0 70px;
        background: 
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.96) 0%,
                rgba(255, 255, 255, 0.90) 55%,
                rgba(255, 255, 255, 0.98) 100%
            ),
            url("../images/student-loan.webp") center bottom / 75% auto no-repeat,
            #ffffff;
    }

    .hero-section .row {
        align-items: center;
    }

    .hero-section .col-lg-6:first-child {
        max-width: 100%;
    }

    .hero-title,
    .hero-description,
    .hero-features {
        max-width: 700px;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-buttons {
        margin-bottom: 35px;
    }

    /* Cards & Wrapper Sections */
    .loan-service-card,
    .loan-option-card {
        padding: 28px;
    }

    .challenge-wrapper {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .challenge-divider {
        height: auto;
        padding: 5px 0;
    }

    .challenge-divider span {
        transform: rotate(90deg);
    }

    .knowledge-grid,
    .journey-wrapper,
    .success-wrapper,
    .steps-grid,
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .partner-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .journey-wrapper {
        row-gap: 45px;
    }

    .journey-progress {
        display: none;
    }

    .success-card.featured {
        grid-column: span 2;
    }

    .story-image {
        height: 240px;
    }

    .finder-toolbar {
        padding: 20px;
    }

    .smart-match-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-top {
        padding: 70px 0 50px;
    }

    .footer-title {
        margin-top: 30px;
    }

    .back-to-top {
        right: 30px;
    }

    /* CTA Sections */
    .premium-cta {
        padding: 70px 0;
        text-align: center;
    }

    .cta-buttons {
        justify-content: center;
        margin-top: 30px;
    }

    .cta-image-wrapper {
        margin-top: 60px;
    }

    .final-cta-wrapper {
        padding: 45px 35px;
    }

    .final-cta-wrapper h2 {
        font-size: 36px;
    }

    /* Modal & Summary */
    #eligibilityModal .modal-dialog {
        max-width: calc(100% - 30px);
        margin: 15px auto;
    }

    #eligibilityModal .modal-body {
        padding: 30px;
    }

    .submission-summary {
        padding: 28px;
    }
}

/* ===================================================
   4. MOBILE LANDSCAPE / SMALL TABLET (max-width: 767px)
   =================================================== */
@media (max-width: 767px) {
    /* Global Settings */
    .container {
        width: 100%;
        padding-left: 18px;
        padding-right: 18px;
    }

    section {
        overflow: hidden;
    }

    .section-padding {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 35px;
        padding: 0 5px;
    }

    .section-title {
        font-size: 30px;
        line-height: 1.25;
    }

    .section-description {
        font-size: 14px;
        line-height: 1.75;
    }

    /* Hero */
    .hero-section {
        padding: 70px 0 55px;
        min-height: auto;
        background: 
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.97) 0%,
                rgba(255, 255, 255, 0.93) 55%,
                rgba(255, 255, 255, 0.98) 100%
            ),
            url("../images/student-loan.webp") center bottom / 100% auto no-repeat,
            #ffffff;
    }

    .hero-badge {
        margin-bottom: 18px;
        padding: 7px 13px;
        font-size: 12px;
    }

    .hero-title {
        font-size: 2.25rem;
        line-height: 1.15;
        margin-bottom: 18px;
    }

    .hero-description {
        font-size: 15px;
        line-height: 1.75;
        margin-bottom: 28px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        min-width: 0;
        height: 54px;
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hero-feature {
        font-size: 14px;
    }

    .hero-feature i {
        width: 32px;
        height: 32px;
    }

    /* Card Layouts */
    .loan-service-card,
    .loan-option-card,
    .trust-card {
        padding: 25px;
        border-radius: 20px;
    }

    .loan-icon {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        margin-bottom: 20px;
    }

    .loan-service-card h3 {
        font-size: 20px;
    }

    .option-badge {
        top: 16px;
        right: 16px;
    }

    .challenge-column {
        padding: 22px;
        border-radius: 20px;
    }

    .challenge-header {
        margin-bottom: 20px;
    }

    .challenge-header h3 {
        font-size: 22px;
    }

    .challenge-item {
        padding: 15px 0;
    }

    .challenge-divider span {
        width: 58px;
        height: 58px;
        font-size: 20px;
    }

    /* Grids to 1 Column */
    .knowledge-grid,
    .journey-wrapper,
    .success-wrapper,
    .form-row,
    .steps-grid,
    .wizard-info,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-feature {
        padding: 28px;
        border-radius: 22px;
    }

    .knowledge-card {
        border-radius: 20px;
        padding: 24px;
    }

    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .partner-logo {
        height: 100px;
        border-radius: 18px;
    }

    .partner-logo img {
        max-width: 110px;
    }

    /* Journey */
    .journey-wrapper {
        gap: 35px;
    }

    .journey-step {
        text-align: left;
        display: grid;
        grid-template-columns: 75px 1fr;
        column-gap: 18px;
        align-items: center;
    }

    .journey-icon {
        grid-row: span 2;
        margin: 0;
        width: 68px;
        height: 68px;
    }

    .journey-step h4 {
        margin-bottom: 7px;
    }

    /* Success & Stories */
    .success-card.featured {
        grid-column: auto;
    }

    .student-photo img,
    .success-card.featured .student-photo img {
        height: 240px;
    }

    .student-content,
    .story-content {
        padding: 22px;
    }

    .story-image {
        height: 230px;
    }

    .story-content h4 {
        font-size: 20px;
    }

    /* Reviews */
    .review-card {
        padding: 25px;
        border-radius: 22px;
    }

    .review-top {
        gap: 14px;
    }

    .review-top img {
        width: 62px;
        height: 62px;
    }

    /* Finder Toolbar & Smart Match */
    .finder-toolbar {
        padding: 18px;
        border-radius: 18px;
    }

    .results-counter {
        justify-content: flex-start;
        margin-bottom: 15px;
    }

    .smart-match-wrapper {
        gap: 30px;
    }

    .smart-card h3 {
        font-size: 22px;
    }

    /* FAQ */
    .faq-section {
        padding: 50px 0;
    }

    .accordion-premium {
        gap: 12px;
    }

    .accordion-item {
        border-radius: 18px;
    }

    .accordion-button {
        padding: 18px;
        font-size: 15px;
        gap: 12px;
    }

    .faq-question {
        align-items: flex-start;
    }

    .faq-number {
        width: 34px;
        height: 34px;
        margin-right: 10px;
        font-size: 12px;
    }

    .accordion-icon {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }

    .accordion-body {
        padding: 0 18px 20px 62px;
        font-size: 14px;
    }

    /* CTA & Premium Sections */
    .final-cta-section {
        padding: 35px 0;
    }

    .final-cta-wrapper {
        padding: 35px 25px;
        border-radius: 24px;
    }

    .final-cta-wrapper h2 {
        font-size: 28px;
    }

    .final-cta-wrapper p {
        font-size: 14px;
    }

    .cta-features {
        flex-direction: column;
        gap: 12px;
    }

    .cta-buttons,
    .cta-buttons .btn {
        width: 100%;
    }

    .premium-cta {
        padding: 55px 0;
    }

    .cta-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 35px;
    }

    .stat-card {
        padding: 22px 12px;
        border-radius: 16px;
    }

    .stat-card h3 {
        font-size: 1.8rem;
    }

    .stat-card span {
        font-size: 12px;
    }

    .cta-image-wrapper {
        margin-top: 35px;
    }

    .cta-image-wrapper img {
        max-width: 100%;
        border-radius: 22px;
    }

    /* Services & Logos */
    .service-card {
        padding: 28px 22px;
        border-radius: 22px;
    }

    .service-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
        font-size: 25px;
    }

    .service-card h4 {
        font-size: 20px;
    }

    .service-card p {
        min-height: auto;
    }

    .trusted-section {
        padding: 40px 0;
    }

    .logo-track {
        gap: 15px;
    }

    .logo-item {
        height: 105px;
        border-radius: 18px;
    }

    .logo-item img {
        max-width: 110px;
        max-height: 55px;
    }

    /* Footer Details */
    .footer-about {
        max-width: 100%;
    }

    .footer-newsletter form {
        flex-direction: column;
        gap: 15px;
    }

    .footer-newsletter input {
        border-radius: var(--radius-lg);
    }

    .footer-newsletter button {
        width: 100%;
        height: 54px;
        border-radius: var(--radius-lg);
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    /* Modal & Wizards */
    #eligibilityModal .modal-dialog {
        max-width: calc(100% - 20px);
        margin: 10px auto;
    }

    #eligibilityModal .modal-content {
        border-radius: 20px;
    }

    #eligibilityModal .modal-header {
        padding: 18px 20px;
    }

    #eligibilityModal .modal-body {
        padding: 22px 18px;
    }

    #eligibilityModal .modal-title {
        font-size: 21px;
    }

    .loan-progress {
        margin-bottom: 35px;
    }

    .progress-step {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .loan-progress::before,
    .progress-fill {
        height: 3px;
    }

    .step-header {
        margin-bottom: 28px;
    }

    .step-header h2 {
        font-size: 26px;
    }

    .step-header p {
        font-size: 14px;
    }

    .loan-input {
        height: 54px;
        border-radius: 14px;
        padding: 0 16px;
    }

    textarea.loan-input {
        height: 120px;
        padding: 15px 16px;
    }

    .loan-radio-group {
        flex-direction: column;
    }

    .loan-radio {
        width: 100%;
        min-width: 100%;
    }

    .loan-radio span {
        height: 58px;
        border-radius: 15px;
    }

    .step-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .step-footer .btn {
        width: 100%;
        min-width: 0;
    }

    /* Profile Preview & Success State */
    .profile-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-score {
        width: 100%;
        text-align: left;
    }

    .preview-actions {
        flex-direction: column;
    }

    .preview-actions .btn {
        width: 100%;
        min-width: 0;
    }

    .success-icon {
        width: 95px;
        height: 95px;
        margin-bottom: 25px;
    }

    .success-icon i {
        font-size: 42px;
    }

    .success-wrapper h2 {
        font-size: 25px;
    }

    .success-wrapper p {
        font-size: 15px;
        margin-bottom: 35px;
    }

    .submission-summary {
        padding: 22px;
        margin-bottom: 35px;
        border-radius: 20px;
    }

    .summary-title {
        font-size: 20px;
    }

    .summary-item {
        padding: 18px;
    }

    .next-steps {
        margin-bottom: 40px;
    }

    .next-steps h3 {
        font-size: 24px;
    }

    .step-box {
        padding: 24px;
    }

    .success-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .success-buttons .btn {
        width: 100%;
        min-width: 0;
        height: 55px;
    }

    .security-note {
        padding: 18px;
        font-size: 13px;
    }

    /* Floating Action Buttons */
    #backToTop {
        right: 16px;
        bottom: 18px;
        width: 48px;
        height: 48px;
        font-size: 17px;
    }

    .whatsapp-float {
        left: 16px;
        bottom: 18px;
        width: 52px;
        height: 52px;
        font-size: 27px;
    }
}

/* ===================================================
   5. SMALL MOBILE (max-width: 480px)
   =================================================== */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .section-padding {
        padding: 45px 0;
    }

    .section-title {
        font-size: 26px;
    }

    /* Hero */
    .hero-section {
        padding: 55px 0 45px;
        background: 
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.98) 0%,
                rgba(255, 255, 255, 0.94) 60%,
                rgba(255, 255, 255, 0.98) 100%
            ),
            url("../images/student-loan.webp") center bottom / 120% auto no-repeat,
            #ffffff;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-badge {
        font-size: 11px;
        gap: 7px;
    }

    /* Card Padding Refinements */
    .loan-service-card,
    .loan-option-card,
    .trust-card {
        padding: 22px;
        border-radius: 18px;
    }

    .knowledge-feature {
        padding: 24px;
    }

    .knowledge-card {
        padding: 21px;
    }

    .partner-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .partner-logo {
        height: 85px;
        padding: 10px;
    }

    /* Journey Steps */
    .journey-step {
        grid-template-columns: 62px 1fr;
        gap: 12px;
    }

    .journey-icon {
        width: 58px;
        height: 58px;
    }

    .journey-step h4 {
        font-size: 17px;
    }

    .journey-step p {
        font-size: 13px;
    }

    /* Student Stories & Reviews */
    .student-photo img,
    .success-card.featured .student-photo img {
        height: 210px;
    }

    .student-content,
    .review-card {
        padding: 20px;
    }

    .review-top img {
        width: 56px;
        height: 56px;
    }

    .review-top h5 {
        font-size: 16px;
    }

    .review-top small {
        font-size: 12px;
    }

    /* Accordion */
    .accordion-button {
        padding: 16px;
        font-size: 14px;
    }

    .faq-number {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }

    .accordion-icon {
        width: 32px;
        height: 32px;
    }

    .accordion-body {
        padding: 0 16px 18px 54px;
        font-size: 13px;
    }

    /* CTA Blocks */
    .final-cta-wrapper {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .final-cta-wrapper h2 {
        font-size: 25px;
    }

    .premium-cta {
        padding: 50px 0;
    }

    .cta-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 18px 8px;
    }

    .stat-card h3 {
        font-size: 1.55rem;
    }

    .stat-card span {
        font-size: 11px;
    }

    .service-card {
        padding: 24px 20px;
    }

    .service-icon {
        width: 58px;
        height: 58px;
        font-size: 23px;
    }

    /* Modals & Forms */
    #eligibilityModal .modal-dialog {
        max-width: calc(100% - 10px);
        margin: 5px auto;
    }

    #eligibilityModal .modal-body {
        padding: 18px 14px;
    }

    .progress-step {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    .step-header h2 {
        font-size: 23px;
    }

    .step-badge {
        padding: 8px 14px;
        font-size: 11px;
    }

    .loan-input {
        height: 52px;
        border-radius: 13px;
        font-size: 14px;
    }

    textarea.loan-input {
        height: 110px;
    }

    .loan-radio span {
        height: 54px;
        font-size: 13px;
    }

    /* Status & Profile Results */
    .profile-result {
        padding: 18px;
        border-radius: 20px;
    }

    .profile-status {
        gap: 12px;
    }

    .profile-status-icon {
        width: 52px;
        height: 52px;
        border-radius: 15px;
    }

    .profile-status h3 {
        font-size: 19px;
    }

    .score-circle {
        width: 70px;
        height: 70px;
        font-size: 25px;
    }

    .success-icon {
        width: 82px;
        height: 82px;
    }

    .success-icon i {
        font-size: 36px;
    }

    .success-wrapper h2 {
        font-size: 22px;
    }

    .success-wrapper p {
        font-size: 14px;
    }

    .submission-summary {
        padding: 18px;
    }

    .summary-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .summary-item {
        padding: 16px;
    }

    .summary-item strong {
        font-size: 16px;
    }

    .success-buttons .btn {
        height: 52px;
        font-size: 14px;
    }

    /* Floats */
    #backToTop {
        right: 12px;
        bottom: 14px;
        width: 44px;
        height: 44px;
    }

    .whatsapp-float {
        left: 12px;
        bottom: 14px;
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}

/* ===================================================
   6. EXTRA SMALL DEVICES (max-width: 360px)
   =================================================== */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 24px;
    }

    .hero-buttons .btn {
        height: 50px;
        font-size: 13px;
    }

    .hero-feature {
        font-size: 13px;
    }

    .journey-step {
        grid-template-columns: 55px 1fr;
    }

    .journey-icon {
        width: 52px;
        height: 52px;
    }

    .journey-step h4 {
        font-size: 16px;
    }

    .accordion-button {
        font-size: 13px;
    }

    .accordion-body {
        padding-left: 48px;
    }

    .stat-card h3 {
        font-size: 1.35rem;
    }

    .stat-card span {
        font-size: 10px;
    }
}

/* ===================================================
   7. TOUCH DEVICE OVERRIDES
   =================================================== */
@media (hover: none) and (pointer: coarse) {
    .loan-service-card:hover,
    .loan-option-card:hover,
    .trust-card:hover,
    .knowledge-card:hover,
    .success-card:hover,
    .review-card:hover,
    .service-card:hover,
    .step-box:hover,
    .info-box:hover,
    .summary-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* ===================================================
   8. ACCESSIBILITY / REDUCED MOTION
   =================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}