/* ===========================================
   MODERN DESIGN SYSTEM - Refined
   =========================================== */

:root {
    --primary: #00a8cc;
    --primary-dark: #0077b6;
    --secondary: #1a1a2e;
    --accent: #16213e;
    --success: #25d366;
    --warning: #f5d670;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.05);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Styles - Unchanged */
#modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    z-index: 99999;
}

#modal .contenido {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 605px;
    width: 90%;
    animation: modalFadeIn 0.5s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

#modal .contenido img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

#btn-cerrar {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 48px;
    color: #fff;
    cursor: pointer;
    z-index: 100000;
    font-weight: 200;
    transition: var(--transition);
}

#btn-cerrar:hover {
    color: #ff6b6b;
    transform: rotate(90deg);
}

/* 
   POSITIONS UPDATED
   - WhatsApp: Moved Left 30px -> Right: 90px
   - Chatbot: Raised 60px -> Bottom: 220px
*/
.float-whatsapp {
    position: fixed;
    width: 56px;
    height: 56px;
    bottom: 25px;
    right: 70px;
    /* Moved left */
    background: var(--success);
    color: #FFF;
    border-radius: 50%;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 99997;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    animation: whatsapp-blink 2s infinite;
}

@keyframes whatsapp-blink {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
        transform: scale(1);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
        transform: scale(1);
    }
}

.float-whatsapp:hover {
    background: #128c7e;
    color: #FFF;
    transform: scale(1.1) translateY(-5px);
}

#chatbot-container,
.chatbot-container,
[id*="chatbot"],
.chathub,
#chathub {
    bottom: 100px !important;
    /* Raised higher */
    right: 20px !important;
    /* Aligned with WhatsApp */
    z-index: 99998 !important;
}

@media (max-width: 768px) {
    .float-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    #chatbot-container,
    .chatbot-container {
        bottom: 120px !important;
        right: 20px !important;
    }
}

/* Transparent Header */
.main-header .header-upper {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    position: absolute;
    /* Find out if it needs absolute to overlay banner or fixed */
    width: 100%;
}

.main-header .header-top {
    background: rgba(26, 26, 46, 0.95);
}

.main-header .sticky-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
}

/* ===================================
   TRANSPARENT GLASS CARDS + ANIMATION
   =================================== */
.services-section {
    background: #f0f2f5;
    padding: 60px 0;
}

