/* ==========================================================================
   Neşeli Çocuk Anaokulu - Ana Stil Dosyası (Son Versiyon)
   ========================================================================== */

/* --- Genel Ayarlar ve Font --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #c00000; /* Ana Kırmızı */
    --secondary-color: #2c3e50; /* Koyu Mavi/Siyah */
    --text-color: #555;
    --light-gray: #f9f9f9;
    --border-color: #eaeaea;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 600;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.cta-button {
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 500;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cta-button:hover {
    background-color: #fff;
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* --- Header & Navigasyon --- */
.site-header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 60px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav ul li {
    position: relative;
    margin-left: 10px;
}

.main-nav ul li a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.main-nav ul li a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

/* Açılır Menü (Masaüstü) */
.main-nav .has-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 240px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.main-nav .dropdown-menu li {
    margin: 0;
}

.main-nav .dropdown-menu li a {
    padding: 10px 20px;
    white-space: nowrap;
    width: 100%;
    border-radius: 0;
}

.dropdown-icon {
    display: inline-flex;
    transition: transform 0.3s ease;
}

.main-nav .has-dropdown > a .dropdown-icon::after {
    content: '▼';
    font-size: 0.6em;
}

.mobile-menu-toggle, .mobile-menu-close {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--secondary-color);
}

/* --- Hero Alanı (Anasayfa Video) --- */
.hero {
    position: relative;
    height: 75vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero .video-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}

.hero video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: #fff;
    padding: 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 700;
}

.hero-content h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 30px;
    font-weight: 400;
}

/* --- Tanıtım Kartları (Anasayfa) --- */
.tanitim .container {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}
.tanitim-sol { flex: 1.5; }
.tanitim-sol h2 { font-size: 2.2rem; color: var(--primary-color); margin-bottom: 20px; }
.tanitim-sag {
    flex: 2;
    display: grid;
    gap: 20px;
}

.tanitim-sag.card-count-1,
.tanitim-sag.card-count-2 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.tanitim-sag.card-count-3 {
    grid-template-columns: 1fr 1fr;
}
.tanitim-sag.card-count-3 .tanitim-kart:nth-child(3) {
    grid-column: 1 / -1;
}

.tanitim-sag.card-count-4 {
    grid-template-columns: 1fr 1fr;
}

.tanitim-kart {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
    display: block;
    height: 280px;
}
.tanitim-kart-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.tanitim-kart:hover .tanitim-kart-media {
    transform: scale(1.05);
}
.tanitim-kart-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 40px 20px 20px;
    color: white;
    text-align: center;
}
.tanitim-kart-title h3 {
    color: white;
    font-size: 1.2rem;
    margin: 0;
}

/* --- Swiper Slider (Anasayfa Galeri) --- */
.hayat { background-color: var(--light-gray); }
.life-swiper {
    width: 100%;
    padding-bottom: 50px !important;
}
.hayat-kart {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 300px;
    display: block;
}
.hayat-kart img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hayat-kart-baslik {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 10px;
    font-size: 1rem;
    text-align: center;
}
.life-swiper .swiper-button-next, .life-swiper .swiper-button-prev {
    color: #fff;
    background-color: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
}
.life-swiper .swiper-button-next::after, .life-swiper .swiper-button-prev::after {
    font-size: 1.2rem;
}
.life-swiper .swiper-pagination-bullet-active {
    background-color: var(--primary-color);
}

/* --- Sayfa Başlığı --- */
.page-header {
    background-color: var(--primary-color);
    padding: 60px 0;
    text-align: center;
    color: white;
    margin-bottom: 80px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.page-header::after {
    content:'';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.page-header .container {
    position: relative;
    z-index: 2;
}
.page-header h1 {
    color: white;
    font-size: 2.5rem;
}

/* --- İçerik Sayfaları (Duyuru, Hakkımızda vb.) --- */
.page-content .container {
    max-width: 850px;
}
.content-wrapper > *:first-child { margin-top: 0; }
.content-wrapper h2, .content-wrapper h3, .content-wrapper h4 { color: var(--primary-color); margin-top: 1.5em; margin-bottom: 0.8em; line-height: 1.3; }
.content-wrapper h2 { font-size: 1.8rem; }
.content-wrapper h3 { font-size: 1.5rem; }
.content-wrapper h4 { font-size: 1.2rem; }
.content-wrapper p { margin-bottom: 1em; }
.content-wrapper ul, .content-wrapper ol { padding-left: 25px; margin-bottom: 1em; }
.content-wrapper li { margin-bottom: 0.5em; }
.content-wrapper img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5em 0; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.content-wrapper blockquote { border-left: 4px solid var(--primary-color); padding: 10px 20px; margin: 1.5em 0; font-style: italic; color: #555; background-color: #f9f9f9; }

.meta-info {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.main-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}
.back-link {
    display: inline-block;
    margin-bottom: 30px;
    font-weight: 500;
}

/* --- Duyuru Listesi --- */
.duyuru-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.duyuru-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}
.duyuru-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}
.duyuru-resim-link {
    width: 100%;
    height: 220px;
    overflow: hidden;
}
.duyuru-resim-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.duyuru-item-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.duyuru-item-content .duyuru-baslik {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--secondary-color);
}
.duyuru-tarih {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 10px;
}
.duyuru-ozet {
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* --- Galeri Sayfaları --- */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.album-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: block;
    height: 280px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.album-item .album-image {
    width: 100%; height: 100%;
}
.album-item .album-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.album-item:hover .album-image img {
    transform: scale(1.05);
}
.album-item .album-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 40px 20px 20px;
    font-size: 1.3rem;
    font-weight: 600;
}
.album-item.instagram-album {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}
.gallery-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    height: 200px;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-item a:hover img {
    transform: scale(1.05);
}

