html {
    scroll-behavior: smooth;
}

/* Root variables for common colors */
:root {
    --main-bg-color: #f4f4f4;
    --primary-color: #333;
    --accent-color: white;
}

/* Global body styling */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--main-bg-color);
    color: var(--primary-color);
    height: 100%;
    overflow-x: clip;
}

/* Main container to hold header and hero section, making both 100vh */
.main-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header section */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: var(--main-bg-color);
    position: relative;
    height: 8vh;
}

/* Right-side container for Contact Us and Language Selector */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Space between language dropdown and Contact Us button */
}

.logo-and-title {
    display: flex;
    align-items: center;
}

.logo-and-title img {
    width: 3vw;
    max-width: 150px;
    min-width: 30px;
    margin-right: 1.2vw;
}

.logo-and-title h1 {
    font-size: 2em;
    font-weight: 900;
    margin: 0;
}

.header-language-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 10px;
}
/* Ensure flag sizes are consistent */
.current-flag {
    width: 44px;
    /* Match the size of the other flags */
    height: 28px;
    object-fit: cover;
    cursor: pointer;
}

/* Dropdown container styling */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Hide the dropdown content by default */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--main-bg-color);
    min-width: 120px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 5px;
    padding: 5px;
}

/* Style for the flags inside the dropdown without the black background */
.dropdown-content a {
    display: block;
    padding: 5px 10px;
    background: none;
    /* Remove the background from each flag */
}

.dropdown-content a img {
    width: 22px;
    /* Consistent flag size */
    height: 14px;
    object-fit: cover;
}

/* Show the dropdown on hover or focus */
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: block;
}

/* Hover effect for flags in the dropdown */
.dropdown-content a:hover img {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Contact Us button styling */
.contact-button {
    background-color: var(--primary-color);
    color: var(--accent-color);
    padding: 10px 20px;
    text-decoration: none;
    font-size: 1.2em;
    border-radius: 5px;
    font-weight: 500;
    margin-right: 15px;
}

header a {
    background-color: var(--primary-color);
    color: var(--accent-color);
    padding: 10px 20px;
    text-decoration: none;
    font-size: 1.2em;
    border-radius: 5px;
    font-weight: 500;
    margin-left: 20px;
    /* Ensure space between the Contact Us button and other elements */
}

/* Language Section with blurred background */
.language-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.language-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../imagenes/Violin_and_string_from_above_\(Unsplash\)small.jpg') center center/cover no-repeat;
    filter: blur(20px);
    scale: 1.1;
    z-index: -1;
}

.language-flags-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    gap: 20px;
    z-index: 1;
}

.language-flags-wrapper img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s, filter 0.3s;
}

/* Hero section styling */
.hero-section {
    background: url('./imagenes/Violin_and_string_from_above_\(Unsplash\)small.jpg') no-repeat center center/cover;
    color: var(--main-bg-color);
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    animation: fade-out linear;
    animation-timeline: view();
    animation-range: exit 300px;
}

@keyframes fade-out {
    to {
        opacity: 0;
        transform: scale(2.5);
        filter: blur(10px);
    }
}

.hero-text-wrapper {
    background-color: rgba(0, 0, 0, 0.45);
    padding: 20px;
    border-radius: 25px;
    max-width: 800px;
    animation: fade-out-wrap linear;
    animation-timeline: view();
    animation-range: exit 300px;
}

@keyframes fade-out-wrap {
    to {
        opacity: 0;
    }
}

/* About Section styling */
.about-section {
    background-color: var(--main-bg-color);
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.about-section h2 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-section p {
    font-size: 1.2em;
    max-width: 800px;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Benefit Section styling */
.benefit-section {
    padding: 50px 20px;
    background-color: var(--main-bg-color);
}

.benefit-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap; /* Allows content to wrap when the screen is small */
}

.benefit-content img {
    width: 100%;
    max-width: 683px;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    scale: 0.8;
    opacity: 0;
    filter: blur(10px);
    animation: fade-in linear forwards;
    animation-timeline: view();
    animation-range: 250px 500px;
    margin-right: 40px;
    /* Keep the spacing between image and text */
}

.benefit-text {
    flex: 1;
    min-width: 280px;
    padding-left: 20px;
    /*width: calc(100% - 723px);
    padding-left: 40px;
    /* Restore spacing between image and text */
}

.benefit-text h2 {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 20px;
}

.benefit-text p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
}