.services-section .upper-section .row.clearfix {
    display: flex !important;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.services-section .services-block {
    display: flex;
    padding: 15px;
    margin-bottom: 0;
    /* Animation */
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger animations */
.services-section .services-block:nth-child(1) {
    animation-delay: 0.1s;
}

.services-section .services-block:nth-child(2) {
    animation-delay: 0.3s;
}

.services-section .services-block:nth-child(3) {
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.services-section .services-block .inner-box {
    width: 100%;
    /* Glassmorphism */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    /* Minimal radius */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    transition: var(--transition);
    position: relative;
}

/* Accent Gradient Line Bottom */
.services-section .services-block .inner-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.7;
    transition: var(--transition);
}

.services-section .services-block .inner-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.services-section .services-block .inner-box:hover::after {
    height: 3px;
    opacity: 1;
    background: var(--primary);
}

/* GRID LAYOUT - Improved for look */
.services-section .services-block .content {
    display: grid !important;
    grid-template-columns: 140px 1fr;
    /* Image width */
    grid-template-areas: "image text-content";
    min-height: 130px;
}

.services-section .services-block .image {
    grid-area: image;
    height: 100%;
    min-height: 130px;
    /* Match container */
}

.services-section .services-block .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.services-section .services-block .inner-box:hover .image img {
    transform: scale(1.1);
}

/* Text Container */
.text-content-wrapper {
    grid-area: text-content;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.services-section .services-block h3 {
    margin: 0 0 8px;
    line-height: 1.3;
}

.services-section .services-block h3 a {
    color: var(--secondary);
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
}

.services-section .services-block .text {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* COMPRA Card - Highlighted - Glass style */
.services-section .services-block:first-child .inner-box {
    background: rgba(0, 168, 204, 0.85);
    /* Blue glass */
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.services-section .services-block:first-child .inner-box::after {
    background: #fff;
}

.services-section .services-block:first-child h3 a {
    color: #fff !important;
}

.services-section .services-block:first-child .text {
    color: rgba(255, 255, 255, 0.95) !important;
}

.services-section .services-block:first-child .inner-box:hover {
    background: rgba(0, 168, 204, 0.95);
    transform: translateY(-5px) scale(1.02);
}

/* Adjustments for text wrapper usage */
.services-section .services-block .content {
    display: flex !important;
    /* Revert to flex but use wrapper */
    flex-direction: row;
}

.services-section .services-block .image {
    flex: 0 0 140px;
    width: 140px;
}

.services-section .services-block .text-content-wrapper {
    flex: 1;
    min-width: 0;
    /* Fix flex overflow */
}

/* ===========================================
   CLIENTS CAROUSEL - MODERN RIBBON
   =========================================== */
.clients-section {
    background: #ffffff !important;
    padding: 20px 0 !important;
    border-top: 1px solid #eee;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 10;
}

.clients-section .sponsors-carousel .slide-item {
    padding: 15px;
    transition: all 0.3s ease;
}

.clients-section .sponsors-carousel .slide-item .image-box {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    /* Fixed height for consistency */
}

.clients-section .sponsors-carousel .slide-item img {
    max-height: 70px;
    /* Limit height */
    width: auto !important;
    /* Keep aspect ratio */
    filter: grayscale(100%) opacity(0.5);
    /* Modern gray look */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0.9);
}

.clients-section .sponsors-carousel .slide-item:hover img {
    filter: grayscale(0%) opacity(1);
    /* Color on hover */
    transform: scale(1.05);
}

/* ===========================================
   PAGE TITLES (Internal Pages) - Dark Gradient (Lighter)
   =========================================== */
.page-title:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient: Dark Navy -> Primary Blue (Significantly more transparent ~0.7) */
    background: -webkit-linear-gradient(top, rgba(7, 43, 85, 0.75) 0%, rgba(0, 168, 204, 0.65) 100%) !important;
    background: linear-gradient(to bottom, rgba(7, 43, 85, 0.75) 0%, rgba(0, 168, 204, 0.65) 100%) !important;
    z-index: 1;
    display: block;
}

/* ===========================================
   HOME SLIDER - Extra Transparent & Modern Font
   =========================================== */
.main-slider .slide:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Very transparent dark overlay (Almost invisible ~0.15) */
    background: rgba(0, 20, 60, 0.15) !important;
    z-index: 1;
    display: block;
}

.page-title .auto-container,
.main-slider .content {
    position: relative;
    z-index: 2;
    /* Ensure text is above overlay */
}

.page-title h1 {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Modern Font for Home Slider */
.main-slider h2 {
    color: #fff !important;
    font-family: 'Poppins', 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    letter-spacing: 1px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
}

/* ===========================================
   HOMEPAGE SERVICE CARDS (Buying, Promo, Calendar)
   =========================================== */
.home-services-overlay .services-block .inner-box {
    /* "More gradient and more transparency" */
    background: linear-gradient(135deg, rgba(16, 31, 59, 0.849) 0%, rgba(13, 97, 180, 0.603) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.home-services-overlay .services-block .inner-box:hover {
    background: linear-gradient(135deg, rgba(2, 12, 30, 0.95) 0%, rgba(0, 90, 180, 0.9) 100%) !important;
    transform: translateY(-5px);
}

.home-services-overlay .services-block h3 a {
    color: #ffffff !important;
    font-weight: 700;
}

.home-services-overlay .services-block .text {
    color: #ffffff !important;
    opacity: 0.9;
}

/* Specific fix for the "Click here" link in Calendar card */
.home-services-overlay .services-block .text a {
    color: #ffe361 !important;
    /* Yellow for better contrast */
    color: #ffe361 !important;
    /* Yellow for better contrast */
    text-decoration: underline;
}

/* ===========================================
   SERVICE ICONS (Analysis, Opacity, etc.)
   =========================================== */
.services-block-two .inner-box .icon-box .icon {
    background: linear-gradient(135deg, #0a192f 0%, #2082D0 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    /* Fallback */
    color: #2082D0;
    transition: all 0.3s ease;
}

.services-block-two .inner-box:hover .icon-box .icon {
    transform: scale(1.1);
}