:root {
    --primary-color: #0c3c60;
    --secondary-color: #2ea3f2;
    --accent-color: #e09900;
    --text-color: #666666;
    --heading-color: #333333;
    --light-bg: #f7f7f7;
    --white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --container-width: 1140px;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
}

.text-center {
    text-align: center;
}

/* Header */
.header {
    background-color: var(--white);
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo img {
    height: 50px;
}

.nav-list {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-list li a {
    font-size: 14px;
    font-weight: 500;
    color: #3e5d7a;
    transition: color 0.3s;
}

.nav-list li a:hover {
    color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 40vh;
    background-image: url('media/Castillo Condes de Oropesa (foto).png');
    background-size: cover;
    background-position: bottom;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(142deg, rgb(0 32 105 / 80%) 0%, rgb(49 72 121 / 70%) 63%, rgba(211, 219, 234, 0.6) 100%);
    z-index: 0;
}


.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    padding-bottom: 160px;
    padding: 40px 20px 160px 20px
}

.hero-logo {
    width: 120px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 50px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 25px;
    line-height: 1;
    color: #ffffff;
}

.hero-title span {
    border-bottom: 4px solid #fff;
    padding-bottom: 10px;
    display: inline-block;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: #ffffff;
}

.hero-location {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    color: #ffffff;
}

.section-divider-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.section-divider-bottom svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.shape-fill-shadow {
    fill: rgba(0, 0, 0, 0.2);
}

.shape-fill-main {
    fill: #FFFFFF;
}

/* Sections General */
.history-section,
.essential-place {
    position: relative;
    padding: 120px 0;
    color: white;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    min-height: 600px;
}

.essential-place::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgb(0 22 7 / 56%) 0%, rgba(12, 60, 96, 0) 100%);
    z-index: 1;
}

.essential-place .container {
    position: relative;
    z-index: 2;
}

