/* ==========================================
   RESPONSIVE DESIGN - AWSFlow.io
   ========================================== */


/* Mobile - < 768px */
@media (max-width: 767px) {

    /* Reset container padding */
    .container,
    .max-w-7xl,
    .max-w-6xl,
    .max-w-4xl {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .logo {
        font-size: 1.75rem;
        font-weight: 800;
        text-decoration: none;
    }

    .logo-dark {
        color: var(--gray-900);
    }

    /* Navigation */
    nav {
        flex-direction: column;
        padding: 10px 15px;
        min-height: auto !important;
        height: auto !important;
    }

    .nav {
        background: white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    nav .flex.justify-between {
        flex-wrap: wrap;
        height: auto !important;
        min-height: 56px;
    }

    nav .flex.items-center:first-child {
        flex: 0 0 auto;
    }

    nav .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 10px;
    }

    nav .nav-links a {
        padding: 8px 0;
        width: 100%;
        text-align: center;
        color: #faf7f7;
    }

    .nav-links #auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    #auth-buttons button[data-i18n="nav_logout"] {
        display: none !important;
    }

    /* Language selector */
    .language-selector {
        width: 100%;
        margin: 10px 0;
    }

    .language-selector button {
        width: 100%;
        justify-content: center;
    }

    .language-selector #lang-dropdown {
        width: 100%;
        position: relative;
    }

    /* Hero section */
    .hero {
        padding: 30px 15px;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Pricing cards */
    .pricing-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 24px;
    }

    .pricing-card {
        margin-bottom: 0;
        padding: 24px 20px !important;
    }

    /* Features section */
    .features-grid {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 24px;
    }

    /* Form */
    .form-container {
        padding: 20px 15px;
        margin: 0 15px;
    }

    .form-container input,
    .form-container button {
        width: 100%;
        font-size: 16px;
    }

    /* Footer */
    footer,
    .footer {
        padding: 40px 16px !important;
    }

    footer .footer-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    footer .footer-brand,
    .footer-brand {
        text-align: center;
    }

    footer .footer-column,
    .footer-column {
        text-align: center;
    }

    footer .footer-column ul,
    .footer-column ul {
        padding: 0;
    }

    footer .footer-social,
    .footer-social {
        justify-content: center;
    }

    footer .footer-bottom,
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    footer .footer-links,
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    /* Dashboard */
    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .dashboard-card {
        margin-bottom: 15px;
    }

    /* Navbar fixes for Tailwind templates */
    nav.sticky {
        flex-wrap: wrap;
        position: relative !important;
    }

    nav .flex.items-center.space-x-6 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        width: 100%;
        padding-top: 10px;
    }

    nav .h-6.w-px {
        display: none;
    }

    /* Index template specific */
    .gradient-hero {
        padding: 60px 16px !important;
    }

    .gradient-hero h1 {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }

    .gradient-hero p {
        font-size: 1rem !important;
    }

    /* Section titles mobile */
    .section-header h2,
    section h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        padding: 0 8px;
    }

    .section-header p,
    section p {
        font-size: 0.95rem !important;
        padding: 0 8px;
    }

    /* Stats section mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 16px 12px !important;
    }

    .stat-card h3 {
        font-size: 1.5rem !important;
    }

    .stat-card p {
        font-size: 0.75rem !important;
    }

    /* Features grid mobile */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .feature-card {
        padding: 20px !important;
    }

    /* Testimonials mobile */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* CTA Section mobile */
    .cta-section {
        padding: 40px 16px !important;
        margin: 40px 16px !important;
    }

    .cta-section h2 {
        font-size: 1.5rem !important;
    }

    /* Pricing grid mobile */
    .pricing-grid {
        grid-template-columns: 1fr !important;
    }

    /* FAQ mobile */
    .faq-item {
        margin-bottom: 12px !important;
    }

    .faq-question {
        padding: 16px !important;
        font-size: 0.95rem !important;
    }

    .faq-answer {
        padding: 16px !important;
        font-size: 0.9rem !important;
    }

    /* Payment template specific */
    .card-plan {
        margin-bottom: 20px;
    }

    /* Dashboard template specific */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header {
        flex-direction: column;
        gap: 16px;
    }

    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    /* Hide desktop elements on mobile */
    .hidden-mobile,
    nav .hidden.md\:flex {
        display: none !important;
    }

    /* Show mobile elements */
    .block-mobile {
        display: block !important;
    }

    /* Fix overflow issues */
    body {
        overflow-x: hidden;
    }

    /* Tables mobile */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Form inputs mobile */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
    }
}

