/* ===================================================
   RESPONSIVE.CSS - Mobile-First Media Queries
   Cihan Garage Motosiklet - cihanmotor.com
   =================================================== */

/* ========================
   BASE MOBILE - 0px to 767px
   ======================== */

/* Hamburger is display:flex by default in components.css */

/* --- Mobile Menu (full screen slide-in) --- */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: -webkit-fill-available;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: var(--space-3xl) var(--space-lg);
}

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

.nav-menu li {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-menu.active li {
    opacity: 1;
    transform: none;
}

.nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
.nav-menu.active li:nth-child(2) { transition-delay: 0.15s; }
.nav-menu.active li:nth-child(3) { transition-delay: 0.2s; }
.nav-menu.active li:nth-child(4) { transition-delay: 0.25s; }

.nav-menu .nav-link {
    font-size: 1.4rem;
    padding: var(--space-sm) 0;
}

.nav-menu .nav-link.active {
    color: var(--color-brand-red);
}

/* --- Mobile overlay --- */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base),
                visibility var(--transition-base);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Navbar mobile polish --- */
.navbar {
    background: rgba(10, 10, 10, 0.9);
}

.nav-logo img {
    height: 40px;
}

.nav-logo-text {
    font-size: var(--font-size-base);
}

/* --- Hero mobile --- */
.hero {
    padding: calc(var(--nav-height) + var(--space-xl)) var(--space-md) var(--space-2xl);
}

.hero-content {
    padding: var(--space-lg);
}

