:root {
    --color-primary: #F05F1F;
    --color-secondary: #EF8D65;
    --color-accent: #208DEF;
    --color-dark: #4C4C4C;
    --color-light: #FFFFFF;
    --color-gray: #DBDBDB;
    --color-gray-medium: #9A9A9A;
    --color-light-gray: #EEEDED;
    --color-aquamarine: #00abbf;
    --color-orange: #f48b37;
    --color-link: #2b388f;
    --color-text: #212529;
}

.flash-message {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 320px;
    max-width: 90vw;
    text-align: center;
    pointer-events: none;
}

.alert-success {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
    color: #174c2b;
    border: 2px solid #1ec773;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(30, 199, 115, 0.18);
    font-size: 1.2rem;
    font-weight: bold;
    padding: 18px 32px 18px 22px;
    margin: 0 auto;
    animation: pop-in 0.6s cubic-bezier(.68,-0.55,.27,1.55);
}

.alert-success::before {
    content: '\2714';
    font-size: 1.5rem;
    color: #1ec773;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #1ec773;
    margin-right: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pop-in {
    0% { opacity: 0; transform: scale(0.7) translateY(-40px) translateX(-50%); }
    80% { opacity: 1; transform: scale(1.05) translateY(5px) translateX(-50%); }
    100% { opacity: 1; transform: scale(1) translateY(0) translateX(-50%); }
}

body {
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    margin: 0;
    overflow-y: scroll;
    color: var(--color-text);
}

.contact-cards {
    padding: 10px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-cards img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
}

.contact-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 10px;
    min-width: 200px;
    color: var(--color-link);
    text-align: center;
}

.contact-card a {
    text-decoration: none;
    color: var(--color-link);
    margin-top: 5px;
}

.translate-btn {
    margin: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

#language-selector {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid var(--color-gray);
    background-color: white;
    cursor: pointer;
}

.fixed-logo {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%);
    width: 800px;
    height: 180px;
    background-repeat: no-repeat;
    background-size: fill;
    cursor: pointer;
    text-decoration: none;
    z-index: 100; /* Asegurar que esté por encima del carousel */
}

