﻿/* ==========================================================================
    File        : map.css
    Component   : Map Section
    Version     : 1.0
    Description : Google Maps + Contact Information Component
========================================================================== */
/* ==========================================================================
   CSS VARIABLES
========================================================================== */
.map-section {
    /*--------------------------------------------------------------
        Brand Colors
    --------------------------------------------------------------*/
    --map-primary: #d7261e;
    --map-primary-dark: #b91c16;
    --map-secondary: #1f2937;
    --map-accent: #ffb000;
    --map-success: #16a34a;
    /*--------------------------------------------------------------
        Background
    --------------------------------------------------------------*/
    --map-bg: #f8f9fa;
    --map-card-bg: #ffffff;
    --map-text: #222222;
    --map-text-light: #6b7280;
    /*--------------------------------------------------------------
        Border
    --------------------------------------------------------------*/
    --map-border: #e5e7eb;
    /*--------------------------------------------------------------
        Shadow
    --------------------------------------------------------------*/
    --map-shadow: 0 20px 45px rgba(0,0,0,.12);
    --map-shadow-hover: 0 30px 65px rgba(0,0,0,.18);
    /*--------------------------------------------------------------
        Radius
    --------------------------------------------------------------*/
    --map-radius-lg: 24px;
    --map-radius-md: 16px;
    --map-radius-sm: 10px;
    /*--------------------------------------------------------------
        Spacing
    --------------------------------------------------------------*/
    --map-section-padding-y: 3rem;
    --map-content-gap: 30px;
    /*--------------------------------------------------------------
        Animation
    --------------------------------------------------------------*/
    --map-transition: .35s cubic-bezier(.4,0,.2,1);
    /*--------------------------------------------------------------
        Typography
    --------------------------------------------------------------*/
    --map-font: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}



/* ==========================================================================
   ROOT SECTION
========================================================================== */
.map-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    font-family: var(--map-font);
}

    /* ==========================================================================
   CONTAINER
========================================================================== */
    /* Bootstrap container kullanıyoruz. Ancak bileşenin kendi içinde maksimum genişlik kontrolü olması için ekstra wrapper desteği. */
    .map-section .container {
        position: relative;
        z-index: 1;
    }

/* ==========================================================================
   SECTION BACKGROUND
========================================================================== */
.map-section {
    background: white;
}
    /* Hafif premium görünüm için üst-alt yumuşak ayrım. */
    .map-section::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        background: radial-gradient( circle at top left, rgba(215,38,30,.04), transparent 35% );
    }

/* ==========================================================================
   SPACING
========================================================================== */
.map-section {
    padding-top: var(--map-section-padding-y);
    padding-bottom: var(--map-section-padding-y);
}
    /* Başlık ve içerik arasında kontrollü boşluk. */
    .map-section .row + .row {
        margin-top: var(--map-content-gap);
    }

/* SEO açıklama alanı için ekstra mesafe. */
.map-section__seo {
    margin-top: 48px;
}

/* ==========================================================================
   SECTION HEADER
========================================================================== */
/* Eyebrow Küçük üst başlık etiketi */
.map-section__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(215,38,30,.08);
    color: var(--map-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 18px;
}
    /* Küçük dekoratif nokta Örneğin: ● BİZE ULAŞIN */
    .map-section__eyebrow::before {
        content: "";
        width: 7px;
        height: 7px;
        margin-right: 8px;
        border-radius: 50%;
        background: var(--map-primary);
    }

/* Title */
.map-section__title {
    margin: 0;
    color: var(--map-secondary);
    line-height: 1.15;
    letter-spacing: -.02em;
}
    /* Title altındaki vurgu Gerektiğinde: Karabük'ün Her Noktasına Hızlı Yol Yardımı */
    .map-section__title strong {
        color: var(--map-primary);
    }

/* Description */
.map-section__description {
    max-width: 760px;
    margin: 20px auto 0;
    color: var(--map-text-light);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
}

