/* ==========================================
   TODAPAY - Responsive Styles
   ========================================== */

/* Tablet - Medium screens */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .split-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .split-section.reverse {
        direction: ltr;
    }

    .carousel-card {
        flex: 0 0 calc(50% - 1rem);
    }

    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Mobile - Small screens */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--box-shadow-lg);
        transition: left 0.3s ease;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid var(--light-gray);
    }

    .menu-toggle {
        display: flex;
    }

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

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

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

    /* Hero */
    .hero {
        min-height: 70vh;
        padding: 3rem 0;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-buttons a {
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
    }

    /* Carousel */
    .carousel {
        padding: 3rem 0;
    }

    .carousel-card {
        flex: 0 0 100%;
    }

    .carousel-track {
        gap: 1rem;
    }

    /* Sections */
    .section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .split-section {
        gap: 2rem;
    }

    /* Feature Grid */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Footer */
    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Buttons */
    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9375rem;
    }

    .btn-lg {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    /* Utility adjustments */
    .mt-3, .mt-4 { margin-top: 1.5rem; }
    .mb-3, .mb-4 { margin-bottom: 1.5rem; }
    .py-3, .py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
}

/* Extra small screens */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 1rem;
    }

    .navbar-container {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.875rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .carousel-card,
    .feature-card {
        padding: 1.5rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }

    .nav-menu {
        height: calc(100vh - 60px);
    }
}

/* High resolution screens */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero {
        min-height: 95vh;
    }
}

/* Homepage Hero Responsive */
@media (max-width: 1024px) {
    .hero [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .hero [style*="position: absolute"] {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 0 !important;
    }
    .navbar.scrolled .nav-menu li a{
        color:var(--dark-text) !important;
    }
    .navbar.scrolled .nav-menu li a.btn.btn-primary.btn-sm{
        color:var(--white) !important;
    }
    .navbar.scrolled .menu-toggle span{
        background: #fefeff !important;
    }
   
    .hero [style*="gap: 4rem"] {
        gap: 2rem !important;
    }

    .hero [style*="max-width: 350px"] {
        max-width: 280px !important;
        margin: 0 auto;
    }

    .hero [style*="display: flex; gap: 1rem; margin-bottom: 2rem"] button {
        font-size: 0.875rem !important;
        padding: 0.5rem 1.5rem !important;
    }

    .hero [style*="width: 100px; height: 100px"] {
        width: 70px !important;
        height: 70px !important;
    }

    .hero [style*="width: 90px; height: 90px"] {
        width: 60px !important;
        height: 60px !important;
    }
}

/* Desktop hero button alignment */
@media (min-width: 769px) {
    .hero-buttons a {
        min-width: 160px !important;
        max-width: 200px !important;
    }
    
    /* Ensure buttons have equal width by making them flex-grow */
    .hero-buttons {
        display: flex !important;
        gap: 0.75rem !important;
        justify-content: flex-start !important;
    }
    
    .hero-buttons a > div {
        width: 100% !important;
    }
}

/* QR Code container alignment fix */
@media (min-width: 768px) {
    .qr-codes-section {
        justify-content: flex-start !important;
        gap: 1.5rem !important;
    }
    
    .qr-codes-section > div {
        min-width: 120px !important;
        flex: 0 0 auto !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .carousel-controls,
    .btn,
    .footer {
        display: none;
    }

    .hero {
        min-height: auto;
        background: var(--white);
        color: var(--dark-text);
    }

    .section {
        page-break-inside: avoid;
    }
}
