/**
 * İç Sayfa Stilleri
 * Toroslar Belediyesi - Tüm iç sayfalar için ortak stiller
 * Ana style.css ile birlikte kullanılır
 * TEMA DESTEKLİ - CSS değişkenlerini kullanır
 */

/* ==================== SAYFA ARKA PLAN ==================== */
body.inner-page {
    overflow: auto !important;
    height: auto !important;
    min-height: 100vh;
}

.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--bg-dark, #0a1628) 0%, var(--primary-blue, #1a3a52) 50%, var(--primary-green, #0d2818) 100%);
    z-index: -2;
}

.page-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/toroslar/images/slider/arslankoygolu.jpg') center/cover no-repeat;
    opacity: 0.12;
}

/* ==================== ANA İÇERİK ALANI ==================== */
.page-main-content {
    position: relative;
    z-index: 1;
    padding: 24px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

/* ==================== SIDEBAR ==================== */
.page-sidebar {
}

.sidebar-box {
    background: linear-gradient(135deg, rgba(var(--primary-blue-rgb, 30, 58, 95), 0.7) 0%, rgba(var(--primary-green-rgb, 46, 125, 50), 0.7) 100%);
    background: linear-gradient(135deg, var(--surface-glass, rgba(30, 58, 95, 0.7)) 0%, var(--surface-glass-hover, rgba(46, 125, 50, 0.7)) 100%);
    border-radius: 1.25rem;
    padding: 1.25rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.15));
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Tema bazlı sidebar renkleri */
[data-theme="modern"] .sidebar-box {
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.7) 0%, rgba(27, 94, 32, 0.7) 100%);
}

[data-theme="akdeniz"] .sidebar-box {
    background: linear-gradient(135deg, rgba(0, 96, 100, 0.7) 0%, rgba(51, 105, 30, 0.7) 100%);
}

[data-theme="dinamik"] .sidebar-box {
    background: linear-gradient(135deg, rgba(21, 101, 192, 0.7) 0%, rgba(67, 160, 71, 0.7) 100%);
}

[data-theme="kontrast"] .sidebar-box {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(255, 255, 0, 0.5);
}

[data-theme="kontrast"] .sidebar-title {
    color: #FFFF00;
}

.sidebar-title {
    color: var(--text-primary, #fff);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.2));
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav a {
    border-radius: 0.625rem;
    padding: 0.75rem 0.875rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.9));
    font-size: 0.875rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    background: var(--surface-glass-hover, rgba(255, 255, 255, 0.15));
}

.sidebar-nav a.active {
    background: var(--surface-glass-strong, rgba(255, 255, 255, 0.25));
    font-weight: 600;
}

[data-theme="kontrast"] .sidebar-nav a {
    color: #fff;
}

[data-theme="kontrast"] .sidebar-nav a.active {
    background: rgba(255, 255, 0, 0.3);
    color: #FFFF00;
}

.sidebar-nav .icon {
    width: 1.25rem;
    text-align: center;
}

