/* ============================================
   GELİBOLU BELEDİYESİ GLOBAL UI OVERRIDES
   ============================================ */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--theme-bg-primary);
    color: var(--theme-text-primary);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--theme-text-primary);
    letter-spacing: -0.02em;
}

/* Section Backgrounds */
section {
    position: relative;
    background: var(--theme-bg-primary);
}

.bg-theme-secondary {
    background-color: var(--theme-bg-secondary);
}

/* Global Transition Override */
*,
*::before,
*::after {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Premium Button Standards */
.btn-belediye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-belediye-primary {
    background: var(--theme-primary);
    color: white !important;
}

.btn-belediye-primary:hover {
    background: var(--theme-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--theme-shadow-md);
}

/* Purged legacy classes for memory safety */
.section-light-card,
.card-lux,
.glass-heavy,
.btn-login-premium {
    /* These are now replaced by premium-card and theme variables */
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate-fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
}

/* Marquee Animation */
@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
    animation-play-state: paused;
}

/* ============================================
   GLOBAL BUTON STANDARTLARI
   ============================================ */

/* Ana Aksiyon Butonu - Standart */
.btn-primary {
    height: 3rem;
    /* h-12 */
    min-width: 10rem;
    /* min-w-[160px] */
    padding: 0 2rem;
    /* px-8 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    /* gap-3 */
    font-weight: 700;
    /* font-bold */
    letter-spacing: 0.05em;
    /* tracking-wide */
    font-size: 0.875rem;
    /* text-sm */
    text-transform: uppercase;
    border-radius: 0.5rem;
    /* rounded-lg */
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Buton içindeki ikonlar - Standart boyut */
.btn-primary i[data-lucide],
.btn-primary svg {
    width: 1.25rem;
    /* w-5 */
    height: 1.25rem;
    /* h-5 */
    flex-shrink: 0;
}

/* İkincil Buton (İptal, Kapat vb.) */
.btn-secondary {
    height: 3rem;
    /* h-12 */
    min-width: 10rem;
    /* min-w-[160px] */
    padding: 0 2rem;
    /* px-8 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    /* gap-3 */
    font-weight: 700;
    /* font-bold */
    letter-spacing: 0.05em;
    /* tracking-wide */
    font-size: 0.875rem;
    /* text-sm */
    text-transform: uppercase;
    border-radius: 0.5rem;
    /* rounded-lg */
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
    background-color: #475569;
    /* bg-slate-700 */
    color: white;
}

.btn-secondary:hover {
    background-color: #64748b;
    /* bg-slate-600 */
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.btn-secondary i[data-lucide],
.btn-secondary svg {
    width: 1.25rem;
    /* w-5 */
    height: 1.25rem;
    /* h-5 */
    flex-shrink: 0;
}

/* Başarı Butonu (Yeşil - Ekle, Kaydet vb.) */
.btn-success {
    height: 3rem;
    /* h-12 */
    min-width: 10rem;
    /* min-w-[160px] */
    padding: 0 2rem;
    /* px-8 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    /* gap-3 */
    font-weight: 700;
    /* font-bold */
    letter-spacing: 0.05em;
    /* tracking-wide */
    font-size: 0.875rem;
    /* text-sm */
    text-transform: uppercase;
    border-radius: 0.5rem;
    /* rounded-lg */
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
    background: linear-gradient(to right, #16a34a, #15803d);
    /* from-green-600 to-emerald-700 */
    color: white;
}

.btn-success:hover {
    background: linear-gradient(to right, #22c55e, #16a34a);
    /* from-green-500 to-emerald-600 */
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-success:active {
    transform: scale(0.98);
}

.btn-success i[data-lucide],
.btn-success svg {
    width: 1.25rem;
    /* w-5 */
    height: 1.25rem;
    /* h-5 */
    flex-shrink: 0;
}

/* Tam Genişlik Buton (Form butonları için) */
.btn-primary.w-full,
.btn-secondary.w-full,
.btn-success.w-full {
    width: 100%;
    min-width: 100%;
}

/* Belediye Standart Butonu */
.btn-belediye {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 44px;
    height: 50px;
    padding: 0 2rem;
    font-weight: 700;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.btn-belediye i[data-lucide],
.btn-belediye svg {
    flex-shrink: 0;
}

/* =========================================================
   GELİBOLU BELEDİYESİ BODY & GLOBAL STYLES
   Premium kurumsal zemin ve metin düzeni
   ========================================================= */

/* Azure Body - Derin Lacivert Gradyan */
/* Azure Body - Theme Aware */
body {
    background: var(--theme-gradient-section);
    background-attachment: fixed;
    color: var(--theme-text-secondary);
    position: relative;
    min-height: 100vh;
}

/* Bölümler arası geçişleri sadeleştir – gölgeyi minimuma indir */
section {
    position: relative;
}

section::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 0;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
}

/* Sovereign Section Transitions - Çok Hafif Geçişler */
.section-gradient-top {
    background: var(--sovereign-section);
    /* #F1F5F9 */
}

.section-gradient-bottom {
    background: var(--sovereign-section);
    /* #F1F5F9 */
}

.section-gradient-soft {
    background: var(--sovereign-section);
    /* #F1F5F9 */
}

/* Azure Button - Parlayan Denizci Mavi */
.btn-primary {
    background: var(--azure-blue);
    /* #008ED6 - Denizci Mavi */
    color: #ffffff;
    border-radius: 9999px;
    /* rounded-full */
    box-shadow: var(--azure-glow), 0 12px 32px rgba(0, 142, 214, 0.4);
    border: none;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px 32px;
}

.btn-primary:hover {
    background: #0AA5F7;
    box-shadow: var(--azure-glow-hover), 0 20px 60px rgba(0, 142, 214, 0.6);
    transform: translateY(-4px) scale(1.08);
    filter: brightness(1.2);
}

/* Yönetici giriş butonu – royal mavi ile (zaten yukarıda tanımlı, tekrar etmeyelim) */

/* Navigasyon ve detaylar için özel renkler (yukarıda tanımlandı) */

/* ============================================
   UI/UX İYİLEŞTİRMELERİ
   Modern, Erişilebilir ve Kullanıcı Dostu
   ============================================ */

/* Improved Link Styles */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.85;
}

a:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 3px;
    border-radius: 2px;
}

/* Enhanced Button Interactions */
button,
.btn,
[type="button"],
[type="submit"] {
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

button:disabled,
.btn:disabled {
    opacity: var(--theme-opacity-disabled);
    cursor: not-allowed;
    pointer-events: none;
}

/* Improved Form Inputs */
input,
textarea,
select {
    transition: all 0.3s ease;
}

input:hover:not(:disabled),
textarea:hover:not(:disabled),
select:hover:not(:disabled) {
    border-color: var(--theme-border-secondary);
}

input::placeholder,
textarea::placeholder {
    opacity: 0.6;
}

/* Enhanced Card Interactions */
.card,
.card-lux,
.section-light-card {
    cursor: pointer;
    will-change: transform;
}

.card:active,
.card-lux:active,
.section-light-card:active {
    transform: scale(0.98);
}

/* Smooth Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

img:not([src]) {
    opacity: 0;
}

/* Loading States */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--theme-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg,
            var(--theme-bg-secondary) 25%,
            var(--theme-bg-hover) 50%,
            var(--theme-bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Toast Notifications (Hazırlık) */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    min-width: 300px;
    padding: 1rem 1.5rem;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border-primary);
    border-radius: 0.5rem;
    box-shadow: var(--theme-shadow-xl);
    z-index: 9999;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--theme-success);
}

.toast.error {
    border-left: 4px solid var(--theme-error);
}

.toast.warning {
    border-left: 4px solid var(--theme-warning);
}

.toast.info {
    border-left: 4px solid var(--theme-info);
}

/* Improved Selection */
::selection {
    background: var(--theme-primary);
    color: var(--theme-text-inverse);
}

::-moz-selection {
    background: var(--theme-primary);
    color: var(--theme-text-inverse);
}

/* Better Focus Management */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--theme-primary);
    outline-offset: 2px;
}

