/* Kavun festivali temasi */
body.theme-kavun {
    --belediye-primary: #2E7D32;
    --belediye-dark: #1B5E20;
    --belediye-light: #FFE082;
    --belediye-bg: #FFF8E7;
    --kavun-yellow: #F4C430;
    --kavun-green: #2E7D32;
}

body.theme-kavun .navbar-belediye {
    background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 50%, #F4C430 120%);
}

body.theme-kavun .hero-carousel .carousel-item::before {
    background: linear-gradient(135deg, rgba(27,94,32,.75), rgba(244,196,48,.35));
}

body.theme-kavun .portal-cta-band,
body.theme-kavun .portal-footer {
    background: linear-gradient(135deg, #0D3B1E, #1B5E20 45%, #2E7D32);
}

.kavun-festival-banner {
    background: linear-gradient(135deg, #FFF8E7 0%, #FFE082 40%, #C8E6C9 100%);
    border-bottom: 4px solid #F4C430;
    position: relative;
    overflow: hidden;
}

.kavun-festival-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 12px,
        rgba(13,59,30,.04) 12px,
        rgba(13,59,30,.04) 24px
    );
    pointer-events: none;
}

.kavun-festival-img {
    max-height: 180px;
    width: auto;
    max-width: 100%;
    object-fit: cover;
    border: 3px solid #F4C430;
}

.kavun-badge {
    background: #1B5E20;
    color: #FFE082;
    font-size: .75rem;
}

.kavun-countdown {
    font-size: 1.15rem;
    color: #1B5E20;
}

.event-mini-card--yakin {
    border: 2px solid #F4C430 !important;
    box-shadow: 0 4px 16px rgba(244,196,48,.35) !important;
}

.event-mini-card-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 0.375rem 0.375rem 0 0;
}

/* Hikayeler — alt sabit dock (acilis: genis, kucult / gizle) */
.portal-stories-bar--dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
    padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom, 0));
    transition: padding .25s ease, box-shadow .25s ease;
}

.portal-stories-bar-inner {
    max-width: 1140px;
    margin: 0 auto;
}

body.has-portal-stories.portal-stories-expanded {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0));
}

body.has-portal-stories.portal-stories-minimized {
    padding-bottom: calc(46px + env(safe-area-inset-bottom, 0));
}

body.has-portal-stories.portal-stories-hidden {
    padding-bottom: 0;
}

@media (min-width: 992px) {
    body.has-portal-stories.portal-stories-expanded {
        padding-bottom: calc(102px + env(safe-area-inset-bottom, 0));
    }
    .portal-stories-bar--dock {
        padding-left: max(.75rem, calc((100vw - 1140px) / 2 + .75rem));
        padding-right: max(.75rem, calc((100vw - 1140px) / 2 + .75rem));
    }
}

html.portal-stories-prehidden #portal-stories-bar,
.portal-stories-bar.is-hidden {
    display: none !important;
}

html.portal-stories-preminimized .portal-stories-bar-body,
.portal-stories-bar.is-minimized .portal-stories-bar-body {
    display: none;
}

html.portal-stories-prehidden .portal-stories-restore,
.portal-stories-restore.is-visible {
    display: inline-flex;
}

.portal-stories-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .4rem;
}

.portal-stories-bar.is-minimized .portal-stories-bar-head,
html.portal-stories-preminimized .portal-stories-bar-head {
    margin-bottom: 0;
}

.portal-stories-bar-label.portal-stories-bar-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: none;
    background: none;
    padding: 0;
    font-size: .8rem;
    font-weight: 700;
    color: #2E7D32;
    cursor: pointer;
    line-height: 1.2;
}

.portal-stories-bar-label.portal-stories-bar-toggle:hover {
    color: #1B5E20;
}

.portal-stories-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: #2E7D32;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
}

.portal-stories-bar-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.portal-stories-bar-minimize,
.portal-stories-bar-close {
    flex-shrink: 0;
    border: none;
    background: rgba(0,0,0,.06);
    color: #555;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    cursor: pointer;
    line-height: 1;
}

.portal-stories-bar-minimize:hover,
.portal-stories-bar-close:hover {
    background: rgba(0,0,0,.12);
    color: #222;
}

