/* 
  Style for Agatovo Chitalishte Website
*/

/* --- CSS Variables --- */
:root {
    /* Colors */
    --clr-primary: #d4af37; /* Elegant Gold */
    --clr-primary-dark: #b5952f;
    --clr-dark: #121212;
    --clr-dark-light: #1f1f1f;
    --clr-dark-border: #333333;
    --clr-light: #f8f9fa;
    --clr-light-dim: #e9ecef;
    --clr-text-main: #333333;
    --clr-text-muted: #6c757d;
    --clr-white: #ffffff;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Lora', serif;
    
    /* Layout */
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

/* --- Skip Navigation Link (accessibility & SEO) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--clr-primary);
    color: var(--clr-dark);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* --- Base Resets & Typography --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 5rem;
}

body {
    font-family: var(--font-main);
    color: var(--clr-text-main);
    background-color: var(--clr-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Utilities --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 5rem 0;
}

.bg-dark {
    background-color: var(--clr-dark);
    color: var(--clr-light);
}

.text-light {
    color: var(--clr-white);
}

.mt-2 {
    margin-top: 0.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--clr-primary);
    color: var(--clr-white);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
    background-color: var(--clr-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.6);
}

/* --- Header & Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    background: transparent;
}

.header.scrolled {
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    flex-direction: column;
    color: var(--clr-white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--clr-primary);
}

.logo-subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--clr-white);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--clr-primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--clr-primary);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--clr-white);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/main_image.jpg');
    background-size: cover;
    background-position: top center;
    z-index: -2;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* По-светъл слой, за да се вижда сградата ясно */
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 15vh auto 0; /* Пускаме текста по-надолу на големи екрани */
    text-align: center;
    color: var(--clr-white);
    padding: 2rem;
    /* Без кутия (box-shadow) и blur */
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8); /* Сянка за по-добра четимост */
}

.hero-title span {
    color: var(--clr-primary);
    display: block;
    font-size: 4rem;
    margin-top: 0.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* --- Sections Common --- */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--clr-dark);
}

.bg-dark .section-title {
    color: var(--clr-white);
}

.section-divider {
    width: 80px;
    height: 3px;
    background-color: var(--clr-primary);
    margin: 1rem auto 0;
}

/* --- About Section --- */
.about {
    background-color: var(--clr-light);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background-color: var(--clr-white);
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-bottom-color: var(--clr-primary);
}

.about-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--clr-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.about-card:hover .about-icon {
    background-color: var(--clr-primary);
    color: var(--clr-white);
}

.about-card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-card-text {
    color: var(--clr-text-muted);
}

/* --- Events Section --- */
.events {
    background-color: var(--clr-light-dim);
}

.event-card {
    background-color: var(--clr-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.event-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.06));
    color: var(--clr-primary-dark);
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.event-date-badge i {
    font-size: 0.9rem;
    color: var(--clr-primary);
}

.event-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--clr-primary);
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.event-text {
    font-size: 1.1rem;
    color: var(--clr-text-main);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    position: relative;
    aspect-ratio: 4 / 3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* --- Contacts Section --- */
.contacts-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    background-color: var(--clr-dark-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.contacts-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-style: normal;
}

.info-box {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--clr-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-content h4 {
    font-family: var(--font-main);
    color: var(--clr-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-content p {
    color: var(--clr-light-dim);
    font-size: 0.95rem;
}

.info-content a {
    color: var(--clr-white);
}

.info-content a:hover {
    color: var(--clr-primary);
}

.contacts-map {
    width: 100%;
    min-height: 400px;
}

/* --- Declarations Section --- */
.declarations {
    background-color: var(--clr-light);
}

.section-subtitle {
    color: var(--clr-text-muted);
    font-size: 1rem;
    margin-top: 1rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.declarations-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background-color: var(--clr-white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
    transition: var(--transition);
    max-width: 900px;
    margin: 0 auto;
}

.declarations-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.declarations-icon {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
    border: 2px solid rgba(212,175,55,0.3);
    color: var(--clr-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.4rem;
    transition: var(--transition);
}

.declarations-card:hover .declarations-icon {
    background: var(--clr-primary);
    color: var(--clr-white);
    border-color: var(--clr-primary);
}

.declarations-info {
    flex: 1;
}

.declarations-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--clr-dark);
    margin-bottom: 0.5rem;
}

.declarations-text {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.declarations-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .declarations-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .declarations-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Footer --- */
.footer {
    background-color: #0a0a0a;
    color: var(--clr-light);
    padding: 4rem 0 2rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--clr-dark-border);
    padding-bottom: 3rem;
}

.footer-brand h3 {
    color: var(--clr-primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

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

.footer-links a:hover {
    color: var(--clr-primary);
}

.footer-bottom {
    text-align: center;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

/* --- Scroll to Top Button --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--clr-primary);
    color: var(--clr-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--clr-primary-dark);
    color: var(--clr-white);
    transform: translateY(-5px);
}

/* --- Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-title span {
        font-size: 3.2rem;
    }
    
    .contacts-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contacts-map {
        height: 400px;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--clr-dark);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 2.5rem;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .hero-content {
        padding: 1rem;
        margin-top: 0;
    }

    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-title span {
        font-size: 1.6rem;
    }
    
    .section-padding {
        padding: 4rem 0;
    }
    
    .hero-bg {
        background-image: url('../images/main_image_mobile.png');
        background-position: center center;
    }

    .event-card {
        padding: 1.5rem;
    }

    .event-title {
        font-size: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* --- Modal / Lightbox --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
    color: var(--clr-primary);
    text-decoration: none;
}

