/* ==========================================================================
   3Cipercash - Cash & Carry
   Responsive Stylesheet
   ========================================================================== */

/* ==================== Tablet (max-width: 1024px) ==================== */
@media screen and (max-width: 1024px) {
    :root {
        --spacing-3xl: 4rem;
        --spacing-2xl: 3rem;
    }
    
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    /* Header */
    .header-top {
        display: none;
    }
    
    .nav-menu {
        gap: var(--spacing-sm);
    }
    
    .nav-link {
        font-size: 0.9375rem;
    }
    
    /* Hero */
    .hero {
        min-height: 90vh;
        padding-top: 120px;
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
    }
    
    /* Info Cards */
    .info-cards-section {
        margin-top: -60px;
        padding: var(--spacing-xl) 0;
    }
    
    .info-cards-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .info-card-large {
        padding: var(--spacing-xl);
    }
    
    .stat-item {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    /* Grids */
    .target-grid,
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-md);
    }
    
    .why-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    /* Counter */
    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* How Section */
    .how-steps {
        gap: var(--spacing-md);
    }
    
    .step-connector {
        display: none;
    }
    
    /* Location */
    .location-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    /* Slider Navigation */
    .slider-prev {
        left: -10px;
    }
    
    .slider-next {
        right: -10px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== Mobile Landscape (max-width: 768px) ==================== */
@media screen and (max-width: 768px) {
    :root {
        --spacing-3xl: 3rem;
        --spacing-2xl: 2rem;
        --spacing-xl: 2rem;
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Header */
    .navbar {
        padding: 10px 0;
    }
    
    .navbar.scrolled {
        padding: 8px 0;
    }
    
    .navbar-content {
        flex-wrap: nowrap;
        gap: var(--spacing-sm);
    }
    
    .nav-menu {
        position: fixed;
        top: 95px;
        left: 0;
        width: 100%;
        height: calc(100vh - 95px);
        background: var(--bg-white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: var(--spacing-xl) var(--spacing-md);
        gap: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all var(--transition-base);
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
        z-index: var(--z-dropdown);
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-md) var(--spacing-sm);
        font-size: 1.125rem;
    }
    
    .navbar-actions .btn {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero {
        min-height: auto;
        padding: 120px 0 60px 0;
    }
    
    .hero-content {
        padding: 0 16px;
    }
    
    .hero-title {
        font-size: 1.875rem;
        line-height: 1.3;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .stat-content {
        text-align: center;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Info Cards Mobile */
    .info-card-large {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-lg);
    }
    
    .info-card-icon {
        margin: 0 auto var(--spacing-md);
    }
    
    .info-card-content h3 {
        font-size: 1.25rem;
    }
    
    .info-card-content p {
        font-size: 1rem;
    }
    
    /* Target Grid */
    .target-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--spacing-md);
    }
    
    .target-card {
        padding: var(--spacing-lg);
    }
    
    .target-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .target-title {
        font-size: 1.125rem;
    }
    
    .target-description {
        font-size: 0.875rem;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        padding: var(--spacing-lg);
    }
    
    .category-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    /* Why Section */
    .why-grid {
        grid-template-columns: 1fr;
    }
    
    .why-item {
        padding: var(--spacing-md);
    }
    
    .why-item:hover {
        transform: translateY(-5px);
    }
    
    .why-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    /* Counter */
    .counter-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .counter-item {
        padding: var(--spacing-lg);
    }
    
    .counter-number {
        font-size: 2.5rem;
    }
    
    /* Brands */
    .brand-item {
        flex: 0 0 150px;
        height: 80px;
    }
    
    /* Promotions */
    .promotions-slider {
        grid-template-columns: 1fr;
    }
    
    .promo-card {
        padding: var(--spacing-lg);
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .slider-prev {
        left: 0;
    }
    
    .slider-next {
        right: 0;
    }
    
    /* How Section */
    .how-steps {
        flex-direction: column;
    }
    
    .step-item {
        max-width: 100%;
        padding: var(--spacing-lg);
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    /* CTA Section */
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ==================== Small Mobile (max-width: 414px) - iPhone 6/7/8 Plus, Galaxy S9+ ==================== */
@media screen and (max-width: 414px) {
    .hero-title {
        font-size: clamp(1.5rem, 6vw, 1.75rem) !important;
    }
    
    .hero-subtitle {
        font-size: clamp(0.9rem, 4vw, 1rem) !important;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* ==================== Extra Small Mobile (max-width: 390px) - iPhone 12/13/14 ==================== */
@media screen and (max-width: 390px) {
    .hero-title {
        font-size: clamp(1.375rem, 7vw, 1.625rem) !important;
    }
    
    .hero-subtitle {
        font-size: clamp(0.875rem, 4vw, 0.9375rem) !important;
    }
    
    .stat-item {
        padding: 0.625rem 0.875rem;
    }
    
    .stat-number {
        font-size: 1.375rem;
    }
}

/* ==================== Tiny Mobile (max-width: 375px) - iPhone SE, Galaxy S8 ==================== */
@media screen and (max-width: 375px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.125rem;
    }
    
    .container {
        padding: 0 14px;
    }
    
    .hero .container {
        padding-left: clamp(14px, 4vw, 18px) !important;
        padding-right: clamp(14px, 4vw, 18px) !important;
    }
    
    .hero-content {
        padding: 0 10px !important;
    }
    
    .hero-title {
        font-size: clamp(1.25rem, 8vw, 1.5rem) !important;
        line-height: 1.3 !important;
        word-spacing: -0.05em;
    }
    
    .hero-subtitle {
        font-size: clamp(0.8125rem, 4vw, 0.875rem) !important;
        line-height: 1.55 !important;
    }
    
    .logo-img {
        height: 38px;
        padding: 4px 8px;
    }
    
    .navbar.scrolled .logo-img {
        height: 34px;
        padding: 3px 7px;
    }
    
    .btn {
        padding: 0.6875rem 1.125rem;
        font-size: 0.875rem;
    }
    
    .section-title {
        font-size: 1.375rem;
    }
    
    .section-description {
        font-size: 0.875rem;
    }
}

/* ==================== Mobile Portrait (max-width: 480px) ==================== */
@media screen and (max-width: 480px) {
    :root {
        --spacing-3xl: 2.5rem;
        --spacing-2xl: 1.5rem;
        --spacing-xl: 1.5rem;
        --spacing-lg: 1.25rem;
    }
    
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    /* Header */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .nav-menu {
        top: 85px;
        height: calc(100vh - 85px);
    }
    
    .mobile-toggle {
        width: 26px;
        height: 20px;
    }
    
    .mobile-toggle span {
        height: 2px;
    }
    
    /* Hero */
    .hero {
        min-height: auto;
        padding: 100px 0 50px 0;
    }
    
    .hero-content {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 1.625rem;
        line-height: 1.35;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
        line-height: 1.65;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-cta .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .hero-scroll-indicator {
        bottom: 20px;
        font-size: 0.75rem;
    }
    
    .mouse {
        width: 20px;
        height: 30px;
    }
    
    /* Section Headers */
    .section-tag {
        font-size: 0.75rem;
        padding: 0.375rem var(--spacing-sm);
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-description {
        font-size: 0.9375rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    /* Target Grid */
    .target-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .target-card {
        padding: var(--spacing-md);
    }
    
    /* Categories */
    .category-card {
        padding: var(--spacing-md);
    }
    
    .category-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .category-title {
        font-size: 1.125rem;
    }
    
    /* Why Section */
    .why-item {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .why-icon {
        margin: 0 auto;
    }
    
    /* Counter */
    .counter-item {
        padding: var(--spacing-md);
    }
    
    .counter-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .counter-number {
        font-size: 2rem;
    }
    
    .counter-label {
        font-size: 1rem;
    }
    
    /* Brands */
    .brand-item {
        flex: 0 0 120px;
        height: 70px;
    }
    
    .brand-logo {
        font-size: 1rem;
    }
    
    /* Promotions */
    .promo-card {
        padding: var(--spacing-md);
    }
    
    .promo-badge {
        top: -10px;
        right: var(--spacing-md);
        padding: 0.375rem 1rem;
        font-size: 1rem;
    }
    
    .promo-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .promo-title {
        font-size: 1.125rem;
    }
    
    .slider-nav {
        display: none;
    }
    
    /* How Section */
    .step-item {
        padding: var(--spacing-md);
    }
    
    .step-number {
        top: -15px;
        right: var(--spacing-md);
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .step-title {
        font-size: 1.125rem;
    }
    
    .step-description {
        font-size: 0.875rem;
    }
    
    /* Location */
    .location-map iframe {
        height: 300px;
    }
    
    .info-card {
        padding: var(--spacing-md);
        flex-direction: column;
        text-align: center;
    }
    
    .info-icon {
        margin: 0 auto;
    }
    
    .info-content h3 {
        font-size: 1rem;
    }
    
    .info-content p {
        font-size: 0.875rem;
    }
    
    /* CTA Section */
    .cta-content {
        padding: var(--spacing-md);
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-description {
        font-size: 0.9375rem;
    }
    
    /* Footer */
    .footer-main {
        padding: var(--spacing-xl) 0;
    }
    
    .footer-logo img {
        height: 40px;
    }
    
    .footer-description,
    .footer-links a,
    .footer-contact li {
        font-size: 0.875rem;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-bottom {
        padding: var(--spacing-md) 0;
    }
    
    .footer-copyright,
    .footer-credits {
        font-size: 0.8125rem;
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ==================== Animation Optimizations for Mobile ==================== */
@media screen and (max-width: 768px) {
    /* Disable complex animations on mobile for better performance */
    .card-3d:hover {
        transform: translateY(-5px);
    }
    
    .shape {
        animation: none;
        opacity: 0.5;
    }
    
    /* Simplify hover effects */
    .target-card:hover .target-icon,
    .category-card:hover .category-icon,
    .step-item:hover .step-icon {
        transform: scale(1.05);
    }
    
    /* Reduce motion for accessibility */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation: none !important;
            transition: none !important;
        }
        
        html {
            scroll-behavior: auto;
        }
    }
}

/* ==================== Landscape Mode Adjustments ==================== */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-scroll-indicator {
        display: none;
    }
    
    .nav-menu {
        height: auto;
        max-height: 70vh;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .header,
    .mobile-toggle,
    .back-to-top,
    .hero-scroll-indicator,
    .cta-section,
    .social-link {
        display: none !important;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}