.portal-stories-restore {
    position: fixed;
    bottom: calc(.75rem + env(safe-area-inset-bottom, 0));
    right: .75rem;
    z-index: 1035;
    display: none;
    align-items: center;
    gap: .35rem;
    border: none;
    border-radius: 999px;
    padding: .45rem .85rem;
    background: linear-gradient(135deg, #2E7D32, #1B5E20);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(27,94,32,.35);
    cursor: pointer;
}

.portal-stories-restore:hover {
    filter: brightness(1.08);
    color: #fff;
}

/* Sayfa icinde (dock disi) */
.portal-stories-bar:not(.portal-stories-bar--dock) {
    display: block;
    position: relative;
    background: linear-gradient(180deg, #fff 0%, #f8faf8 100%);
    border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);
    padding: 1rem .75rem 1.25rem;
}

@media (min-width: 992px) {
    .portal-stories-bar:not(.portal-stories-bar--dock) {
        padding: 1.1rem 0 1.35rem;
    }
}

.portal-stories-scroll {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.portal-stories-scroll::-webkit-scrollbar { display: none; }

.portal-story-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-align: center;
    width: 72px;
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

@media (min-width: 992px) {
    .portal-story-item { width: 84px; }
    .portal-story-ring { width: 64px; height: 64px; }
}

.portal-story-ring {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #F4C430, #2E7D32, #833AB4);
    margin: 0 auto .25rem;
}

.portal-story-ring img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background: #eee;
}

.portal-story-ring--play,
.portal-story-ring--image,
.portal-story-ring--link {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2E7D32, #F4C430);
}

.portal-story-ring--seen {
    background: linear-gradient(135deg, #bdbdbd, #9e9e9e) !important;
    opacity: .88;
}

.portal-story-ring--play {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2E7D32, #F4C430);
}

.portal-story-play-icon {
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
}

.portal-story-label {
    font-size: .65rem;
    line-height: 1.15;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.portal-story-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #000;
    display: none;
    flex-direction: column;
    height: 100dvh;
    width: 100%;
}

.portal-story-viewer.open { display: flex; }

.portal-story-viewer-chrome {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    color: #fff;
    background: linear-gradient(180deg, rgba(0,0,0,.65), transparent);
    z-index: 3;
}

.portal-story-viewer-chrome span {
    font-size: .9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-story-viewer-stage {
    flex: 1 1 auto;
    position: relative;
    min-height: 0;
    width: 100%;
    background: #000;
    overflow: hidden;
}

.portal-story-viewer-stage video,
.portal-story-viewer-stage .portal-story-image {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    pointer-events: auto;
}

.portal-story-progress-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 4;
    background: rgba(255,255,255,.25);
}

.portal-story-progress-bar {
    height: 100%;
    width: 0;
    background: #F4C430;
    transition: width .05s linear;
}

.portal-story-link-cta {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem 1.1rem;
    border-radius: 999px;
    background: rgba(255,255,255,.95);
    color: #1B5E20;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

.portal-story-link-cta:hover {
    color: #1B5E20;
    background: #fff;
}

.portal-story-tap {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    z-index: 2;
    border: none;
    background: transparent;
    color: rgba(255,255,255,.85);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.portal-story-tap--prev { left: 0; justify-content: flex-start; padding-left: .35rem; }
.portal-story-tap--next { right: 0; justify-content: flex-end; padding-right: .35rem; }

.portal-story-tap:disabled {
    opacity: .2;
    cursor: default;
}

body.portal-story-open { overflow: hidden; }

.portal-story-viewer-close {
    flex-shrink: 0;
    color: #fff;
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

/* Cerez izni */
.portal-cookie-consent {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    padding: .75rem;
    padding-bottom: calc(.75rem + env(safe-area-inset-bottom, 0));
    background: rgba(27, 94, 32, .97);
    color: #fff;
    box-shadow: 0 -4px 24px rgba(0,0,0,.2);
}

.portal-cookie-consent.is-visible {
    display: block;
}

body.has-portal-stories.portal-stories-expanded .portal-cookie-consent.is-visible {
    bottom: calc(96px + env(safe-area-inset-bottom, 0));
}

body.has-portal-stories.portal-stories-minimized .portal-cookie-consent.is-visible {
    bottom: calc(46px + env(safe-area-inset-bottom, 0));
}

.portal-cookie-consent-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    font-size: .85rem;
}

@media (max-width: 575px) {
    .portal-cookie-consent-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .portal-cookie-consent-inner .btn {
        width: 100%;
    }
}
