


@media (max-width: 1200px) {
    html, body {
        overflow-x: hidden;
    }
    .footer-grid {
        gap: 40px;
    }
}


@media (max-width: 1024px) {
    .dashboard-hero h1 {
        font-size: 32px;
    }

    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 991px) {
    .nav-container {
        padding: 0 16px !important;
    }

    html, body {
        overflow-x: hidden;
        width: 100%;
        position: relative;
    }


    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-image-wrap {
        display: block;
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
    }


    .explore-heading {
        text-align: center;
    }

    .explore-tabs-bar {
        justify-content: center;
        margin: 0 auto;
    }


    .ai-gen-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .ai-gen-subtext {
        margin-left: auto;
        margin-right: auto;
    }

    .ai-gen-prompt-wrapper {
        margin: 0 auto;
        justify-content: center;
    }


    .business-heading,
    .business-subtext {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .business-grid {
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: 20px !important;
        padding-bottom: 30px !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start !important;
        text-align: left !important;
    }

    .business-grid::-webkit-scrollbar {
        display: none;
    }

    .business-card {
        width: 360px !important;
        height: 380px !important;
        flex-shrink: 0 !important;
    }


    .templates-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin-bottom: 40px;
    }

    .btn-browse-templates {
        align-self: center;
    }


    .nav-mobile-bar {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 0;
        height: 100%;
        gap: 8px;
    }

    .btn-mobile-login {
        margin-left: auto;
    }

    .nav-logo-desktop,
    .nav-links,
    .nav-actions {
        display: none;
    }

    .nav-logo-mobile img {
        height: 26px;
        margin-left: -4px;
    }


    .mobile-menu {
        width: 80%;
        max-width: 80%;
        background: #fff;
    }

    .mobile-menu-header {
        padding: 24px;
        display: flex;
        justify-content: flex-end;
    }

    .mobile-close-btn {
        background: transparent;
        border: none;
        font-size: 1.8rem;
        font-weight: 300;
        color: #0e0e0e;
        cursor: pointer;
        padding: 0;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: background 0.2s;
    }

    .mobile-close-btn:hover {
        background-color: #f3f4f6;
    }

    .mobile-nav {
        padding: 0 24px;
    }

    .mobile-nav-item {
        font-size: 14px;
        font-weight: 500;
        color: #0e0e0e;
        padding: 12px 16px;
        margin: 4px 0;
        border-bottom: none;
        text-decoration: none;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: 8px;
        transition: background 0.2s;
    }

    .mobile-nav-item:hover {
        background-color: #f3f4f6;
    }

    .mobile-menu-footer {
        padding: 24px;
        margin-top: auto;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .btn-mobile-menu-login {
        width: 100%;
        background: #8b3dff;
        color: #fff !important;
        padding: 12px;
        border-radius: 8px;
        text-align: center;
        font-weight: 700;
    }

    .btn-mobile-menu-signup {
        width: 100%;
        background: #fff;
        color: #0e0e0e !important;
        padding: 12px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        text-align: center;
        font-weight: 700;
    }

    .hero-title {
        font-size: 2.6rem !important;
        font-weight: 700 !important;
        letter-spacing: -1px !important;
        margin-bottom: 24px !important;
        line-height: 1.1 !important;
    }

    .hero-subtitle {
        font-size: 1.15rem !important;
        line-height: 1.4 !important;
        margin-bottom: 40px !important;
        max-width: 90% !important;
        color: #fff !important;
        opacity: 1 !important;
    }

    .btn-hero-cta {
        background: #fff !important;
        color: #0e0e0e !important;
        padding: 12px 24px !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        border-radius: 8px !important;
        width: auto !important;
        display: inline-flex !important;
        max-width: 90% !important;
        margin-bottom: 48px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }


    .footer-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        padding: 0 24px;
    }

    .footer-links-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .accordion-item {
        border-bottom: 1px solid #f2f2f2;
    }

    .accordion-header {
        cursor: pointer;
        padding: 20px 0;
    }

    .accordion-header h3 {
        margin-bottom: 0;
    }

    .accordion-icon {
        display: block;
        transition: transform 0.3s ease;
    }

    .accordion-content {
        max-height: 0;
        overflow: hidden;
        margin-bottom: 0;
        transition: max-height 0.3s ease, margin-bottom 0.3s ease;
    }

    .accordion-item.active .accordion-content {
        max-height: 600px;
        margin-bottom: 24px;
    }

    .accordion-item.active .accordion-icon {
        transform: rotate(180deg);
    }

    .templates-header h2 {
        font-size: 2rem !important;
        margin-bottom: 16px !important;
    }

    .card-potrait {
        width: 160px !important;
        height: 225px !important;
    }

    .card-landscape {
        width: 320px !important;
        height: 225px !important;
    }

    .templates-arrow-next {
        width: 40px !important;
        height: 40px !important;
        right: 12px !important;
    }

    .templates-arrow-next svg {
        width: 20px !important;
        height: 20px !important;
    }


    .footer-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
        padding: 0 24px;
    }

    .bottom-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .bottom-right {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 16px;
    }
}


@media (max-width: 900px) {
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }


    /* --- Hero Section Mobile --- */
    .hero {
        padding-top: calc(var(--nav-height) + 40px);
        padding-bottom: 40px;
        min-height: auto;
    }

    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 0 20px;
    }

    .hero-image-wrap {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 10px !important;
        margin-top: 20px;
    }

    .hero-title {
        font-size: 2.8rem !important;
        line-height: 1.15 !important;
        margin-bottom: 20px !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 32px !important;
        padding: 0 10px;
    }

    .btn-hero-cta {
        width: auto !important;
        max-width: 90% !important;
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
    }

    .hero-search-wrap {
        padding: 16px;
        width: 100%;
    }

    .explore-heading {
        font-size: 1.8rem !important;
        margin-bottom: 20px;
    }

    .feature-card {
        width: 310px !important;
        min-height: 370px !important;
        padding: 24px !important;
    }

    .card-text h3 {
        font-size: 1.35rem !important;
        margin-bottom: 12px !important;
    }

    .business-grid {
        display: flex !important;
        overflow-x: auto !important;
        padding-bottom: 30px !important;
    }

    .business-card {
        width: 290px !important;
        height: 370px !important;
    }

    .card-potrait {
        width: 140px !important;
        height: 190px !important;
    }

    .card-landscape {
        width: 280px !important;
        height: 190px !important;
    }

    .templates-arrow-next {
        width: 32px !important;
        height: 32px !important;
        right: 8px !important;
    }

    .templates-arrow-next svg {
        width: 16px !important;
        height: 16px !important;
    }
}


@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem !important;
    }

    .explore-heading {
        font-size: 1.6rem;
    }
}