.hero-content h1 {
    font-size: 1.6rem;
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

.hero-content p {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
}

.hero-cta {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.hero-cta .btn {
    width: 100%;
    max-width: 260px;
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.8rem;
}

/* --- Page hero mobile --- */
.page-hero {
    min-height: 25vh;
    padding: calc(var(--nav-height) + var(--space-lg)) var(--space-md) var(--space-lg);
}

.page-hero h1 {
    font-size: var(--font-size-xl);
}

.breadcrumb {
    font-size: 0.75rem;
}

/* --- Section padding mobile --- */
.section {
    padding: var(--space-xl) 0;
}

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

.section-header h2 {
    font-size: 1.3rem;
}

.section-header p {
    font-size: var(--font-size-sm);
    padding: 0 var(--space-sm);
}

/* --- Grids: all single column on mobile --- */
.services-grid,
.gallery-grid,
.stats-grid,
.contact-cards,
.about-content,
.brands-grid,
.values-grid,
.footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

/* Gallery preview always 2 cols */
.gallery-grid--preview {
    grid-template-columns: repeat(2, 1fr) !important;
}

/* --- Cards mobile --- */
.service-card,
.stat-card,
.contact-card,
.value-card,
.brand-card {
    padding: var(--space-lg);
}

.service-card .card-icon,
.value-card .card-icon,
.contact-card .card-icon {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-md);
}

.service-card h3,
.value-card h3 {
    font-size: var(--font-size-base);
}

.service-card p,
.value-card p,
.brand-card p {
    font-size: 0.8rem;
}

/* --- Stats mobile --- */
.stat-number {
    font-size: var(--font-size-2xl);
}

.stat-label {
    font-size: 0.7rem;
}

/* --- About image mobile --- */
.about-image {
    max-height: 250px;
    border-radius: var(--border-radius-md);
}

.about-text h2 {
    font-size: 1.3rem;
}

.about-text p {
    font-size: var(--font-size-sm);
}

/* --- CTA mobile --- */
.cta-section h2 {
    font-size: 1.3rem;
}

.cta-section p {
    font-size: var(--font-size-sm);
}

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

.cta-buttons .btn {
    width: 100%;
    max-width: 260px;
}

/* --- Footer mobile --- */
.footer-grid {
    gap: var(--space-xl);
    text-align: center;
}

.footer-brand p {
    margin: 0 auto;
}

.footer-brand .nav-logo {
    justify-content: center;
}

.footer-contact-item {
    justify-content: center;
}

.footer-links {
    align-items: center;
}

.site-footer {
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-bottom {
    font-size: 0.7rem;
}

/* --- Floating buttons mobile --- */
.floating-buttons {
    bottom: var(--space-md);
    right: var(--space-md);
    gap: var(--space-sm);
}

.floating-btn {
    width: 48px;
    height: 48px;
}

.floating-btn svg {
    width: 20px;
    height: 20px;
}

.floating-btn .tooltip {
    display: none;
}

/* --- Map mobile --- */
.map-container {
    aspect-ratio: 4/3;
}

.map-bar {
    height: 200px;
}

.map-reviews-badge {
    font-size: 0.7rem;
    padding: 6px 10px;
    top: var(--space-sm);
    right: var(--space-sm);
}

.map-reviews-badge svg {
    width: 14px;
    height: 14px;
}

/* --- Lightbox mobile --- */
.lightbox-content {
    max-width: 95vw;
}

.lightbox-nav {
    width: 36px;
    height: 36px;
}

.lightbox-prev {
    left: var(--space-xs);
}

.lightbox-next {
    right: var(--space-xs);
}

.lightbox-close {
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
}

.lightbox-counter {
    font-size: 0.75rem;
}

/* --- Hours table mobile --- */
.hours-table {
    font-size: var(--font-size-sm);
}

/* --- Gallery card mobile --- */
.gallery-card {
    aspect-ratio: 3/2;
}

/* ========================
   SMALL PHONES - 375px+
   ======================== */
@media (min-width: 375px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

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

    .stat-card {
        padding: var(--space-md);
    }
}

/* ========================
   TABLET - 768px+
   ======================== */
@media (min-width: 768px) {
    /* Navbar */
    .nav-logo img {
        height: 48px;
    }

    .nav-logo-text {
        font-size: var(--font-size-lg);
    }

    /* Hero */
    .hero-content h1 {
        font-size: var(--font-size-3xl);
    }

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

    .hero-cta {
        flex-direction: row;
        gap: var(--space-md);
    }

    .hero-cta .btn {
        width: auto;
        max-width: none;
        font-size: var(--font-size-sm);
    }

    .page-hero {
        min-height: 30vh;
    }

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

    .breadcrumb {
        font-size: var(--font-size-sm);
    }

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

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

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

    /* Grids: 2 columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

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

    .about-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

    .about-image {
        max-height: none;
    }

    .about-text h2 {
        font-size: var(--font-size-2xl);
    }

    .about-text p {
        font-size: var(--font-size-base);
    }

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

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

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

    .footer-brand .nav-logo {
        justify-content: flex-start;
    }

    .footer-brand p {
        margin: 0;
    }

    .footer-contact-item {
        justify-content: flex-start;
    }

    .footer-links {
        align-items: flex-start;
    }

    .footer-bottom {
        font-size: var(--font-size-sm);
    }

    /* Cards */
    .service-card,
    .stat-card,
    .contact-card,
    .value-card,
    .brand-card {
        padding: var(--space-2xl);
    }

    .service-card .card-icon,
    .value-card .card-icon,
    .contact-card .card-icon {
        width: 48px;
        height: 48px;
    }

    /* Stats */
    .stat-number {
        font-size: var(--font-size-3xl);
    }

    /* CTA */
    .cta-section h2 {
        font-size: var(--font-size-2xl);
    }

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

    .cta-buttons {
        flex-direction: row;
    }

    .cta-buttons .btn {
        width: auto;
        max-width: none;
    }

    /* Map */
    .map-container {
        aspect-ratio: 16/9;
    }

    .map-bar {
        height: 300px;
    }

    .map-reviews-badge {
        font-size: var(--font-size-sm);
        padding: var(--space-sm) var(--space-lg);
    }

    .map-reviews-badge svg {
        width: 18px;
        height: 18px;
    }

    /* Floating buttons */
    .floating-btn {
        width: 52px;
        height: 52px;
    }

    .floating-btn svg {
        width: 22px;
        height: 22px;
    }

    /* Lightbox */
    .lightbox-prev {
        left: var(--space-xl);
    }

    .lightbox-next {
        right: var(--space-xl);
    }

    /* Gallery card */
    .gallery-card {
        aspect-ratio: 4/3;
    }
}

/* ========================
   DESKTOP - 1024px+
   ======================== */
@media (min-width: 1024px) {
    /* Navbar: switch to horizontal - menu moves inside navbar visually */
    .nav-toggle {
        display: none !important;
        position: absolute !important;
        visibility: hidden !important;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        height: var(--nav-height);
        background: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        transform: none;
        gap: var(--space-xl);
        padding: 0 calc((100% - var(--container-max)) / 2 + var(--space-lg)) 0 0;
        z-index: 1001;
    }

    .nav-menu li {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .nav-menu .nav-link {
        font-size: var(--font-size-sm);
        padding: var(--space-xs) 0;
    }

    .nav-overlay {
        display: none;
    }

    .navbar {
        background: transparent;
    }

    .navbar.nav-scrolled {
        background: rgba(10, 10, 10, 0.95);
    }

    /* Hero */
    .hero {
        padding: 0;
    }

    .hero-content {
        padding: var(--space-3xl);
        max-width: 800px;
    }

    .hero-content h1 {
        font-size: var(--font-size-hero);
        line-height: 1.15;
    }

    .hero-content p {
        font-size: var(--font-size-lg);
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Page hero */
    .page-hero {
        min-height: 35vh;
    }

    /* Section */
    .section {
        padding: var(--space-section) 0;
    }

    /* Gallery: 3 columns */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Services: 2 cols on desktop */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Floating buttons: full size */
    .floating-btn {
        width: 56px;
        height: 56px;
    }

    .floating-btn svg {
        width: 24px;
        height: 24px;
    }

    .floating-btn .tooltip {
        display: block;
    }

    /* Map bar bigger */
    .map-bar {
        height: 350px;
    }

    /* Lightbox */
    .lightbox-prev {
        left: var(--space-2xl);
    }

    .lightbox-next {
        right: var(--space-2xl);
    }
}

/* ========================
   LARGE DESKTOP - 1280px+
   ======================== */
@media (min-width: 1280px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

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

    .hero-content h1 {
        font-size: 4rem;
    }

    .map-bar {
        height: 400px;
    }
}
