/* 
    Mercedes-Benz vs BMW Okul Projesi - Final Versiyon
    Modern, Lüks ve Zengin İçerikli Tasarım
*/

:root {
    --bg-dark: #050505;
    --bg-card: #121212;
    --text-light: #ffffff;
    --text-muted: #a0a0a0;
    --accent-mercedes: #00adef;
    --accent-bmw: #0066b2;
    --accent-red: #ff3b30;
    --gray-dark: #1c1c1e;
    --gray-light: #3a3a3c;
    --gold: #d4af37;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Logo Tasarımı */
.logo {
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
    padding-left: 15px;
    display: inline-flex;
    align-items: center;
}

.logo .mb {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    font-family: 'Orbitron', sans-serif;
}

.logo .vs {
    font-size: 1rem;
    color: var(--accent-red);
    margin: 0 8px;
    font-style: italic;
    text-shadow: 0 0 8px rgba(255, 59, 48, 0.6);
}

.logo .bmw {
    color: var(--accent-bmw);
    text-shadow: 0 0 5px rgba(0, 102, 178, 0.8);
    font-family: 'Orbitron', sans-serif;
}

/* Header & Navigation */
header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10000; /* Her zaman en üstte */
    border-bottom: 1px solid var(--gray-dark);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    position: relative;
    margin: 0 15px;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    padding: 10px 0;
    display: block;
}

nav a:hover {
    color: var(--accent-mercedes);
}

/* Spry Dropdown Menu - Fixed */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--gray-dark);
    min-width: 220px;
    box-shadow: 0px 15px 30px rgba(0,0,0,0.8);
    z-index: 10001;
    top: 100%;
    left: 0;
    border-radius: 0 0 8px 8px;
    border: 1px solid var(--gray-light);
    overflow: hidden;
}

.dropdown-content a {
    padding: 12px 20px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dropdown-content a:hover {
    background: rgba(255,255,255,0.1);
    padding-left: 25px;
}

.dropdown:hover .dropdown-content {
    display: block !important;
}

/* Modern Saat, Hava Durumu ve Takvim */
.header-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    position: relative;
}

.clock-weather-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#clock {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-mercedes);
    text-shadow: 0 0 10px rgba(0, 173, 239, 0.5);
    font-weight: bold;
    letter-spacing: 1px;
}

/* Hava Durumu Widget */
#weather-widget {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 173, 239, 0.08);
    border: 1px solid rgba(0, 173, 239, 0.2);
    border-radius: 20px;
    padding: 3px 10px;
    cursor: default;
    transition: background 0.3s;
}

#weather-widget:hover {
    background: rgba(0, 173, 239, 0.15);
}

#weather-icon {
    font-size: 1rem;
    line-height: 1;
}

#weather-temp {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    color: var(--accent-mercedes);
    font-weight: 700;
    text-shadow: 0 0 6px rgba(0,173,239,0.4);
}

/* Tıklanabilir Takvim */
#calendar {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 10px;
    transition: color 0.25s, background 0.25s;
    user-select: none;
    position: relative;
}

#calendar:hover {
    color: var(--accent-mercedes);
    background: rgba(0,173,239,0.08);
}

#calendar::after {
    content: ' 📅';
    font-size: 0.7rem;
    opacity: 0.6;
}

/* Mini Takvim Popup */
#mini-calendar-popup {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: rgba(10, 10, 10, 0.97);
    border: 1px solid rgba(0, 173, 239, 0.3);
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8), 0 0 20px rgba(0,173,239,0.08);
    z-index: 20000;
    padding: 14px;
    animation: calendarFadeIn 0.2s ease;
    backdrop-filter: blur(16px);
}

#mini-calendar-popup.active {
    display: block;
}

@keyframes calendarFadeIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

#mini-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

#cal-month-year {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    color: var(--accent-mercedes);
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    flex: 1;
}

#mini-cal-header button {
    background: rgba(0,173,239,0.1);
    border: 1px solid rgba(0,173,239,0.25);
    border-radius: 6px;
    color: var(--accent-mercedes);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 3px 9px;
    line-height: 1;
    transition: background 0.2s;
}

#mini-cal-header button:hover {
    background: rgba(0,173,239,0.25);
}

#mini-cal-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
}

#mini-cal-days-header span {
    text-align: center;
    font-size: 0.62rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 2px 0;
}

#mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    text-align: center;
    padding: 5px 2px;
    font-size: 0.72rem;
    border-radius: 6px;
    cursor: default;
    color: #ccc;
    transition: background 0.15s;
    line-height: 1.4;
}

.cal-day:hover {
    background: rgba(255,255,255,0.06);
}

.cal-day.other-month {
    color: #444;
}

