:root{
    --bg:#f5f7fb;
    --card:#fff;
    --text:#172033;
    --muted:#667085;
    --primary:#2563eb;
    --green:#16a34a;
    --border:#e5e7eb;
    --shadow:0 20px 50px rgba(15,23,42,.08)
}

body.dark{
    --bg:#0f172a;
    --card:#1e293b;
    --text:#f8fafc;
    --muted:#cbd5e1;
    --border:#334155;
    --shadow:0 20px 50px rgba(0,0,0,.25)
}

*{
    box-sizing:border-box
}

body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    background:var(--bg);
    color:var(--text)
}

a{
    text-decoration:none;
    color:inherit
}

main{
    min-height:calc(100vh - 170px)
}

.navbar{
    position:sticky;
    top:0;
    z-index:10;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:14px 6%;
    background:rgba(255,255,255,.85);
    backdrop-filter:blur(12px);
    border-bottom:1px solid var(--border)
}

body.dark .navbar{
    background:rgba(15,23,42,.85)
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:800;
    font-size:20px
}

.brand img{
    width:46px;
    height:46px;
    border-radius:12px;
    object-fit:cover
}

.nav-links{
    display:flex;
    gap:12px;
    align-items:center
}

.nav-links a{
    padding:10px 12px;
    border-radius:12px;
    color:var(--muted);
    font-weight:700
}

.nav-links a:hover{
    background:var(--border);
    color:var(--text)
}

.theme-toggle,.hamburger{
    border:1px solid var(--border);
    background:var(--card);
    color:var(--text);
    padding:10px 12px;
    border-radius:12px;
    cursor:pointer
}

.hamburger{
    display:none
}

.hero{
    display:grid;
    grid-template-columns:1.3fr .7fr;
    gap:28px;
    align-items:center;
    padding:70px 8%
}

.hero h1{
    font-size:52px;
    margin:0 0 18px
}

.hero p{
    font-size:19px;
    color:var(--muted);
    line-height:1.7
}

.hero-card,.feature-card,.form-card,.filter-card,.info-card,.person-card,.detail-card,.comments-card,.contact-card,.admin-section{
    background:var(--card);
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    border-radius:28px;
    padding:26px
}

.hero-card{
    text-align:center
}

.hero-card img{
    width:180px;
    border-radius:28px
}

.hero-actions{
    display:flex;
    gap:12px;
    flex-wrap:wrap
}

.btn{
    display:inline-block;
    background:var(--primary);
    color:white;
    border:none;
    border-radius:14px;
    padding:13px 18px;
    font-weight:800;
    cursor:pointer
}

.btn.secondary{
    background:#475569
}

.btn.small{
    padding:10px 13px;
    font-size:14px
}

.btn.full{
    width:100%;
    text-align:center;
    margin-top:12px
}

.features,.cards-grid,.contact-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    padding:25px 8%
}

.stats{
    display:flex;
    justify-content:center;
    gap:20px;
    padding:20px 8% 60px
}

.stats div{
    text-align:center;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:22px;
    padding:20px 40px
}

.stats b{
    display:block;
    font-size:34px;
    color:var(--primary)
}

.stats span{
    color:var(--muted)
}

.page-head{
    text-align:center;
    padding:50px 8% 20px
}

.page-head h1{
    font-size:42px;
    margin:0 0 8px
}

.page-head p{
    color:var(--muted)
}

.form-card,.filter-card{
    max-width:1000px;
    margin:20px auto
}

.small-form{
    max-width:430px
}

.grid-2,.filter-card.big{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:14px
}

.filter-card{
    display:grid;
    grid-template-columns:1fr 220px 220px auto;
    gap:12px;
    align-items:end
}

input,select,textarea{
    width:100%;
    padding:14px;
    border-radius:14px;
    border:1px solid var(--border);
    background:var(--bg);
    color:var(--text);
    font-size:15px
}

textarea{
    min-height:110px;
    margin-top:12px
}

.coord-row{
    display:grid;
    grid-template-columns:1fr 190px;
    gap:10px
}

.coord-row button{
    border:0;
    border-radius:14px;
    background:var(--green);
    color:#fff;
    font-weight:800
}

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

.info-card h2,.person-card h2{
    margin-top:0
}

.person-card img,.avatar{
    width:82px;
    height:82px;
    border-radius:50%;
    object-fit:cover;
    background:var(--primary);
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:32px;
    font-weight:900
}

.card-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap
}

.empty{
    text-align:center;
    color:var(--muted);
    grid-column:1/-1
}

.detail-layout{
    display:grid;
    grid-template-columns:1.2fr .8fr;
    gap:24px;
    padding:40px 8%
}

.detail-photo{
    width:100%;
    max-height:360px;
    object-fit:cover;
    border-radius:22px
}

.qr-box{
    margin-top:16px;
    background:var(--bg);
    border:1px solid var(--border);
    padding:16px;
    border-radius:16px
}

.comment{
    border-top:1px solid var(--border);
    padding:14px 0
}

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

.admin-section{
    margin:22px 8%
}

