/**
 * Car Star - Responsive Stylesheet
 * Mobile-first responsive design
 * 
 * @package CarStar
 */

/* =====================================================
   TABLET LANDSCAPE (max-width: 1024px)
   ===================================================== */
@media (max-width: 1024px) {

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

    .about-wrapper {
        gap: var(--space-2xl);
    }

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

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

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

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

/* =====================================================
   TABLET PORTRAIT (max-width: 768px)
   ===================================================== */
@media (max-width: 768px) {
    :root {
        --navbar-height: 70px;
    }

    /* Navbar Mobile */
    .navbar-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--space-xl);
        background: var(--bg-primary);
        transform: translateX(100%);
        transition: transform var(--transition-smooth);
        gap: var(--space-sm);
    }

    html[dir="rtl"] .navbar-menu {
        transform: translateX(-100%);
    }

    .navbar-menu.active {
        transform: translateX(0);
    }

    .navbar-menu .nav-link {
        display: block;
        padding: var(--space-md);
        font-size: var(--font-size-lg);
        text-align: center;
        border-radius: var(--radius-lg);
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-cta {
        display: none !important;
    }

    /* Hero Mobile */
    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-xl);
    }

    .stat-item {
        flex: 1 1 calc(50% - var(--space-xl));
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Features & Services */
    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* About */
    .about-wrapper {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: 1;
    }

    .about-content {
        order: 2;
        text-align: center;
    }

    .about-content .section-title,
    .about-content .section-badge {
        text-align: center;
    }

    .about-features li {
        justify-content: center;
    }

    .about-cta {
        justify-content: center;
    }

    .experience-badge {
        width: 100px;
        height: 100px;
        bottom: -20px;
    }

    .exp-number {
        font-size: var(--font-size-2xl);
    }

    .about-stats {
        padding: var(--space-xl);
    }

    /* Contact */
    .contact-info {
        grid-template-columns: 1fr;
    }

    .map-container {
        height: 300px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .contact-list li {
        justify-content: center;
    }
}

/* =====================================================
   MOBILE (max-width: 480px)
   ===================================================== */
@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    .section-header {
        margin-bottom: var(--space-2xl);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }

    .section-subtitle {
        font-size: var(--font-size-base);
    }

    /* Hero */
    .hero-icon {
        font-size: 3rem;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
    }

    .hero-stats {
        gap: var(--space-lg);
    }

    .stat-number {
        font-size: var(--font-size-2xl);
    }

    /* Cards */
    .feature-card,
    .service-card {
        padding: var(--space-lg);
    }

    .feature-icon,
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-xl);
    }

    /* About Stats */
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .stat-card .stat-number {
        font-size: var(--font-size-2xl);
    }

    /* FAQ */
    .faq-question {
        padding: var(--space-md);
    }

    .faq-question-text {
        font-size: var(--font-size-base);
    }

    .faq-answer-inner {
        padding: 0 var(--space-md) var(--space-md);
    }

    /* Contact */
    .contact-card {
        padding: var(--space-md);
    }

    .contact-card-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-lg);
    }

    /* Floating Buttons */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: var(--space-md);
        right: var(--space-md);
        font-size: var(--font-size-xl);
    }

    html[dir="rtl"] .whatsapp-float {
        right: auto;
        left: var(--space-md);
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: calc(var(--space-md) + 60px);
        right: var(--space-md);
    }

    html[dir="rtl"] .back-to-top {
        right: auto;
        left: var(--space-md);
    }

    /* Brands Slider */
    .brand-card {
        width: 120px;
        height: 100px;
        padding: var(--space-md);
    }

    .brand-logo {
        max-width: 60px;
        max-height: 40px;
    }

    /* Buttons */
    .btn-lg {
        padding: var(--space-md) var(--space-lg);
        font-size: var(--font-size-base);
    }
}

/* =====================================================
   SMALL MOBILE (max-width: 360px)
   ===================================================== */
@media (max-width: 360px) {
    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .hero-badge {
        font-size: var(--font-size-xs);
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .navbar-actions {
        gap: var(--space-xs);
    }

    .lang-switcher,
    .theme-toggle {
        width: 35px;
        height: 35px;
    }
}

/* =====================================================
   LANDSCAPE MOBILE
   ===================================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--navbar-height) + var(--space-2xl)) 0 var(--space-2xl);
    }

    .hero-icon {
        display: none;
    }

    .hero-stats {
        display: none;
    }

    .hero-scroll-indicator {
        display: none;
    }
}

/* =====================================================
   HIGH DPI / RETINA DISPLAYS
   ===================================================== */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .logo-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .brands-track {
        animation: none;
    }

    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {

    .navbar,
    .whatsapp-float,
    .back-to-top,
    .hero-scroll-indicator {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
    }

    .hero-overlay {
        background: rgba(0, 0, 0, 0.7);
    }

    .section {
        padding: var(--space-xl) 0;
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }
}