/* General Body & Typography */
:root {
    --dark-blue: #0A192F;
    --light-slate: #ccd6f6;
    --slate: #8892b0;
    --accent-blue: #00A1FF;
    --bg-light: #f8f9fa;
    --font-sans: 'Open Sans', sans-serif;
    --font-serif: 'Lora', serif;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-serif);
    font-weight: 700;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header & Navigation */
.main-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.3rem;
    color: var(--dark-blue);
    text-decoration: none;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav ul li { margin-left: 30px; }
.main-nav ul li a { text-decoration: none; color: var(--dark-blue); font-weight: 600; font-size: 1rem; transition: color 0.3s ease; }
.main-nav ul li a:hover { color: var(--accent-blue); }

/* HERO SECTION */
.hero-section {
    background-image: url('hero-background.jpg'); 
    background-size: cover;
    background-position: center center;
    color: var(--light-slate);
    text-align: center;
    padding: 60px 20px; 
    position: relative;
    display: flex;
    align-items: center;
}
.hero-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(10, 25, 47, 0.75); z-index: 1; }
.hero-section .container { position: relative; z-index: 2; max-width: 850px; }
.hero-section h1 { font-size: 2.8rem; color: #fff; margin-bottom: 15px; }
.hero-section h2 { font-family: var(--font-sans); font-weight: 400; font-size: 1.3rem; margin-bottom: 25px; color: var(--light-slate); }
.hero-section .hero-text { font-size: 1.1rem; max-width: 700px; margin: 0 auto 40px auto; color: var(--slate); }
.cta-button { background-color: transparent; color: var(--accent-blue); padding: 15px 30px; text-decoration: none; font-weight: 700; border-radius: 5px; transition: all 0.3s ease; border: 2px solid var(--accent-blue); display: inline-block; }
.cta-button:hover { background-color: rgba(0, 161, 255, 0.1); transform: translateY(-2px); }

/* General Section Styling */
section { 
    padding: 100px 20px;
}
section h2 { text-align: center; font-size: 2.5rem; margin-top: 0; margin-bottom: 60px; color: var(--dark-blue); }
.section-intro { text-align: center; max-width: 700px; margin: -40px auto 50px auto; font-size: 1.2rem; color: #555; }

/* MANIFESTO SECTION */
.manifesto-section {
    background-color: var(--bg-light);
}
.manifesto-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.7;
}
.manifesto-content p {
    margin-bottom: 25px;
}
.manifesto-content strong {
    color: var(--dark-blue);
}

/* Paradox & Methodology Sections */
.paradox-section { background-color: #fff; }
.methodology-section { background-color: var(--bg-light); }

/* Модификации за Flexbox подравняване в каретата */
.paradox-grid, .methodology-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Стилизиране на отделните карета за Flexbox подравняване */
.paradox-box, .methodology-point {
    display: flex; /* Прави кутията flex контейнер */
    flex-direction: column; /* Елементите да се подреждат вертикално */
    justify-content: space-between; /* Разпределя пространството, избутвайки бутона най-отдолу */
    align-items: center; /* Центрира съдържанието хоризонтално в кутията */
    padding: 25px; /* Добавям вътрешен отстъп за по-добър вид */
    border: 1px solid #e0e0e0; /* Примерна рамка */
    border-radius: 8px; /* Заоблени ъгли */
    text-align: center; /* Центрира текста вътре */
}

.paradox-box h3, .methodology-point h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--dark-blue);
}

.paradox-box p, .methodology-point p {
    margin-bottom: 15px; /* Добавя малко отстъп между параграфите */
}


/* Styles for the expandable content and button */
.hidden-content {
    display: block;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    width: 100%; /* Гарантира, че скритият контент заема цялата ширина */
    text-align: left; /* Връща текста наляво, ако родителят е центриран */
    padding: 0 15px; /* Добавя малко вътрешен отстъп */
    box-sizing: border-box; /* Включва padding в ширината */
}

.hidden-content.visible {
    max-height: 1000px; /* Достатъчно голяма височина, за да покаже цялото съдържание */
}

.toggle-button {
    background-color: var(--accent-blue);
    color: #fff;
    border: none;
    padding: 10px 15px;
    margin-top: 20px; /* Увеличих малко разстоянието отгоре */
    cursor: pointer;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    width: fit-content; /* Ширината на бутона се адаптира към текста */
    flex-shrink: 0; /* Гарантира, че бутонът няма да се смали */
}

.toggle-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}


/* Foundation Section */
.foundation-section {
    background-color: #fff;
    text-align: center;
}
.foundation-section .container {
    max-width: 800px;
}
.foundation-section strong {
    color: var(--dark-blue);
}