.table-wrap{
    overflow:auto
}

table{
    width:100%;
    border-collapse:collapse
}

th,td{
    padding:12px;
    border-bottom:1px solid var(--border);
    text-align:left
}

.danger{
    color:#ef4444
}

.flash{
    max-width:900px;
    margin:18px auto 0;
    padding:14px 18px;
    background:#dcfce7;
    color:#166534;
    border-radius:14px
}

footer{
    text-align:center;
    padding:30px 8%;
    border-top:1px solid var(--border);
    color:var(--muted)
}

footer p{
    margin:5px
}

@media(max-width:900px){
    .hamburger{
        display:block
    }

    .nav-links{
        display:none;
        position:absolute;
        top:76px;
        left:0;
        right:0;
        flex-direction:column;
        background:var(--card);
        padding:18px;
        border-bottom:1px solid var(--border)
    }

    .nav-links.open{
        display:flex
    }

    .hero,.detail-layout{
        grid-template-columns:1fr;
        padding:35px 5%
    }

    .hero h1{
        font-size:36px
    }

    .features,.cards-grid,.contact-grid{
        grid-template-columns:1fr;
        padding:20px 5%
    }

    .filter-card,.filter-card.big,.grid-2,.coord-row{
        grid-template-columns:1fr
    }

    .stats{
        flex-direction:column
    }

    .page-head h1{
        font-size:32px
    }

    .admin-section{
        margin:18px 5%
    }

}

/* V3 ek tasarım */
.corporate-hero{
    padding-top:85px;
    padding-bottom:55px;
    background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(22,163,74,.06))
}

.corporate-features{
    padding-top:12px;
    padding-bottom:12px
}

.secondary-features{
    padding-bottom:55px
}

.mini-stats{
    color:var(--muted);
    font-size:14px
}

.dashboard-grid{
    display:grid;
    grid-template-columns:repeat(6,1fr);
    gap:16px;
    padding:10px 8% 20px
}

.dash-card{
    background:var(--card);
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    border-radius:22px;
    padding:22px;
    text-align:center
}

.dash-card b{
    display:block;
    font-size:30px;
    color:var(--primary)
}

.dash-card span{
    color:var(--muted);
    font-weight:700
}

.success{
    color:#16a34a;
    font-weight:800
}

.admin-head .btn{
    margin-top:10px
}

.gallery{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
    margin-bottom:16px
}

.gallery-img{
    width:100%;
    height:210px;
    object-fit:cover;
    border-radius:18px;
    border:1px solid var(--border)
}

.detail-avatar{
    grid-column:1/-1;
    width:120px;
    height:120px;
    border-radius:50%;
    background:var(--primary);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:52px;
    font-weight:900
}

.detail-stats{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin:12px 0
}

.detail-stats span{
    background:var(--bg);
    border:1px solid var(--border);
    border-radius:999px;
    padding:10px 14px;
    color:var(--muted);
    font-weight:800
}

.dua-btn{
    margin:0 0 14px 0;
    background:#0f766e
}

.admin-section small{
    color:var(--muted)
}

@media(max-width:1100px){
    .dashboard-grid{
        grid-template-columns:repeat(3,1fr)
    }

}

@media(max-width:700px){
    .dashboard-grid{
        grid-template-columns:1fr;
        padding:15px 5%
    }

    .gallery{
        grid-template-columns:1fr
    }

    .gallery-img{
        height:240px
    }

}

/* V4 hero ve dil seçimi */
.lang-btn{
    border:1px solid var(--border);
    background:var(--card);
    padding:10px 12px;
    border-radius:12px;
    font-weight:900;
    color:var(--primary)!important
}

.hero-bg{
    position:relative;
    min-height:560px;
    background:linear-gradient(rgba(15,23,42,.45),rgba(15,23,42,.60)),url('/static/images/hero-bg.svg') center/cover no-repeat!important;
    color:white;
    display:flex;
    align-items:center
}

.hero-bg .hero-text{
    max-width:820px
}

.hero-bg h1{
    color:white;
    text-shadow:0 8px 30px rgba(0,0,0,.25)
}

.hero-bg p{
    color:rgba(255,255,255,.92)
}

.hero-glass{
    background:rgba(15,23,42,.38);
    border:1px solid rgba(255,255,255,.18);
    backdrop-filter:blur(7px);
    padding:34px;
    border-radius:30px;
    box-shadow:0 30px 70px rgba(0,0,0,.22)
}

@media(max-width:900px){
    .hero-bg{
        min-height:520px
    }

    .hero-glass{
        padding:24px
    }

    .hero-bg h1{
        font-size:34px
    }

}

/* V5 */
.status-badge{
    display:inline-block;
    margin-left:8px;
    padding:4px 8px;
    border-radius:999px;
    background:var(--border);
    color:var(--muted);
    font-size:12px
}

.admin-section form input[type=password]{
    min-width:0
}

/* Sesli anı ve detay fotoğraf düzeltmeleri */
.gallery-img{
    width:100%;
    max-height:420px;
    height:auto;
    object-fit:contain;
    border-radius:18px;
    border:1px solid var(--border);
    background:#0f172a;
}

