/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004499;
    text-decoration: underline;
}

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

/* Header */
header {
    background-color: #fff;
    padding: 30px 0;
    border-bottom: 3px solid #333;
}

.site-title {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    color: #666;
    line-height: 1.5;
}

/* Navigation */
.main-nav {
    background-color: #333;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95em;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    background-color: #555;
    text-decoration: none;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #444;
    min-width: 220px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #555;
    transition: background-color 0.3s ease;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background-color: #555;
    text-decoration: none;
}

/* Home Page Banner */
.home-page .main-nav {
    background-color: rgba(20, 20, 20, 0.74);
}

.home-page .nav-menu > li > a:hover,
.home-page .nav-menu > li > a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.home-banner {
    height: 38vw;
    min-height: 170px;
    padding: 0;
    overflow: hidden;
    line-height: 0;
    background-color: #fff;
}

.home-banner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 58%;
    opacity: 1;
}

/* Hero Section */
.hero {
    background-color: #2c3e50;
    color: #fff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
}

.hero-quote {
    font-size: 1.8em;
    font-style: italic;
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    border-left: 5px solid #fff;
    text-align: left;
}

.page-hero-title {
    font-size: 2.4em;
    margin-bottom: 12px;
}

.page-hero-subtitle {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.1em;
    line-height: 1.6;
}

.page-hero-subtitle a {
    color: #fff;
    text-decoration: underline;
}

.page-hero-subtitle a:hover {
    color: #ddd;
}

/* Shared Interior Hero */
body:not(.home-page) .hero {
    background-image: linear-gradient(rgba(44, 62, 80, 0.5), rgba(44, 62, 80, 0.5)), url("assets/plenitud-graphic.jpg");
    background-size: cover;
    background-position: center 34%;
}

/* Main Content */
.main-content {
    background-color: #fff;
    padding: 40px 0;
    min-height: 500px;
}

.intro-section {
    margin-bottom: 50px;
}

.intro-section p {
    font-size: 1.1em;
    margin-bottom: 20px;
    line-height: 1.8;
}

.intro-section strong {
    font-weight: bold;
    color: #000;
}

/* Chapters Section */
.chapters-section {
    margin-top: 40px;
}

.chapter-item {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.chapter-item:last-child {
    border-bottom: none;
}

.chapter-item h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.chapter-item h3 a {
    color: #0066cc;
    text-decoration: none;
}

.chapter-item h3 a:hover {
    color: #004499;
    text-decoration: underline;
}

.chapter-item p {
    font-size: 1em;
    color: #666;
    line-height: 1.6;
}

/* Chapter Detail Pages */
.chapter-section {
    margin: 44px 0;
}

.chapter-section h3 {
    font-size: 1.5em;
    margin-bottom: 16px;
    color: #222;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.media-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-item {
    margin: 0;
}

.media-item-wide {
    grid-column: 1 / -1;
    max-width: 820px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #111;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.media-item figcaption {
    margin-top: 12px;
    font-size: 0.95em;
    color: #555;
    line-height: 1.55;
}

.section-note {
    margin: 24px 0 14px;
    font-size: 1.05em;
    color: #444;
}

.chapter-image {
    margin: 26px 0 30px;
    text-align: center;
}

.chapter-image img {
    width: 100%;
    max-width: 640px;
    height: auto;
}

.chapter-list {
    margin-left: 24px;
    color: #333;
}

.chapter-list li {
    margin-bottom: 14px;
    line-height: 1.7;
}

.references-section .paragraph {
    font-size: 1em;
    line-height: 1.7;
    color: #555;
    margin-bottom: 18px;
    overflow-wrap: anywhere;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

footer a:hover {
    color: #ddd;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 2em;
    }

    .subtitle {
        font-size: 1em;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-menu > li {
        width: 100%;
    }

    .dropdown-menu {
        position: relative;
        box-shadow: none;
    }

    .hero-quote {
        font-size: 1.4em;
        padding: 15px;
    }

    .page-hero-title {
        font-size: 2em;
    }

    .page-hero-subtitle {
        font-size: 1em;
    }

    .intro-section p {
        font-size: 1em;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }

    .media-grid-3 {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.6em;
    }

    .hero-quote {
        font-size: 1.2em;
        border-left: 3px solid #fff;
    }

    .page-hero-title {
        font-size: 1.6em;
    }

    .chapter-item h3 {
        font-size: 1.2em;
    }

    header {
        padding: 20px 0;
    }

    .main-content {
        padding: 30px 0;
    }

}