.essential-box {
    max-width: 700px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.essential-box .subtitle {
    display: inline-block;
    color: #ffd700;
    font-weight: 800;
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.essential-box h2 {
    font-size: 48px;
    margin-bottom: 25px;
    line-height: 1.2;
    color: #fff;
}

.essential-box p {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.essential-box .audio-guide {
    background: rgba(255, 255, 255, 0.15) !important;
    border-left: 4px solid #ffd700 !important;
    border-radius: 12px !important;
}

.essential-box .audio-guide p {
    color: #fff !important;
    margin-bottom: 5px !important;
}

.essential-place .divi-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.essential-place .toggle-header h4,
.essential-place .toggle-header i {
    color: #a99113;
}

.essential-place .toggle-content p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 16px !important;
}


.separator-line {
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 0 auto 40px;
}


/* Divi Refactoring Styles */
.places-intro-section {
    padding: 80px 0 40px;
    background-color: #f7f7f7;
}

.divi-row,
.monument-section {
    padding: 60px 0;
}

.alt-row {
    background-color: #f9f9f9;
}


.two-col {
    display: flex;
    gap: 60px;
    align-items: center;
}


.col-img,
.col-text {
    flex: 1;
}

.img-wrapper img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}


.col-text h2 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.mini-divider {
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Divi Toggle Module */
.divi-toggle {
    margin-top: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.toggle-header {
    background-color: #f8f8f8;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    padding: 0 20px;
}

.divi-toggle.active .toggle-content {
    max-height: 1000px;
    padding: 20px;
}

/* Animations (et_had_animation) */
.et_had_animation {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.et_had_animation.et_visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hiking */
.hiking-header {
    cursor: pointer;
}

.hiking-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.hiking-body.active {
    max-height: 500px;
    padding: 20px;
    border-left: 3px solid var(--primary-color);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

/* Footer */
.footer {
    background-color: #333;
    color: #999;
    padding: 40px 0;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive */
@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 40px;
    }

    .two-col,
    .two-col-equal {
        flex-direction: column;
        display: flex;
    }

    .two-col .col-img {
        order: -1;
    }

    .history-main-content {
        flex-direction: column;
        gap: 30px;
    }


    .history-card-wrapper {
        float: none !important;
        margin: 0 auto 30px !important;
        width: 100% !important;
        max-width: 320px;
    }

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

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .col-item {
        display: flex;
        flex-direction: column;
    }

    .col-item img {
        order: -1;
        margin-bottom: 20px;
    }
}




/* History Section - Screenshot Accuracy */
.history-section {
    padding: 80px 0 40px;
}

.section-title {
    font-size: 36px !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.blue-line {
    width: 60px;
    height: 1.5px !important;
    background-color: #1a2b5a !important;
    margin: 15px auto 40px !important;
}

.history-main-content {
    overflow: hidden;
}

.history-card-wrapper {
    float: left;
    margin: 0 40px 20px 0;
    max-width: 280px;
}

.history-card-img {
    width: 100%;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.history-main-content p {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 25px;
    text-align: justify;
}


/* Contact Tab */
.contact-tab {
    position: fixed;
    right: 0;
    top: 70%;
    transform: translateY(-50%);
    background-color: #3e5d7a;
    color: white;
    padding: 20px 10px;
    writing-mode: vertical-rl;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    border-radius: 5px 0 0 5px;
    z-index: 2000;
    cursor: pointer;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.contact-tab:hover {
    background-color: #2ea3f2;
}

/* Virtual Tour Section */
.virtual-tour-section {
    padding: 80px 0;
    background-color: #f0f4f8;
    position: relative;
    overflow: hidden;
}

.virtual-tour-section .container {
    max-width: 1400px;
}

.virtual-tour-section .section-header {
    margin-bottom: 50px;
}

.virtual-tour-section .subtitle {
    display: inline-block;
    background: #2ea3f2;
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.virtual-tour-section .section-title {
    margin-bottom: 10px;
}

.virtual-tour-section .section-title span {
    color: #2ea3f2;
}

.virtual-tour-section .separator-line {
    margin-bottom: 20px;
}

.virtual-tour-section .section-desc {
    color: #666;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.tour-container {
    padding: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.tour-wrapper {
    position: relative;
    width: 100%;
    height: 60vh;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.tour-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.tour-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    transition: all 0.3s;
    z-index: 10;
}

.tour-btn {
    background: #2ea3f2;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 20px rgba(46, 163, 242, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s;
}

.tour-overlay p {
    color: white;
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.9;
}

.tour-wrapper:hover .tour-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.tour-wrapper:hover .tour-btn {
    transform: scale(1.05);
}

/* Video Section */
.video-section {
    padding: 80px 0;
    background-color: #fcf4e3;
    position: relative;
    overflow: hidden;
}

.video-section .container {
    max-width: 1400px;
}

.video-section .section-header {
    margin-bottom: 50px;
}

.video-section .subtitle {
    display: inline-block;
    background: #e09900;
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.video-section .section-title {
    margin-bottom: 10px;
}

.video-section .section-title span {
    color: #e09900;
}

.video-section .separator-line {
    margin-bottom: 20px;
    background-color: #e09900;
}

.video-section .section-desc {
    color: #666;
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.video-container {
    padding: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    border: 1px solid #eee;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 60vh;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s;
}

.play-button {
    width: 80px;
    height: 80px;
    background: #e09900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 0 20px rgba(224, 153, 0, 0.4);
    transition: transform 0.3s;
}

.video-wrapper:hover .video-overlay {
    background: rgba(0, 0, 0, 0.4) !important;
}

.video-wrapper:hover .play-button {
    transform: scale(1.1);
}

/* Audio Guide Generic */
.audio-guide {
    margin-top: 25px;
    background: #f0f4f8;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2ea3f2;
}

.audio-guide p {
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 700;
    color: #1a2b5a;
}

.audio-guide audio {
    width: 100%;
}

.essential-box .audio-guide {
    background: rgba(255, 255, 255, 0.15) !important;
    border-left: 4px solid #ffd700 !important;
    border-radius: 12px !important;
}

.essential-box .audio-guide p {
    color: #fff !important;
}

/* Monument Sections Overrides */
.monument-section .audio-guide {
    margin-bottom: 25px;
}

.divi-toggle {
    margin-top: 25px;
}