/* Tablet - 768px - 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
    nav {
        padding: 15px 25px;
    }




}

.pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Footer tablet */
footer .footer-grid,
.footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px;
}

/* Stats tablet */
.stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
}


/* Desktop - >= 1024px */
@media (min-width: 1024px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    /* Footer desktop */
    footer .footer-grid,
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr) !important;
    }

    /* Stats desktop */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* Testimonials desktop */
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Bouton hamburger pour mobile */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 767px) {
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        padding: 10px;
        cursor: pointer;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: #374151;
        margin: 5px 0;
        border-radius: 2px;
    }

    nav .nav-links.hidden-mobile {
        display: none;
    }

    nav .nav-links.show-mobile {
        display: flex;
    }
}

/* Additional responsive fixes for Tailwind templates */
@media (max-width: 767px) {

    /* Index.html nav fixes */
    nav .max-w-7xl {
        padding: 0 15px;
    }

    nav .flex.justify-between {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
    }

    nav .flex.items-center:first-child {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }

    nav .flex.items-center.space-x-6 {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Form section mobile */
    #analyze {
        padding: 0 15px;
    }

    .form-step>div {
        padding: 20px 15px;
    }

    /* Features grid */
    .grid.md\:grid-cols-3 {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    /* Footer grid */
    .grid.md\:grid-cols-4 {
        grid-template-columns: 1fr 1fr;
    }

    /* CTA Section */
    section.gradient-hero {
        padding: 40px 15px;
    }

    /* Payment page card grid */
    main>div[style*="grid"] {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
}

/* ==========================================
   HAMBURGER MENU MOBILE
   ========================================== */

/* Navbar z-index fix */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

/* Hamburger Menu Mobile */
@media (max-width: 768px) {
    .navbar-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        border-top: 1px solid var(--border);
        z-index: 1000;
    }

    .navbar-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 10px;
    }

    .hamburger span {
        width: 25px;
        height: 3px;
        background: var(--text-primary);
        transition: all 0.3s;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
}

/* Tailwind navbar hamburger support */
@media (max-width: 768px) {
    nav.sticky {
        z-index: 1001;
        position: relative;
    }

    nav .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 10px;
        background: transparent;
        border: none;
    }

    nav .hamburger span {
        width: 25px;
        height: 3px;
        background: #374151;
        transition: all 0.3s;
        border-radius: 2px;
    }

    nav .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    nav .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    nav .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    /* Hide nav links on mobile by default, show when active */
    nav .mobile-nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        flex-direction: column;
        gap: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #e5e7eb;
    }

    nav .mobile-nav-links.active {
        display: flex;
    }
}

@media (min-width: 769px) {
    nav .hamburger {
        display: none;
    }

    nav .mobile-nav-links {
        display: none !important;
    }
}



/* ==========================================
   NAV HAMBURGER MOBILE - All pages
   ========================================== */

/* Hamburger button - hidden on desktop, shown on mobile */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger animation when active */
.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile nav styles */
@media (max-width: 768px) {

    /* Show hamburger on mobile */
    .nav-hamburger {
        display: flex !important;
    }

    /* Nav links hidden by default on mobile */
    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-top: 1px solid #e5e7eb;
        z-index: 1000;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    /* Nav links visible when open */
    .nav-links.open {
        display: flex !important;
    }

    /* Nav links styling on mobile */
    .nav-links a {
        display: block;
        padding: 12px 0;
        font-size: 16px;
        text-align: center;
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Language selector mobile */
    .nav-links .language-selector {
        width: 100%;
        text-align: center;
    }

    .nav-links .language-selector button {
        width: 100%;
        justify-content: center;
    }

    .nav-links .language-selector #lang-dropdown {
        position: relative;
        width: 100%;
        top: auto;
        right: auto;
        margin-top: 8px;
    }

    /* Auth buttons mobile */
    .nav-links #auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    #auth-buttons button[data-i18n="nav_logout"] {
        display: none !important;
    }

    /* CTA button mobile */
    .nav-links .nav-cta {
        width: 100%;
        text-align: center;
        margin-top: 8px;
    }

    /* Nav container mobile */
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        min-height: 72px;
        padding: 12px 16px;
    }

    /* Separator hidden on mobile */
    .nav-links .h-6.w-px {
        display: none;
    }
}

/* Desktop - hide hamburger, show nav links */
@media (min-width: 769px) {
    .nav-hamburger {
        display: none !important;
    }

    .nav-links {
        display: flex !important;
    }
}

/* ==========================================
   INDEX.HTML SPECIFIC RESPONSIVE
   ========================================== */

