/* =========================================================
   ①  GLOBAL & RESET
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #f4f6f8;
    --bg-dark: #0f141f;
    --pri: #4f8cff;
    --pri-dark: #1b4bff;
    --txt: #1f2937;
    --txt-dark: #f7f8fa;
    --muted: #8d95a6;
    --success: #28a745;
    --danger: #dc3545;
    --warn: #f0ad4e;
    --rad: 12px;
    --sh: 0 4px 16px rgba(0, 0, 0, .1);
    --t: .3s ease;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--txt);
    transition: background var(--t), color var(--t);
}

body.dark {
    background: var(--bg-dark);
    color: var(--txt-dark);
}

/* =========================================================
   ②  NAVBAR
   ========================================================= */
.nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    box-shadow: var(--sh);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pri);
}

.links a {
    margin-left: 1rem;
    text-decoration: none;
    color: inherit;
    transition: color var(--t);
}

.links a:hover,
.links .active {
    color: var(--pri);
}

.toggle {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
}

/* =========================================================
   ③  HERO (ANASAYFA)
   ========================================================= */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    background: url('https://source.unsplash.com/1600x900/?city') center/cover fixed;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: auto;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: #eee;
    margin-bottom: 1.5rem;
}

/* =========================================================
   ④  SECTIONS & TITLES
   ========================================================= */
.sec {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.sec-title {
    font-size: 2rem;
    color: var(--pri);
    margin-bottom: 1rem;
    position: relative;
}

.sec-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 4px;
    background: var(--pri);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}

.sec-title:hover::after {
    transform: scaleX(1);
}

/* =========================================================
   ⑤  FILTER BAR
   ========================================================= */
.filter {
    max-width: 680px;
    margin: 1.5rem auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .8rem;
    background: #fff;
    padding: 1.2rem;
    border-radius: var(--rad);
    box-shadow: var(--sh);
}

.filter select,
.filter button {
    flex: 1 1 150px;
    padding: .6rem 1rem;
    border: 1px solid #c6cee0;
    border-radius: var(--rad);
    transition: border-color var(--t);
}

.filter select:focus {
    outline: none;
    border-color: var(--pri);
}

.filter button {
    background: var(--pri);
    color: #fff;
    border: none;
    cursor: pointer;
}

.filter button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* =========================================================
   ⑥  MAP WRAPPER
   ========================================================= */
.map {
    width: 90%;
    max-width: 1200px;
    height: 60vh;
    margin: 1.5rem auto;
    border-radius: var(--rad);
    overflow: hidden;
    box-shadow: var(--sh);
    filter: brightness(1);
}

/* =========================================================
   ⑦  LEAFLET POP‑UPS
   ========================================================= */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: var(--rad);
    box-shadow: var(--sh);
    background: #fff;
}

.custom-popup .leaflet-popup-content {
    font-size: .93rem;
    line-height: 1.4;
    padding: .3rem .5rem;
}

.custom-popup h4 {
    margin: .3rem 0 .4rem;
    color: var(--pri);
}

.custom-popup p {
    margin: .25rem 0;
}

.btn-pri {
    display: inline-block;
    margin-top: .4rem;
    padding: .4rem .9rem;
    background: var(--pri);
    color: #fff;
    border-radius: var(--rad);
    text-decoration: none;
    transition: background var(--t);
}

.btn-pri:hover {
    background: var(--pri-dark);
}

.popup-timer {
    font-family: monospace;
    font-size: .85rem;
    background: #f7f7f7;
    border: 1px solid #ddd;
    padding: .3rem .5rem;
    border-radius: var(--rad);
    display: inline-block;
}

/* =========================================================
   ⑧  DETAIL / QR / SAYAÇ
   ========================================================= */
#detail {
    background: #fff;
    padding: 2rem 1rem;
    margin-top: 1rem;
    border-radius: var(--rad);
    box-shadow: var(--sh);
}

#qr {
    text-align: center;
    margin-bottom: 1rem;
}

.det-title {
    text-align: center;
    margin-bottom: 1rem;
}

.timer-row {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.timer {
    font-family: monospace;
    background: var(--pri);
    color: #fff;
    padding: .6rem 1rem;
    border-radius: var(--rad);
    box-shadow: var(--sh);
}

.warn {
    margin-left: .5rem;
    color: var(--danger);
    font-size: 1.2rem;
}

/* =========================================================
   ⑨  FORMS GALLERY (FORMS.HTML)
   ========================================================= */
.form-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem auto;
    max-width: 1000px;
}

.form-gallery img {
    width: 45%;
    max-width: 400px;
    min-width: 280px;
    display: block;
    margin: .5rem auto;
    border-radius: var(--rad);
    transition: transform var(--t);
}

.form-gallery img:hover {
    transform: scale(1.05);
}

/* =========================================================
   ⑩  BUTTON UTILITIES
   ========================================================= */
.btn {
    display: inline-block;
    padding: .8rem 1.6rem;
    border-radius: var(--rad);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--t), transform var(--t);
}

.btn-outline {
    background: transparent;
    color: var(--pri);
    border: 2px solid var(--pri);
}

.btn-outline:hover {
    background: var(--pri);
    color: #fff;
}

/* =========================================================
   ⑪  FADE‑IN UTILITY
   ========================================================= */
.fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s var(--t), transform .5s var(--t);
}

.fade.show {
    opacity: 1;
    transform: none;
}

/* =========================================================
   ⑫  BACK‑TO‑TOP BUTTON
   ========================================================= */
#top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    background: var(--pri);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--sh);
    opacity: 0;
    transform: scale(0);
    transition: .3s;
}

#top.show {
    opacity: 1;
    transform: scale(1);
}

/* =========================================================
   ⑬  FOOTER
   ========================================================= */
footer {
    text-align: center;
    padding: 2rem 1rem;
    background: #fff;
    box-shadow: var(--sh);
    margin-top: 2rem;
}

/* =========================================================
   ⑭  COPYRIGHT (EN ALTA)
   ========================================================= */
.site‑copyright {
    text-align: center;
    padding: .8rem 1rem;
    color: var(--muted);
    font-size: .9rem;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .05);
}

/* =========================================================
   ⑮  SAYFA ÖZEL STİLLER
   ========================================================= */
/* — Anasayfa Kartları — */
.feature {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: var(--rad);
    box-shadow: var(--sh);
    text-align: center;
    transition: transform var(--t), box-shadow var(--t);
}

.feature:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.feature .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--pri);
    filter: drop-shadow(0 0 6px rgba(128, 164, 255, .4));
}

/* — Hakkımızda Kart Izgarası — */
.about-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    margin-top: 1rem;
}

.about-grid .card {
    background: #fff;
    padding: 1.8rem 1.2rem;
    border-radius: var(--rad);
    box-shadow: var(--sh);
    transition: transform var(--t), box-shadow var(--t);
}

.about-grid .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.about-grid .card h3 {
    margin-bottom: .8rem;
    color: var(--pri);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.about-grid .card p {
    line-height: 1.5;
}

/* — Mevzuatlar Sayfası — */
.regulations .card {
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--pri);
    box-shadow: var(--sh);
    transition: border-color var(--t), box-shadow var(--t);
}

.regulations .card:hover {
    border-left-color: var(--pri-dark);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.regulations .card h3 {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.2rem;
    color: var(--txt);
}

.regulations .card p {
    margin-top: .6rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .feature .icon {
        font-size: 2.4rem;
    }
}