/* Header Responsive */
@media (max-width:768px) {
    .map-section__eyebrow {
        font-size: 12px;
        padding: 7px 15px;
    }

    .map-section__title {
        font-size: 30px;
        line-height: 1.2;
    }

    .map-section__description {
        font-size: 15px;
        line-height: 1.65;
        padding: 0 10px;
    }
}

/* ==========================================================================
   7 - GOOGLE MAP AREA
========================================================================== */
/* Map Wrapper */
.map-section__map-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 460px;
    overflow: hidden;
    border-radius: var(--map-radius-lg);
    background: #e5e7eb;
    box-shadow: var(--map-shadow);
    transition: transform var(--map-transition), box-shadow var(--map-transition);
}
    /* Harita üzerine gelindiğinde hafif premium hareket transform kullanıyoruz. Çünkü GPU hızlandırmalıdır. */
    .map-section__map-wrapper:hover {
        transform: translateY(-6px);
        box-shadow: var(--map-shadow-hover);
    }

/* Google Maps iframe */
.map-section__iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 460px;
    border: 0;
    filter: saturate(.95);
}

/* Hover sırasında iframe'e zoom vermiyoruz. Sebebi: iframe içerisindeki Google Maps kendi gesture sistemine sahip. Wrapper hareketi daha performanslıdır. */

/* Map Overlay */
/* Harita üzerinde çok hafif marka renk dokunuşu */
.map-section__map-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient( 180deg, rgba(255,255,255,.04), rgba(0,0,0,.04) );
}

/* Loading / Empty State Support */
/* İleride JS ile lazy loading kullanırsak hazır alan */
.map-section__map-wrapper.is-loading {
    background: linear-gradient( 110deg, #eeeeee 8%, #f5f5f5 18%, #eeeeee 33% );
    background-size: 200% 100%;
    animation: map-loading 1.4s infinite;
}

@keyframes map-loading {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

/* Responsive */
@media (max-width:992px) {
    .map-section__map-wrapper {
        min-height: 400px;
    }

    .map-section__iframe {
        min-height: 400px;
    }
}

@media (max-width:768px) {
    .map-section__map-wrapper {
        min-height: 340px;
        border-radius: var(--map-radius-md);
    }

    .map-section__iframe {
        min-height: 340px;
    }
}

@media (max-width:480px) {
    .map-section__map-wrapper {
        min-height: 300px;
    }

    .map-section__iframe {
        min-height: 300px;
    }
}


/* ==========================================================================
   CONTACT CARD
========================================================================== */
/* Main Card */
.map-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--map-card-bg);
    border: 1px solid var(--map-border);
    border-radius: var(--map-radius-lg);
    padding: 32px;
    box-shadow: var(--map-shadow);
    transition: transform var(--map-transition), box-shadow var(--map-transition);
}

    /* Kart hover efekti */
    .map-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--map-shadow-hover);
    }

/* Card Header */
.map-card__header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Badge */
.map-card__badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(22,163,74,.1);
    color: var(--map-success);
    font-size: 13px;
    font-weight: 700;
}

    /* Badge ikonu */
    .map-card__badge::before {
        content: "●";
        margin-right: 8px;
        font-size: 12px;
    }

/* Card Title */
.map-card__title {
    margin: 0;
    color: var(--map-secondary);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

/* Card Subtitle */
.map-card__subtitle {
    margin: 0;
    color: var(--map-text-light);
    font-size: 15px;
    line-height: 1.6;
}

/* Body */
.map-card__body {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 32px;
}

/* Information Items */
.map-card__item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Icons */
.map-card__icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(215,38,30,.08);
    font-size: 22px;
}

/* Item Content */
.map-card__item h4 {
    margin: 0 0 5px;
    color: var(--map-secondary);
    font-size: 15px;
    font-weight: 700;
}

.map-card__item p,
.map-card__item a {
    margin: 0;
    color: var(--map-text-light);
    font-size: 14px;
    line-height: 1.6;
}

