/* Genel Ayarlamalar */
:root {
    --primary-color: #bb1333; /* Kırmızı */
    --secondary-color: #f0f0f0; /* Açık Gri */
    --text-color: #333;
    --light-text-color: #f9f9f9;
    --dark-bg: #2c3e50; /* Koyu Mavi/Gri */
    --hero-flag-size: 180px; /* Bayrak boyutu */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 20px;
}

h1 {
    font-size: 3.5em;
    color: var(--light-text-color);
}

h2 {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 40px;
}

p {
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.btn:hover {
    background-color: #8f0d28; /* Kırmızının daha koyu tonu */
}

/* Bölümler */
.section {
    padding: 80px 0;
    opacity: 0; /* JS ile görünür yapılacak */
    transform: translateY(50px); /* JS ile yukarı kaydırılacak */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section - Başlangıç Alanı */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('background.jpg') center center/cover no-repeat; /* Henüz resim yok, sonra ekleriz */
    color: var(--light-text-color);
    text-align: center;
    padding: 150px 0;
    position: relative; /* Bayrak animasyonu için */
    overflow: hidden; /* Bayrağın taşmasını engeller */
}

.hero-section::before { /* Bayrak kırmızısı */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    opacity: 0.8;
    z-index: -1;
}

.hero-section::after { /* Ay ve yıldız (CSS ile basit bir çizim) */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: var(--hero-flag-size); /* Ay boyutu */
    height: var(--hero-flag-size);
    border-radius: 50%;
    box-shadow: -30px 10px 0 0 white, /* Ay */
                0 0 0 10px transparent; /* Gölgelerle hilal efekti */
    z-index: -1;
    animation: pulse 2s infinite alternate; /* Canlandırma */
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
}

/* Tarihsel Yolculuk Bölümü */
.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px auto;
    font-size: 1.1em;
    color: var(--text-color);
}

.timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 40px 0;
    flex-wrap: wrap; /* Küçük ekranlarda alta geçiş için */
}

.timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
    transform: translateY(-50%);
    z-index: 1;
}

.timeline-item {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex: 1;
    margin: 0 15px;
    z-index: 2;
    position: relative;
    text-align: center;
    min-width: 280px; /* Elemanların minimum genişliği */
    margin-bottom: 30px; /* Dikey düzende boşluk bırakmak için */
}

.timeline-item h3 {
    color: var(--dark-bg);
    font-size: 1.5em;
    margin-bottom: 10px;
}

.timeline-item h4 { /* Yeni eklenen yıl başlığı için */
    color: var(--primary-color);
    font-size: 1.2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-item p { /* Yeni eklenen detay paragrafları için */
    font-size: 0.95em;
    line-height: 1.6;
    text-align: justify;
}

/* Mehmet Akif Ersoy Köşesi */
.akif-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.akif-content {
    display: flex;
    flex-direction: column; /* Mobil için varsayılan */
    align-items: center;
    gap: 30px;
    margin-top: 30px;
}

.akif-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.akif-text {
    max-width: 700px;
    text-align: justify;
}

.akif-text h3 {
    text-align: center;
    color: var(--dark-bg);
    margin-bottom: 20px;
    font-size: 2em;
}

.akif-quote {
    font-style: italic;
    margin-top: 30px;
    padding: 20px;
    background-color: #e0e0e0;
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
    color: var(--dark-bg);
    font-size: 1.1em;
}

/* İstiklal Marşı Dizeleri Bölümü */
.anthem-lines-section {
    background-color: white;
}

.anthem-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.anthem-stanza {
    background-color: var(--secondary-color);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-top: 5px solid var(--primary-color);
    position: relative; /* Tooltip için */
}

.anthem-stanza h3 {
    color: var(--dark-bg);
    font-size: 1.8em;
    margin-bottom: 15px;
    text-align: center;
}

.anthem-stanza p {
    font-size: 1.1em;
    line-height: 1.8;
    text-align: center;
}

.info-word {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--primary-color);
    font-weight: 600;
}

.info-word::after {
    content: attr(data-info); /* data-info özniteliğindeki metni göster */
    position: absolute;
    bottom: 120%; /* Kelimenin üstünde göster */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    padding: 8px 12px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
    font-size: 0.9em;
}

.info-word::before { /* Tooltip oku */
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background-color: var(--dark-bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9;
}


.info-word:hover::after,
.info-word:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Etkileşimli Marş Dinleme Bölümü */
.listen-section {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    text-align: center;
}

.listen-section h2, .listen-section h3 {
    color: var(--light-text-color);
}

.audio-player-container, .recorder-container {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: inline-block; /* İçeriğe göre genişlemesini sağlar */
    max-width: 600px;
    width: 100%;
}

.audio-player-container audio {
    width: 100%;
    margin-bottom: 20px;
}

.control-btn {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    margin: 5px;
}

.control-btn:hover {
    background-color: #8f0d28;
}

.control-btn:disabled {
    background-color: #777;
    cursor: not-allowed;
}

.recorder-container {
    margin-top: 40px;
}

#recordedAudioContainer {
    margin-top: 20px;
}

#recordedAudioContainer audio {
    width: 100%;
    margin-top: 15px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
}

/* Görsel ve Video Galerisi */
.gallery-section {
    background-color: var(--secondary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden; /* Resimlerin köşeleri yuvarlak olsun diye */
    display: flex;
    flex-direction: column;
}

.gallery-item img {
    width: 100%;
    height: 200px; /* Sabit yükseklik */
    object-fit: cover; /* Resmi kutuya sığdırır, oranları korur */
    display: block;
}

.gallery-item .caption {
    padding: 15px;
    font-size: 0.95em;
    color: var(--text-color);
    text-align: center;
    flex-grow: 1; /* Metnin dikeyde eşitlenmesini sağlar */
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-item .video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 oranı (video yüksekliği) */
    height: 0;
    overflow: hidden;
}

.video-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* Footer */
footer {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    text-align: center;
    padding: 30px 0;
    font-size: 0.9em;
}

/* Responsive Düzenleme */
@media (min-width: 769px) {
    .akif-content {
        flex-direction: row; /* Masaüstü için yan yana */
        text-align: left;
    }

    .akif-text h3 {
        text-align: left;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    h2 {
        font-size: 2em;
    }

    .timeline {
        flex-direction: column;
        align-items: center;
    }

    .timeline::before {
        width: 4px;
        height: 100%;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        margin: 20px 0;
        width: 90%;
    }

    .akif-photo {
        width: 200px;
        height: 200px;
    }

    .anthem-content {
        grid-template-columns: 1fr; /* Mobil için tek sütun */
    }

    .gallery-grid {
        grid-template-columns: 1fr; /* Mobil için tek sütun */
    }
}