/* Improved Table Responsiveness */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {

    /* Increase tap target sizes */
    button,
    .btn,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover states on touch */
    *:hover {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Print Styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    nav,
    footer,
    .no-print,
    #theme-toggle {
        display: none !important;
    }

    a {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* Dark Mode Image Adjustments */
[data-theme="dark"] img:not([class*="logo"]) {
    opacity: 0.9;
    filter: brightness(0.95);
}

/* Emoji/Icon Consistency */
.emoji,
[class*="icon"] {
    font-style: normal;
    line-height: 1;
    vertical-align: middle;
}

/* Smooth Scroll Behavior */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Empty State Styling */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.empty-state-title {
    color: var(--theme-text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--theme-text-secondary);
    font-size: 1rem;
}

/* Utility Classes for Theme System */
.text-primary-theme {
    color: var(--theme-primary) !important;
}

.bg-primary-theme {
    background-color: var(--theme-primary) !important;
}

.border-primary-theme {
    border-color: var(--theme-primary) !important;
}

/* Safe Area Insets (for mobile notches) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Improved Contrast for Light Theme */
:root {
    /* Enhanced contrast ratios for WCAG AA compliance */
    --theme-text-primary-enhanced: #0A0F1E;
    --theme-text-secondary-enhanced: #3B4455;
}

/* High Performance Transforms */
.will-transform {
    will-change: transform;
}

.will-transform:hover {
    will-change: auto;
}

/* Accessible Hiding */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Improved Mobile Menu */
@media (max-width: 768px) {
    #mobile-menu {
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Theme Toggle Button Animation */
#theme-toggle {
    position: relative;
    overflow: hidden;
}

#theme-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, var(--theme-primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#theme-toggle:hover::before {
    opacity: 0.1;
}

#theme-toggle:active {
    transform: scale(0.95);
}

/* Improved Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* News Ticker Pause on Hover */
.animate-marquee:hover {
    animation-play-state: paused;
}

/* Card Grid Improvements */
.grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid {
        gap: 2rem;
    }
}

/* Footer Link Hover Effect */
footer a {
    position: relative;
    display: inline-block;
}

footer a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--theme-footer-link-hover);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}