.map-card__item a {
    color: var(--map-primary);
    font-weight: 700;
}

    /* Telefon hover */
    .map-card__item a:hover {
        color: var(--map-primary-dark);
    }

/* Footer Button Area */
.map-card__footer {
    margin-top: auto;
    padding-top: 32px;
}

/* Google Direction Button */
.map-card__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    border-radius: 14px;
    background: var(--map-accent);
    color: #1f2937;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    transition: transform var(--map-transition), background var(--map-transition), box-shadow var(--map-transition);
}

    /* Button Hover */
    .map-card__button:hover {
        background: #ffc133;
        transform: translateY(-3px);
        box-shadow: 0 12px 25px rgba(255,176,0,.3);
        color: #1f2937;
    }

/* Responsive */
@media(max-width:768px) {

    .map-card {
        padding: 24px;
        border-radius: var(--map-radius-md);
    }

    .map-card__title {
        font-size: 24px;
    }

    .map-card__body {
        gap: 18px;
    }
}

/* ==========================================================================
   SEO CONTENT BLOCK
========================================================================== */
/* Google ve kullanıcı için harita altında açıklama alanı */
.map-section__seo {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--map-text-light);
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
}

    .map-section__seo strong {
        color: var(--map-secondary);
    }

/* 10 - LARGE TABLET OPTIMIZATION */
@media (max-width:1200px) {
    .map-card {
        padding: 28px;
    }

    .map-card__title {
        font-size: 26px;
    }
}

/* ==========================================================================
   MOBILE LAYOUT
========================================================================== */
@media(max-width:768px) {
    .map-section {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    .map-section__seo {
        font-size: 14px;
        padding: 0 15px;
    }

    .map-card__button {
        min-height: 52px;
        font-size: 15px;
    }
}

/* ==========================================================================
   SMALL MOBILE (320px)
========================================================================== */
@media(max-width:360px) {
    .map-card {
        padding: 20px;
    }

    .map-card__title {
        font-size: 22px;
    }

    .map-card__item {
        gap: 10px;
    }

    .map-card__icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }

    .map-section__description {
        font-size: 14px;
    }
}

/* ==========================================================================
   DARK MODE
========================================================================== */
/* Sistem karanlık moda geçtiğinde Kullanıcı tercihini takip eder.*/
/*@media(prefers-color-scheme:dark) {
    .map-section {
        --map-bg: #111827;
        --map-card-bg: #1f2937;
        --map-secondary: #f9fafb;
        --map-text: #f3f4f6;
        --map-text-light: #cbd5e1;
        --map-border: rgba(255,255,255,.12);
        --map-shadow: 0 20px 45px rgba(0,0,0,.45);
        --map-shadow-hover: 0 30px 70px rgba(0,0,0,.65);
    }

    .map-section__map-wrapper {
        background: #374151;
    }

    .map-card__button {
        color: #111827;
    }
}*/

/* ==========================================================================
   REDUCED MOTION
========================================================================== */
/* Hareket hassasiyeti olan kullanıcılar için. WCAG uyumluluğu açısından önemlidir. */
@media(prefers-reduced-motion:reduce) {
    .map-section *,
    .map-section *::before,
    .map-section *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   HIGH DPI / RETINA OPTIMIZATION
========================================================================== */
@media(-webkit-min-device-pixel-ratio:2), (min-resolution:192dpi) {
    .map-section__map-wrapper {
        border-width: .5px;
    }

    .map-card {
        border-width: .5px;
    }
}

/* ==========================================================================
   PRINT
========================================================================== */
/* Yazdırma sırasında gereksiz efektleri kaldır. */
@media print {
    .map-section {
        background: #ffffff !important;
        padding: 20px 0;
    }

    .map-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .map-section__map-wrapper {
        box-shadow: none;
    }

    .map-card__button {
        display: none;
    }
}