.button-list {
    background-color: var(--color-aquamarine);
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Header controls container ("tour" class in base.html) */
.tour {
    background-color: var(--color-aquamarine);
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    height: 40px;
    width: 220px;
    background-color: #fff;
    border-radius: 5px;
    border: solid 1px var(--color-gray);
    margin-right: 15px;
    box-sizing: border-box;
    padding: 0; /* remove UA default padding on button */
}

.filter-btn select {
    height: 100%;
    width: 100%;
    padding: 5px 20px;
    font-size: large;
    color: var(--color-text);
    border: 0;
    outline: none;
}

/* Ensure language selector (wrapped in a form) is vertically centered like others */
.button-list .filter-btn form {
    height: 100%;
    display: flex;
    align-items: center;
}

/* Apply same form normalization when inside .tour container */
.tour .filter-btn form {
    height: 100%;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Make sure the header language select fills the container consistently */
#language-selector-header {
    height: 100%;
    width: 100%;
    padding: 5px 20px;
    font-size: large;
    color: var(--color-text);
    border: 0;
    outline: none;
    box-sizing: border-box;
}

.action-btn {
    height: 40px;
    width: 150px;
    border: none;
    margin-left: 4px;
    border-radius: 5px;
    padding: 5px 20px;
    font-size: large;
    background-color: var(--color-orange);
    color: #fff;
    cursor: pointer;
    box-sizing: border-box;
}

.header-carousel {
    position: relative;
    height: 42vh;
    width: 100%;
    overflow: hidden;
    background-repeat: no-repeat;
    background-size: cover;
}

.header-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.header-slide.active {
    opacity: 1;
}

.fixed-images {
    position: absolute;
    top: 100px;
    right: 35px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.fixed-image {
    width: 160px;
    height: auto;
    transition: transform 0.3s ease;
}

.fixed-image:hover {
    transform: scale(1.05);
}

main {
    max-width: 1400px;
    margin: 0 auto;
}

#about-us {
    color: #fff;
    font-weight: bold;
    font-size: larger;
    border: none;
    background-color: transparent;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.cards {
    margin: 20px 5px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
}

.card {
    border: none;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    flex: 1;
    max-width: 400px;
    aspect-ratio: 4/3;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
}

.card-title {
    color: #fff;
    text-align: center;
    margin: 20px 30px;
    z-index: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.card-btn {
    width: 100%;
    height: 40px;
    background-color: var(--color-orange);
    color: #fff;
    border: none;
    margin-top: auto;
    cursor: pointer;
    z-index: 1;
    transition: background-color 0.3s ease;
}

.card:hover > .card-btn{
    background-color: var(--color-primary);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
}

.footer-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 150px 20px;
    margin-bottom: 30px;
    background-color: var(--color-aquamarine);
    color: #fff;
}

.footer-container h1 {
    text-align: center;
}

.footer-cards {
    display: flex;
    justify-content: space-around;
    gap: 200px;
}

.footer-card {
    flex: 1;
    overflow-x: hidden;
}

.footer-card p {
    text-align: center;
}

.footer-card-logo {
    overflow-x: hidden;
}

@media (max-width: 1300px) {
    .fixed-logo {
        width: 850px;
        height: 160px;
    }
}

@media (max-width: 1200px) {
    .fixed-logo {
        width: 700px;
        height: 160px;
    }

    .footer-cards {
        gap: 150px;
    }

    .footer-container {
        padding: 0 100px 20px;
    }
}

@media (max-width: 1000px) {
    .fixed-logo {
        width: 500px;
        height: 120px;
    }
}

@media (max-width: 900px) {
    .fixed-logo {
        width: 400px;
        height: 100px;
    }

    .footer-cards {
        gap: 100px;
    }

    .footer-container {
        padding: 0 80px 20px;
    }
}

@media (max-width: 768px) {
    .button-list {
        flex-direction: column;
        gap: 10px;
    }

    .filter-btn {
        display: none;
        opacity: 0;
        max-height: 0;
        transition: opacity 0.5s, max-height 0.5s;
        margin-right: 0;
    }

    .filter-btn.show {
        display: block;
        opacity: 1;
        max-height: 100px;
        transition: opacity 0.5s, max-height 0.5s;
    }

    #find-tour-btn {
        transition: margin-top 0.5s, width 0.5s;
        width: 220px;
        margin-top: 0;
    }

    #find-tour-btn.moved {
        width: 220px;
    }

    .filter-btn select {
        text-align: center;
    }

    /* Apply same column behavior to .tour container */
    .tour {
        flex-direction: column;
        gap: 10px;
    }

    /* Ensure language selector container aligns like others in column mode */
    .tour .filter-btn {
        margin-left: 0 !important; /* override inline margin */
        margin-right: 0;
        align-self: center;
        width: 220px; /* match selects width */
    }

    /* Make Find Tour button same width as selects in column mode */
    .tour #find-tour-btn {
        width: 220px;
        margin-left: 0;
        align-self: center;
    }

    .fixed-logo {
        width: 350px;
        height: 80px;
    }

    .footer-cards {
        gap: 80px;
    }

    .footer-container {
        padding: 0 50px 20px;
    }
}

@media (max-width: 670px) {
    .translate-btn {
        order: 100;
        width: 100%;
        justify-content: center;
        margin-top: 20px;
    }

    .fixed-logo {
        width: 300px;
        height: 70px;
    }

    .fixed-image {
        width: 100px;
    }

    .footer-cards {
        flex-direction: column;
        gap: 50px;
    }

    .footer-card {
        width: 300px;
        margin: auto;
    }

    .footer-container {
        padding: 0 30px 20px;
    }

    #about-us {
        margin-top: 30px;
    }
}

@media (max-width: 600px) {
    .fixed-logo {
        width: 250px;
        height: 60px;
    }

    .fixed-image {
        width: 90px;
    }

    .footer-card {
        font-size: small;
    }
}

@media (max-width: 550px) {
    .action-btn, .filter-btn select {
        font-size: medium;
    }
}

@media (max-width: 515px) {
    .fixed-images {
        display: none;
    }

    .fixed-image {
        display: none;
    }

    .footer-card {
        font-size: smaller;
    }
}