/* --- İletişim Sayfası --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; margin-bottom: 5px; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}
.map-container iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 8px;
    border: 0;
}
.success-message, .error-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}
.success-message { background-color: #d4edda; color: #155724; }
.error-message { background-color: #f8d7da; color: #721c24; }

/* --- Footer --- */
.site-footer {
    background-color: var(--secondary-color);
    color: #ccc;
    padding: 60px 0 20px;
    font-size: 0.9rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #444;
}
.footer-logo img {
    max-height: 70px;
}
.site-footer p { margin: 0 0 10px 0; }
.site-footer strong { color: #fff; }
.footer-social .social-link {
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
}
.footer-social .social-link:hover {
    color: #fff;
}
.footer-social .social-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    padding-top: 20px;
}

/* --- E-KATALOG SABİT BUTON --- */
#katalog-sabit-buton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 998;
    transition: transform 0.3s ease;
}
#katalog-sabit-buton:hover { transform: scale(1.05); }
#katalog-sabit-buton img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    filter: brightness(0) invert(1);
}
#katalog-sabit-buton span {
    font-weight: 500;
    font-size: 14px;
}

/* --- E-KATALOG POPUP (WOWBOOK) --- */
#katalog-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1001;
    display: none; /* JS ile flex yapılır */
    align-items: center;
    justify-content: center;
}
#katalog-popup-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
}
#katalog-icerik-alani {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#katalog-kapat-buton {
    position: absolute;
    top: -15px;
    right: -15px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 32px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1002;
    color: #333;
}
#katalog-loader {
    font-family: 'Poppins', sans-serif;
    color: white;
    font-size: 1.2rem;
}
#flipbook {
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* --- DUYURU POPUP --- */
#site-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#site-popup-container {
    position: relative;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.4);
    max-width: 600px;
    width: 100%;
}

#site-popup-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

#site-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 28px;
    line-height: 35px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 2001;
    color: #333;
}


/* ==========================================================================
   DESKTOP-ONLY STYLES (Sadece Masaüstü)
   ========================================================================== */
@media (min-width: 993px) {
    .main-nav .has-dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}


/* ==========================================================================
   MOBİL UYUMLULUK (RESPONSIVE)
   ========================================================================== */
@media (max-width: 992px) {
    .header-container {
        flex-wrap: wrap;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 80%;
        height: 100%;
        background: #ffffff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1001;
        transition: right 0.4s ease-in-out;
        padding-top: 80px;
        overflow-y: auto;
    }
    .main-nav.active {
        right: 0;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .main-nav ul li {
        width: 100%;
        margin: 0;
    }
    .main-nav ul li a {
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        color: var(--secondary-color);
        border-radius: 0;
        justify-content: space-between;
    }
    .mobile-menu-close {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 32px;
        line-height: 1;
        color: var(--primary-color);
    }
    
    .main-nav .has-dropdown > a .dropdown-icon::after {
        content: '+';
        font-size: 1.6rem;
        font-weight: 300;
        line-height: 1;
    }
    .main-nav .has-dropdown.open > a .dropdown-icon::after {
        content: '−';
    }
    
    .main-nav .has-dropdown .dropdown-menu {
        display: block; 
        position: static;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
        box-shadow: none;
        border: none;
        background-color: var(--light-gray);
        width: 100%;
        border-radius: 0;
        padding: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        border-bottom: 1px solid var(--border-color);
    }
    .main-nav .has-dropdown.open .dropdown-menu {
        max-height: 500px;
        padding: 10px 0;
    }
    .main-nav .dropdown-menu li a { padding-left: 30px; }
    
    #mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s, visibility 0.4s;
    }
    #mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .hero h1 { font-size: 2.8rem; }
    .tanitim .container { flex-direction: column; text-align: center; }
    .tanitim-sag { grid-template-columns: 1fr; width: 100%; max-width: 400px; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero { height: 60vh; }
    .hero h1 { font-size: 2rem; }
    .section-padding { padding: 50px 0; }
    .page-header h1 { font-size: 2.2rem; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-info, .footer-social { align-items: center; text-align: center;}
    .footer-social { align-items: center;}
    .duyuru-grid { grid-template-columns: 1fr; }
    .album-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    
}