.cal-day.today {
    background: var(--accent-mercedes);
    color: #000;
    font-weight: 900;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,173,239,0.5);
}

.cal-day.weekend {
    color: rgba(0,173,239,0.7);
}

.cal-day.today.weekend {
    color: #000;
}

/* Ticker - Fixed Animation */
.ticker-wrap {
    margin-top: 80px;
    background: #111;
    border-bottom: 1px solid #222;
    overflow: hidden;
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker-move 30s linear infinite;
}

@keyframes ticker-move {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.ticker-item {
    padding: 0 50px;
    color: var(--accent-red);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1;
    text-shadow: 2px 2px 20px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 30px;
    font-weight: 300;
}

/* Content Sections */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 0;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-mercedes);
    margin: 20px auto 0;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--gray-dark);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover {
    transform: translateY(-15px);
    border-color: var(--accent-mercedes);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background: #111;
}

.card-content {
    padding: 30px;
}

/* Footer */
footer {
    background: #000;
    padding: 80px 0 40px;
    border-top: 1px solid var(--gray-dark);
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--accent-mercedes);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
}

/* Popup Ad */
#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
    z-index: 99999;
    border: 2px solid var(--accent-red);
    text-align: center;
    animation: popup-appear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popup-appear {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

#popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 99998;
}

/* =============================================
   HAMBURGER MENU (Mobile)
   ============================================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    z-index: 10002;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =============================================
   TABLET (max 1024px)
   ============================================= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3.5rem; }
    .section-title { font-size: 2.2rem; }
    .card-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
    .nav-container { width: 95%; }
    nav ul li { margin: 0 8px; }
    nav a { font-size: 0.85rem; }
    .header-info { display: none; }
}

/* =============================================
   MOBILE (max 768px)
   ============================================= */
@media (max-width: 768px) {

    /* --- Hamburger aktif --- */
    .hamburger { display: flex; }

    /* --- Nav kapalı varsayılan --- */
    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #0a0a0a;
        border-right: 1px solid var(--gray-dark);
        z-index: 10001;
        transition: left 0.35s ease;
        overflow-y: auto;
        padding: 80px 0 30px;
    }

    nav.open { left: 0; }

    nav ul {
        flex-direction: column;
        padding: 0 20px;
    }

    nav ul li {
        margin: 0;
        border-bottom: 1px solid var(--gray-dark);
    }

    nav a {
        padding: 14px 0;
        font-size: 1rem;
    }

    /* Dropdown mobilde tıklanabilir */
    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        background: #111;
        border-radius: 8px;
        margin: 8px 0;
        border: none;
    }

    .dropdown.open .dropdown-content { display: block; }

    .dropdown > a::after {
        content: ' ▾';
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    /* Nav overlay (arka plan kapatma) */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.6);
        z-index: 10000;
    }
    .nav-overlay.open { display: block; }

    /* --- Header --- */
    .header-info { display: none; }
    .logo { font-size: 1.3rem; }

    /* --- Hero --- */
    .hero { height: auto; min-height: 100svh; padding: 110px 20px 60px; }
    .hero h1 { font-size: 2.4rem; letter-spacing: -1px; }
    .hero p { font-size: 1.1rem; }
    .hero-content { max-width: 100%; }

    /* --- Ticker --- */
    .ticker-wrap { margin-top: 70px; }

    /* --- Cards --- */
    .card-grid { grid-template-columns: 1fr; gap: 20px; }
    .card img { 
        height: auto; 
        max-height: 250px; 
        object-fit: contain; 
        background: #111; 
    }

    /* --- Section --- */
    .container { padding: 50px 0; }
    .section-title { font-size: 1.8rem; margin-bottom: 30px; }

    /* --- Hero cards (anasayfa) --- */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    /* --- Comparison table selects --- */
    div[style*="display: flex; gap: 10px"] {
        flex-direction: column !important;
    }

    /* --- Page nav buttons --- */
    .page-nav { flex-direction: column !important; gap: 12px !important; align-items: center !important; }

    /* --- Footer --- */
    footer .footer-content,
    .container.footer-content {
        flex-direction: column !important;
        text-align: center;
        gap: 15px;
    }

    /* --- Map iframe --- */
    iframe { max-width: 100%; }

    /* --- Video --- */
    video { width: 100%; }

    /* --- Content grids --- */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    div[style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* =============================================
   SMALL MOBILE (max 480px)
   ============================================= */
@media (max-width: 480px) {
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 0.95rem; }
    .section-title { font-size: 1.5rem; }
    .logo { font-size: 1.1rem; padding-left: 8px; }
    .card-content { padding: 18px; }
    .card img { 
        height: auto; 
        max-height: 220px; 
    }
}