/* About Section (The Architect) */
.about-section { 
    background-image: url('architect-background.jpg');
    background-size: cover;
    background-position: center center;
    position: relative;
    color: var(--light-slate);
}
.about-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(10, 25, 47, 0.9);
    z-index: 1;
}
.about-section .container {
    position: relative;
    z-index: 2;
}
.about-section h2 {
    color: #fff;
}
.architect-profile { display: grid; grid-template-columns: 300px 1fr; gap: 50px; align-items: center; max-width: 1000px; margin: 0 auto; }
.architect-photo img { width: 100%; border-radius: 5px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.architect-bio h3 { margin-top: 0; font-size: 1.8rem; color: #fff; }
.architect-bio p { color: var(--slate); }
.architect-quote { font-family: var(--font-serif); font-style: italic; font-size: 1.2rem; border-left: 3px solid var(--accent-blue); padding-left: 20px; margin-top: 20px; color: var(--light-slate); }

/* Publications Section */
.publications-section { background-color: var(--bg-light); }
.publications-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; max-width: 800px; margin: 0 auto; }
.publication-card { 
    background-color: #fff;
    border: 1px solid #dee2e6; 
    padding: 30px; 
}
.publication-card h3 { margin-top: 0; }
.publication-card a { color: var(--accent-blue); text-decoration: none; font-weight: bold; }
.publication-card span { color: var(--slate); font-style: italic; }

/* CONTACT SECTION */
.contact-section {
    background-color: #fff;
    text-align: center;
}
.contact-details {
    max-width: 450px;
    margin: 0 auto;
    background-color: var(--dark-blue);
    color: var(--light-slate);
    padding: 40px;
    border-radius: 8px;
}
.contact-name {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 5px 0;
}
.contact-title {
    font-size: 1rem;
    color: var(--slate);
    margin: 0 0 25px 0;
}
.contact-info {
    display: flex;
    align-items: flex-start;
    font-size: 1.1rem;
    margin: 15px 0;
}
.contact-info strong {
    flex-shrink: 0;
    width: 100px;
    color: var(--slate);
    text-align: left;
}
.contact-info a {
    color: var(--light-slate);
    text-decoration: none;
    font-weight: 600;
    word-break: break-all;
}
.contact-info a#open-form-btn { /* Style to look clickable */
    cursor: pointer;
    text-decoration: underline;
}
.contact-info a:hover {
    color: var(--accent-blue);
}

/* FOOTER */
.main-footer { background-color: #050E1D; color: var(--slate); padding: 50px 20px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 50px; }
.footer-pane h4 { color: var(--light-slate); margin-bottom: 15px; font-size: 1rem; }
.footer-pane p { margin: 0 0 15px 0; }
.footer-pane p strong { color: var(--light-slate); display: block; }
.footer-pane .location-role { display: block; font-size: 0.8rem; color: #6a7792; font-style: italic; }
.footer-pane a { color: var(--slate); text-decoration: none; display: block; margin-bottom: 8px; }
.footer-pane a:hover { color: var(--accent-blue); }
.legal-note { font-size: 0.8rem; color: #6a7792; line-height: 1.5; }

/* MODAL STYLES */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 25, 47, 0.8);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}
.modal-content {
    position: relative;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    animation: slideIn 0.4s ease-out;
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    border: none;
    background: none;
    cursor: pointer;
}
.close-btn:hover, .close-btn:focus {
    color: var(--dark-blue);
}
.modal-content h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--dark-blue);
}
.contact-form {
    padding: 0;
}
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-blue);
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-sans);
    box-sizing: border-box;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 5px rgba(0, 161, 255, 0.5);
}
.contact-form .cta-button {
    width: 100%;
    border: none;
    background-color: var(--accent-blue);
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
}
.contact-form .cta-button:hover {
    background-color: #0056b3;
}

/* Animations for modal */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .paradox-grid, .methodology-grid { grid-template-columns: 1fr; }
    /* Трябва да премахнем 'align-items: center' за .paradox-box и .methodology-point
       когато станат на един ред, ако искаме текста да е наляво */
    .paradox-box, .methodology-point {
        align-items: flex-start; /* Връща текста наляво на мобилни устройства */
        text-align: left;
    }
    .toggle-button {
        margin-left: 0; /* Връща бутона наляво */
        margin-right: auto;
    }
}
@media (max-width: 768px) {
    .main-header .container { flex-direction: column; }
    .main-nav ul { margin-top: 15px; }
    .hero-section h1 { font-size: 2.5rem; }
    .publications-grid, .footer-grid { grid-template-columns: 1fr; }
}