.voice-box{
    margin-top:28px;
    padding-top:20px;
    border-top:1px solid var(--border);
}

.voice-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:12px;
}

.muted{
    color:var(--muted);
}

audio{
    max-width:100%;
}

/* FINAL düzeltmeler */
body{
    font-family:'Inter',Arial,Helvetica,sans-serif;
}

.section-title{
    text-align:center;
    padding:10px 8% 20px;
}

.section-title h2{
    font-size:34px;
    margin:0 0 8px;
}

.section-title p{
    color:var(--muted);
    margin:0;
}

.remember-section{
    padding:45px 0 10px;
}

.remember-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:18px;
    padding:0 8% 25px;
}

.remember-card{
    display:flex;
    align-items:center;
    gap:14px;
    background:var(--card);
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    border-radius:24px;
    padding:18px;
    transition:.2s;
}

.remember-card:hover{
    transform:translateY(-3px);
}

.remember-card img,
.remember-avatar{
    width:74px;
    height:74px;
    border-radius:20px;
    object-fit:cover;
    background:var(--primary);
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:30px;
    font-weight:900;
    flex-shrink:0;
}

.remember-card h3{
    margin:0 0 6px;
}

.remember-card p{
    margin:0 0 5px;
    color:var(--muted);
    font-weight:700;
}

.remember-card span{
    color:var(--muted);
    font-size:14px;
}

.map-section{
    padding:10px 8% 20px;
}

#cemeteryMap{
    width:100%;
    height:420px;
    border-radius:28px;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    overflow:hidden;
    background:var(--card);
}

.pin-title{
    display:flex;
    align-items:center;
    gap:10px;
}

.pin-title h2{
    margin:0;
}

.map-pin{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:14px;
    background:rgba(37,99,235,.12);
    font-size:24px;
}

.gallery-img{
    object-fit:contain;
    background:#0f172a;
}

.person-card img,
.avatar{
    object-fit:cover;
}

@media(max-width:900px){
    .remember-grid{
        grid-template-columns:1fr;
        padding:0 5% 20px;
    }

    .section-title h2{
        font-size:28px;
    }

    .map-section{
        padding:10px 5% 20px;
    }

    #cemeteryMap{
        height:330px;
    }
}


/* Cenaze Ara Harita */
.map-section{
    width:84%;
    margin:20px auto 30px;
    background:var(--card);
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    border-radius:26px;
    padding:22px;
}

.map-section h2{
    margin:0 0 6px;
    text-align:center;
}

.map-section p{
    margin:0 0 16px;
    text-align:center;
    color:var(--muted);
}

#cenazeMap{
    width:100%;
    height:430px;
    border-radius:20px;
    overflow:hidden;
    border:1px solid var(--border);
}

.leaflet-popup-content{
    color:#111827;
    font-family:Arial, Helvetica, sans-serif;
}

.leaflet-popup-content a{
    color:#2563eb;
    font-weight:700;
}

@media(max-width:900px){
    .map-section{
        width:92%;
        padding:16px;
    }

    #cenazeMap{
        height:330px;
    }
}


/* QR Tara, QR Popup ve Şık Harita */
.scan-card{
    width:84%;
    max-width:900px;
    margin:25px auto 60px;
    background:var(--card);
    border:1px solid var(--border);
    box-shadow:var(--shadow);
    border-radius:28px;
    padding:26px;
}

#qr-reader{
    width:100%;
    max-width:520px;
    margin:20px auto;
    border-radius:20px;
    overflow:hidden;
    background:var(--bg);
    border:1px solid var(--border);
}

.scan-actions{
    display:flex;
    gap:12px;
    justify-content:center;
    flex-wrap:wrap;
}

.scan-result{
    text-align:center;
    color:var(--muted);
    font-weight:700;
}

.qr-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.65);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
    padding:20px;
}

.qr-modal.open{
    display:flex;
}

.qr-modal-content{
    width:100%;
    max-width:380px;
    background:var(--card);
    color:var(--text);
    border-radius:26px;
    padding:24px;
    text-align:center;
    position:relative;
    border:1px solid var(--border);
    box-shadow:var(--shadow);
}

.qr-modal-content img{
    width:260px;
    height:260px;
    background:white;
    padding:12px;
    border-radius:18px;
    margin:14px auto;
}

.qr-close{
    position:absolute;
    right:14px;
    top:12px;
    border:0;
    background:var(--bg);
    color:var(--text);
    width:36px;
    height:36px;
    border-radius:50%;
    font-size:24px;
    cursor:pointer;
}

.compact-map{
    margin-top:18px;
}

.map-title-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}

.hidden-map{
    display:none;
}

#cenazeMap:not(.hidden-map){
    display:block;
    margin-top:16px;
}

@media(max-width:900px){
    .scan-card{
        width:92%;
        padding:18px;
    }

    .map-title-row{
        flex-direction:column;
        align-items:flex-start;
    }

    .map-title-row .btn{
        width:100%;
        text-align:center;
    }
}