@media (max-width: 767px) {

    /* Hero section with gradient */
    .gradient-hero,
    section[class*="gradient"] {
        padding: 60px 16px !important;
        text-align: center;
    }

    .gradient-hero h1 {
        font-size: 1.75rem !important;
        line-height: 1.25 !important;
        margin-bottom: 16px !important;
    }

    .gradient-hero p,
    .gradient-hero .text-lg {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    /* Button mobile fixes */
    .gradient-hero .btn,
    .gradient-hero a[href*="#form"],
    .gradient-hero button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px 24px !important;
        margin: 12px 0;
    }

    /* Stats counter mobile */
    .stats-grid,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin: 24px 16px;
    }

    .stat-card,
    .stats-grid>div {
        padding: 16px 12px !important;
        text-align: center;
    }

    .stat-card h3,
    .stats-grid h3 {
        font-size: 1.5rem !important;
    }

    .stat-card p,
    .stats-grid p {
        font-size: 0.8rem !important;
    }

    /* Features section mobile */
    .features-section,
    section:has(.features-grid) {
        padding: 40px 16px !important;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 8px;
    }

    .feature-card {
        padding: 24px 20px !important;
        text-align: center;
    }

    .feature-card h3 {
        font-size: 1.1rem !important;
    }

    .feature-card p {
        font-size: 0.9rem !important;
    }

    /* Testimonials mobile */
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 8px;
    }

    .testimonial-card {
        padding: 24px 20px !important;
    }

    /* CTA Section mobile */
    .cta-section,
    .cta-banner,
    section:has(.cta-section),
    section.bg-gradient-to-r {
        padding: 40px 16px !important;
        margin: 32px 0 !important;
    }

    .cta-section h2,
    .cta-banner h2 {
        font-size: 1.5rem !important;
        margin-bottom: 12px !important;
    }

    .cta-section p,
    .cta-banner p {
        font-size: 1rem !important;
    }

    /* Form section mobile */
    #form,
    #analyze {
        padding: 0 16px !important;
    }

    .form-step,
    .form-container {
        padding: 24px 16px !important;
        margin: 16px 0 !important;
    }

    .form-step input,
    .form-step select,
    .form-step textarea {
        font-size: 16px !important;
        padding: 14px 16px !important;
    }

    .form-step button,
    .btn-submit,
    .btn-primary {
        padding: 14px 24px !important;
        font-size: 16px !important;
    }

    /* Pricing mobile */
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 16px;
    }

    .pricing-card {
        padding: 28px 20px !important;
    }

    .pricing-card .price {
        font-size: 2.5rem !important;
    }

    /* Popular badge */
    .pricing-card.popular {
        transform: scale(1) !important;
        margin: 0;
    }

    /* Blog grid mobile */
    .blog-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Contact page mobile */
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   PRICING.HTML SPECIFIC RESPONSIVE
   ========================================== */

@media (max-width: 767px) {

    .plan-cards,
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    .plan-card {
        margin-bottom: 20px;
    }

    .btn-plan {
        padding: 12px 20px !important;
        width: 100%;
    }
}

/* ==========================================
   ABOUT.HTML & OTHER PAGES RESPONSIVE
   ========================================== */

@media (max-width: 767px) {

    /* About page hero */
    .hero-section,
    .page-hero {
        padding: 60px 16px !important;
    }

    .hero-section h1,
    .page-hero h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    /* Content sections */
    main.max-w-4xl {
        padding: 24px 16px !important;
    }

    main.max-w-4xl h1 {
        font-size: 1.75rem !important;
        margin-bottom: 20px !important;
    }

    main.max-w-4xl h2 {
        font-size: 1.25rem !important;
        margin-top: 24px !important;
    }

    main.max-w-4xl p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    /* Tables in content pages */
    main.max-w-4xl table {
        font-size: 0.85rem !important;
    }

    main.max-w-4xl th,
    main.max-w-4xl td {
        padding: 10px 8px !important;
    }
}

/* ==========================================
   DASHBOARD RESPONSIVE
   ========================================== */

@media (max-width: 767px) {

    .dashboard-header,
    .dashboard-nav {
        flex-direction: column;
        gap: 16px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .dashboard-content {
        padding: 16px !important;
    }

    .report-list {
        gap: 12px;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {

    nav,
    footer,
    .hamburger,
    .mobile-nav-links,
    .cta-section,
    .btn {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h1 {
        font-size: 24pt;
    }

    h2 {
        font-size: 18pt;
    }

    h3 {
        font-size: 14pt;
    }

    .container,
    .max-w-7xl,
    .max-w-4xl {
        max-width: 100% !important;
        padding: 0 !important;
    }
}