@keyframes fade-in {
    to {
        scale: 1;
        opacity: 1;
        filter: blur(0);
        border-radius: 10px;
    }
}

/* What We Do Section styling */
.what-we-do {
    padding: 50px 20px;
    text-align: center;
}

.what-we-do h2 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 40px;
}

.three-column {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
    flex-wrap: wrap; /* Allows columns to wrap when screen size is small */
}

.column-item {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin-bottom: 20px;
    flex: 1;
    /*height: 510px;    
    overflow: hidden;*/
}

.column-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    filter: blur(1.2px);
}

.text-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 194px;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
}

.text-box p {
    font-size: 1.4em;
    color: var(--accent-color);
}

/* Closing section with blurred background */
.closing-section {
    position: relative;
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden;
}

.closing-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('./imagenes/church_concert.webp') no-repeat center center/cover;
    filter: blur(2px);
    z-index: -1;
}

.closing-text-wrapper {
    position: relative;
    background-color: rgba(0, 0, 0, 0.45);
    padding: 20px;
    border-radius: 25px;
    max-width: 800px;
    z-index: 1;
}

.closing-text-wrapper p {
    font-size: 1.5em;
    font-weight: 300;
    color: var(--accent-color);
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .logo-and-title h1 {
        font-size: 1.5em;
    }

    .hero-text-wrapper p,
    .about-section p {
        font-size: 1.2em;
    }

    header a {
        font-size: 1em;
        padding: 8px 16px;
    }

    .contact-button {
            padding: 8px 16px;
            /* Slightly smaller padding for better fit */
            font-size: 1em;
            /* Reduce font size to make text fit better */
            margin-right: 10px;
            /* Adjust margin to create more space on small screens */
       }

    .about-section h2 {
        font-size: 2em;
    }

    .benefit-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .benefit-content img {
        margin-right: 0;
        margin-bottom: 20px;
        max-width: 90%;
    }

    .benefit-text {
        padding-left: 0;
        width: 100%;
        min-width: auto;
    }
                
    .three-column {
        flex-direction: column;
        /* Stack columns vertically */
        align-items: center;
        /* Center align columns */
    }
        
    .column-item {
        width: 90%; /* Make items take up most of the screen width */
        max-width: none; /* Remove the max-width constraint */
    }
}

@media (max-width: 480px) {
    .logo-and-title h1 {
        font-size: 1.2em;
    }

    .hero-text-wrapper p {
        font-size: 1em;
    }

    header a {
        font-size: 0.9em;
        padding: 6px 12px;
    }

    .contact-button {
            padding: 6px 12px;
            /* Further reduce padding for very small screens */
            font-size: 0.9em;
            /* Smaller font size to prevent text overflow */
            margin-right: 8px;
            /* Additional space for tiny screens */
    }
    
    .about-section h2 {
        font-size: 1.7em;
    }

    .about-section p {
        font-size: 1em;
        max-width: 90%;
    }
        
    .benefit-text h2 {
            font-size: 1.7em;
            /* Reduce heading size for small screens */
        }
    
        .benefit-text p {
            font-size: 1.1em;
            /* Slightly reduce paragraph font size */
        }
        .what-we-do h2 {
            font-size: 2em;
            /* Reduce heading size for small screens */
        }
}

@media (min-width: 1024px) {
    .logo-and-title h1 {
        font-size: 3em;
    }

    .hero-text-wrapper p {
        font-size: 2em;
    }

    header a {
        font-size: 1.5em;
        padding: 14px 24px;
    }
}