/* Custom Styles for Tequila Concierge Hub */

/* Color Palette */
:root {
    --primary-teal: #004d40;
    /* Dark Teal */
    --secondary-teal: #00796b;
    /* Medium Teal */
    --light-teal: #e0f2f1;
    /* Very Light Teal */
    --gold-accent: #ffcc00;
    /* Gold Accent */
    --dark-neutral: #333333;
    /* Dark Gray for text/backgrounds */
    --light-neutral: #f8f9fa;
    /* Light Gray for backgrounds */
    --white: #ffffff;
    /* Pure White */
}

/* Ensure html and body are set up correctly for fixed/sticky elements */
html {
    height: 100%; /* Needed for fixed elements to reference viewport */
}

body {
    overflow-x: hidden; /* Prevent horizontal scrolling */
    min-height: 100vh; /* Ensure body takes full height */
    position: relative; /* Needed for z-index context on some browsers */
}

/* Reusable Classes */
.text-primary-teal {
    color: var(--primary-teal) !important;
}

.text-secondary-teal {
    color: var(--secondary-teal) !important;
}

.text-gold-accent {
    color: var(--gold-accent) !important;
}

.bg-primary-teal {
    background-color: var(--primary-teal) !important;
}

.bg-secondary-teal {
    background-color: var(--secondary-teal) !important;
}

/* === Sticky Header Fix === */
/* This ensures the top banner (flash ticker + navbar) truly sticks */
.sticky-top {
    position: sticky; /* Key property for sticky behavior */
    top: 0; /* Sticks to the top of the viewport */
    z-index: 1040; /* Higher than other fixed/floating elements */
    background-color: var(--white); /* Ensure background is set for sticky */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Optional shadow */
}

/* Navbar */
.navbar {
    background-color: var(--white);
    padding: 0.75rem 0;
}

.navbar-logo {
    height: 50px;
}

.nav-link {
    font-weight: 500;
    color: var(--primary-teal);
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-teal);
}

.btn-gold-accent {
    background-color: var(--gold-accent);
    color: var(--dark-neutral);
    border: none;
    transition: background-color 0.3s ease;
}

.btn-gold-accent:hover {
    background-color: #ffda47; /* Lighter gold on hover */
    color: var(--dark-neutral);
}