/* Gruplu Sidebar */
.sidebar-nav-grouped {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-group {
    border-bottom: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    padding-bottom: 0.75rem;
}

.sidebar-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-group-title {
    color: var(--accent-green, #81C784);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

[data-theme="kontrast"] .sidebar-group-title {
    color: #FFFF00;
}

.sidebar-group-items {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.sidebar-group-items a {
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary, rgba(255, 255, 255, 0.85));
    font-size: 0.8125rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.sidebar-group-items a:hover {
    background: var(--surface-glass-hover, rgba(255, 255, 255, 0.12));
    color: var(--text-primary, #fff);
}

.sidebar-group-items a.active {
    background: var(--surface-glass-strong, rgba(255, 255, 255, 0.2));
    color: var(--text-primary, #fff);
    font-weight: 600;
}

.sidebar-group-items a .icon {
    width: 1rem;
    text-align: center;
    opacity: 0.7;
}

/* Sidebar İstatistik */
.sidebar-stats {
    color: var(--text-secondary, rgba(255, 255, 255, 0.8));
    font-size: 0.875rem;
    line-height: 1.8;
}

.sidebar-stats p {
    margin-bottom: 0.25rem;
}

.sidebar-stats strong {
    color: var(--text-primary, #fff);
}

/* ==================== ANA ALAN ==================== */
.page-main-area {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 32px;
    min-height: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="kontrast"] .page-main-area {
    background: #fff;
    border: 2px solid #000;
}

.page-title {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--primary-blue, #1E3A5F);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="modern"] .page-title { color: #0D47A1; }
[data-theme="akdeniz"] .page-title { color: #006064; }
[data-theme="dinamik"] .page-title { color: #1565C0; }
[data-theme="kontrast"] .page-title { color: #000; }

.page-subtitle {
    color: #666;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid #e8e8e8;
}

/* ==================== SAYFA İÇERİĞİ ==================== */
.page-content {
    width: 100%;
    color: #333;
    font-size: 1rem;
    line-height: 1.9;
}

.page-content p {
    margin-bottom: 1rem;
}

.page-content h2 {
    font-size: 1.375rem;
    color: var(--primary-blue, #1E3A5F);
    margin: 1.75rem 0 1rem;
}

.page-content h3 {
    font-size: 1.125rem;
    color: var(--primary-blue, #1E3A5F);
    margin: 1.5rem 0 0.75rem;
}

[data-theme="modern"] .page-content h2,
[data-theme="modern"] .page-content h3 { color: #0D47A1; }

[data-theme="akdeniz"] .page-content h2,
[data-theme="akdeniz"] .page-content h3 { color: #006064; }

[data-theme="dinamik"] .page-content h2,
[data-theme="dinamik"] .page-content h3 { color: #1565C0; }

.page-content ul,
.page-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.25rem 0;
}

.page-content strong {
    color: var(--primary-blue, #1E3A5F);
}

.page-content a {
    color: var(--primary-green, #2E7D32);
    text-decoration: underline;
}

.page-content a:hover {
    color: var(--primary-blue, #1E3A5F);
}

.page-main-area * {
    max-width: 100%;
    box-sizing: border-box;
}

.page-content table {
    display: block;
    overflow-x: auto;
}

.pdf-ek-btn a:hover { opacity: 0.9; }

.page-content img {
    height: auto;
}

/* ==================== BAŞKAN SAYFASI ==================== */
.president-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.president-image {
    position: sticky;
    top: 100px;
}

.president-image img {
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.president-content {
    color: #333;
    font-size: 1rem;
    line-height: 1.9;
}

.president-content p {
    margin-bottom: 1rem;
}

.president-content h2,
.president-content h3 {
    color: var(--primary-blue, #1E3A5F);
}

/* ==================== HABER/DUYURU KARTLARI ==================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.news-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.news-card-image {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-blue, #1E3A5F) 0%, var(--primary-green, #2E7D32) 100%);
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-image .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.4);
}

.news-card-content {
    padding: 1rem;
}

.news-card-date {
    font-size: 0.75rem;
    color: var(--primary-green, #2E7D32);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.news-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary-blue, #1E3A5F);
    line-height: 1.4;
    margin-bottom: 0.625rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a {
    color: inherit;
    text-decoration: none;
}

.news-card-title a:hover {
    color: var(--primary-green, #2E7D32);
}

.news-card-excerpt {
    font-size: 0.8125rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--primary-blue, #1E3A5F);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: gap 0.2s, color 0.2s;
}

.news-card-link:hover {
    gap: 0.625rem;
    color: var(--primary-green, #2E7D32);
}

/* ==================== SAYFALAMA ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.875rem;
    background: #f5f5f5;
    border-radius: 0.625rem;
    color: var(--primary-blue, #1E3A5F);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.pagination a:hover {
    background: #e8e8e8;
}

.pagination span.current {
    background: linear-gradient(135deg, var(--primary-blue, #1E3A5F) 0%, var(--primary-green, #2E7D32) 100%);
    color: #fff;
}

/* ==================== BOŞ DURUM ==================== */
.empty-state {
    text-align: center;
    padding: 3.75rem 1.25rem;
}

.empty-state-icon {
    font-size: 3.75rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--primary-blue, #1E3A5F);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.empty-state p {
    color: #666;
    font-size: 1rem;
}

/* ==================== PAYLAŞ BÖLÜMÜ ==================== */
.share-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e8e8e8;
}

.share-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.75rem;
    display: block;
}

.share-buttons {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.share-btn.facebook {
    background: #1877f2;
    color: #fff;
}

.share-btn.twitter {
    background: #1da1f2;
    color: #fff;
}

.share-btn.whatsapp {
    background: #25d366;
    color: #fff;
}

.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ==================== FOOTER ==================== */
.page-footer {
    position: relative;
    z-index: 1;
    background: rgba(13, 17, 23, 0.95);
    padding: 2rem 1.5rem;
    margin-top: 2.5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.page-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8125rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

/* ==================== AKTİF MENÜ STİLLERİ ==================== */
.main-nav > a.active,
.nav-dropdown > a.active,
.nav-dropdown.active > a {
    color: var(--text-primary, #fff) !important;
    background: var(--surface-glass-strong, rgba(255, 255, 255, 0.2));
    border-radius: 8px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .sidebar-nav a {
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }
    
    .president-layout {
        grid-template-columns: 1fr;
    }
    
    .president-image {
        position: static;
        max-width: 300px;
        margin: 0 auto 1.5rem;
    }
}

@media (max-width: 992px) {
    .news-grid { grid-template-columns: 1fr; }
    .page-main-area { padding: 1rem; }
    .page-title { font-size: 1.25rem; }
    .page-main-content { padding: 0.75rem; }
    .content-wrapper {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Mobile'da sol sidebar gizli (yer sıkıntısı + hamburger menü zaten var) */
    .page-sidebar { display: none !important; }

    .president-layout { grid-template-columns: 1fr !important; gap: 1rem !important; }
    .president-photo img { max-width: 200px; margin: 0 auto; display: block; }

    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; flex-wrap: wrap; gap: 8px; font-size: 0.85rem; }

    .page-content { font-size: 0.95rem; }
    .page-content h2 { font-size: 1.15rem; }
    .page-content h3 { font-size: 1rem; }
    .page-content table { font-size: 0.85rem; }

    .arama-form { flex-direction: column; }
    .arama-form button { width: 100%; }
    .arama-tip-filter { gap: 6px; }
    .arama-tip-btn { font-size: 12px; padding: 5px 10px; }

    .pdf-ek-btn a { width: 100%; box-sizing: border-box; }
}

@media (max-width: 480px) {
    .page-main-area { padding: 0.75rem; }
    .page-title { font-size: 1.1rem; }
    .page-content { font-size: 0.9rem; }
}

/* ==================== ERİŞİLEBİLİRLİK ==================== */
*:focus-visible {
    outline: 3px solid var(--accent-blue, #4a90d9);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