/* Hero Banner */
.hero-banner {
    height: 80vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.hero-slide {
    height: 80vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.hero-slide h1 {
    font-size: 3.5rem;
    line-height: 1.2;
}

.hero-slide p {
    font-size: 1.25rem;
}

.btn-primary-alt {
    background-color: var(--primary-teal);
    color: var(--white);
    border: 1px solid var(--primary-teal);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-primary-alt:hover {
    background-color: var(--secondary-teal);
    border-color: var(--secondary-teal);
    color: var(--white);
}

.btn-outline-light-alt {
    border: 2px solid var(--white);
    color: var(--white);
    background-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-outline-light-alt:hover {
    background-color: var(--white);
    color: var(--primary-teal);
}


/* Swiper Customizations */
.swiper-pagination-bullet {
    background: var(--white);
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background: var(--gold-accent);
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--gold-accent) !important;
}

/* Flash Ticker */
.flash-ticker-section {
    background-color: var(--primary-teal);
    color: var(--white);
    font-size: 0.9rem;
    overflow: hidden;
    position: relative;
}

.flash-ticker {
    white-space: nowrap;
    animation: marquee 30s linear infinite;
    display: flex; /* Use flexbox to keep items in a row */
    gap: 2rem; /* Space between news items */
    padding-left: 100%; /* Start off-screen */
}

.flash-ticker:hover {
    animation-play-state: paused;
}

.flash-ticker a {
    color: inherit;
    text-decoration: none;
    padding: 0 1rem; /* Space around each news item */
    display: inline-block; /* Ensure items take up their own space */
}

.flash-ticker a:hover {
    text-decoration: underline;
}

@keyframes marquee {
    0% {
        transform: translateX(0%);
    }

    100% {
        transform: translateX(-100%);
    }
}


/* Featured Global Events */
.featured-events {
    background-color: var(--light-neutral);
}

.event-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.event-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.event-card .card-title {
    color: var(--primary-teal);
    font-weight: 600;
}

.event-card .card-text {
    color: var(--dark-neutral);
}

.event-card .btn-primary {
    background-color: var(--primary-teal);
    border-color: var(--primary-teal);
}

.event-card .btn-primary:hover {
    background-color: var(--secondary-teal);
    border-color: var(--secondary-teal);
}


/* Our Values Section */
.our-values .value-card {
    border: 1px solid var(--light-teal);
    background-color: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.our-values .value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Call to Action Section */
.cta-concierge {
    background: linear-gradient(rgba(0, 77, 64, 0.9), rgba(0, 77, 64, 0.9)), url('images/cta-bg.jpg') no-repeat center center;
    background-size: cover;
}

.cta-concierge .btn-gold-accent {
    font-weight: bold;
}

/* Video Section */
.video-section {
    background-color: var(--dark-neutral);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 10px;
}

.video-container video,
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Real Results */
.real-results .result-card {
    border: 1px solid var(--light-teal);
    background-color: var(--white);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.real-results .result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Sports Highlights */
.sports-highlights {
    background-color: var(--dark-neutral);
}

.sports-highlights .card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.sports-highlights .card-title {
    color: var(--gold-accent);
}

.sports-highlights .card-text {
    color: rgba(255, 255, 255, 0.8);
}


/* Footer */
.footer {
    background-color: var(--primary-teal);
    color: var(--white);
}

.footer-heading {
    color: var(--gold-accent);
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-contact-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.footer-contact-list i {
    margin-right: 0.5rem;
    color: var(--gold-accent);
    font-size: 1.1rem;
    margin-top: 0.2rem;
}


.social-icon {
    font-size: 1.5rem;
    color: var(--white);
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: var(--gold-accent);
}

.footer-hr {
    border-color: rgba(255, 255, 255, 0.2);
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Floating Buttons (Call & WhatsApp) */
.tequila-float-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9998; /* Ensures it's above most content */
}
.tequila-call, .tequila-whatsapp {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    text-decoration: none;
    animation: pulseGlow 2s infinite;
    box-shadow: 0 0 15px rgba(0,0,0,0.3); /* Add shadow for visibility */
}
.tequila-call { background: #ffc107; } /* Gold */
.tequila-whatsapp { background: #25D366; } /* WhatsApp Green */

@keyframes pulseGlow {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Chatbot Toggler */
.chatbot-toggler {
    position: fixed;
    bottom: 30px;
    right: 35px;
    height: 50px;
    width: 50px;
    background: var(--primary-teal);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 9999; /* Higher than floating call/whatsapp */
}

.chatbot-toggler:hover {
    transform: scale(1.05);
    background-color: var(--secondary-teal);
}

.chatbot-toggler span {
    position: absolute;
}

.show-chatbot .chatbot-toggler span:first-child {
    opacity: 0;
}
.show-chatbot .chatbot-toggler span:last-child {
    opacity: 1;
}
.chatbot-toggler span:last-child { /* Ensure the X is hidden by default */
    opacity: 0;
}


/* Chatbot Box */
.chatbot {
    position: fixed;
    bottom: 90px;
    right: 35px;
    width: 420px;
    height: 600px; /* Fixed height for desktop */
    max-height: 80vh; /* Max height relative to viewport */
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    transform: scale(0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9998; /* Below chatbot toggler, above floating call/whatsapp */
    display: flex;
    flex-direction: column;
}

.show-chatbot .chatbot {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.chatbot header {
    padding: 16px 20px;
    background: var(--primary-teal);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 15px 15px 0 0;
    position: relative;
    flex-shrink: 0;
}

.chatbot header h2 {
    font-size: 1.4rem;
    color: var(--white);
    margin: 0;
}

.chatbot header span {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.chatbot header span:hover {
    color: var(--gold-accent);
}

.chatbot .chatbox {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--light-neutral);
    border-bottom: 1px solid #eee;
}

.chatbox .chat {
    display: flex;
    list-style: none;
    margin-bottom: 15px;
    align-items: flex-start; /* Align items to the top */
}

.chatbox .chat p {
    white-space: pre-wrap;
    padding: 12px 16px;
    border-radius: 10px;
    max-width: 75%;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    background-color: var(--white);
    color: var(--dark-neutral);
}

.chatbox .outgoing {
    justify-content: flex-end;
}

.chatbox .outgoing p {
    background-color: var(--secondary-teal); /* Changed to secondary teal for outgoing */
    color: var(--white);
    border-top-right-radius: 0;
}

.chatbox .incoming span {
    height: 32px;
    min-width: 32px; /* Ensure icon circle doesn't shrink too much */
    color: var(--white);
    background: var(--primary-teal);
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start; /* Align icon to top of message */
    font-size: 1.1rem;
}

.chatbox .incoming p {
    border-top-left-radius: 0;
}

.chatbox .error-message {
    background-color: #ffe0e0 !important;
    color: #cc0000 !important;
    border: 1px solid #cc0000;
}

.chatbot .chat-input {
    display: flex;
    border-top: 1px solid #ccc;
    padding: 12px 15px;
    background: #fff;
    border-radius: 0 0 15px 15px;
    flex-shrink: 0;
}

.chat-input textarea {
    flex: 1;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    font-size: .95rem;
    resize: none;
    outline: none;
    margin-right: 10px;
    transition: border-color 0.2s ease;
}

.chat-input textarea:focus {
    border-color: var(--primary-teal);
}

.chat-input span {
    width: 40px;
    height: 40px;
    background: var(--primary-teal);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.chat-input span:hover {
    opacity: 0.8;
    background-color: var(--secondary-teal);
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .navbar-brand span {
        font-size: 0.9rem;
    }

    .hero-slide h1 {
        font-size: 2.5rem;
    }

    .hero-slide p {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .chatbot {
        right: 20px;
        bottom: 70px;
        width: 350px;
        height: 550px; /* Adjusted height for tablet */
    }

    .chatbot-toggler {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        padding-left: 1rem;
    }

    .navbar-collapse {
        background-color: var(--white);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }

    .hero-banner {
        height: 60vh;
        min-height: 400px;
    }

    .hero-slide h1 {
        font-size: 2rem;
    }

    .hero-slide p {
        font-size: 0.9rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .footer .col-md-4,
    .footer .col-md-2 {
        text-align: center;
    }

    .footer-contact-list li {
        justify-content: center;
    }

    .social-links {
        text-align: center;
    }

    .chatbot {
        bottom: 20px;
        right: 20px;
        width: calc(100% - 40px);
        /* Full width minus margin */
        height: calc(100% - 40px);
        max-height: 90vh; /* Max height for mobile to avoid being too tall */
        border-radius: 10px; /* Slightly smaller border radius for mobile */
    }

    .chatbot header {
        border-radius: 10px 10px 0 0;
    }

    .chatbot .chat-input textarea {
        height: 40px;
    }
}
