/* Base styles and variables */
:root {
    --bg-primary: #FFFFFF;
    --accent: #D4AF37;
    --dark: #000000;
    --text-main: #333333;
    --text-light: #ffffff;
    --font-stack: 'Manrope', sans-serif;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

/* Typography Utilities */
.text-light-gray {
    color: rgba(255, 255, 255, 0.85);
}

.small {
    font-size: 0.8125rem;
}

/* Top Bar Styles */
.top-bar {
    background-color: var(--dark);
    font-size: 0.8125rem; /* Small text for top bar */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.top-bar-info .info-item {
    display: flex;
    align-items: center;
    transition: color var(--transition-speed) ease;
    cursor: default;
}

.top-bar-info .info-item i {
    color: var(--accent); /* Branding touch on the icons */
}

/* Social Icons */
.social-icons .social-link {
    color: var(--text-light);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-icons .social-link:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

/* Navbar Styles */
.navbar {
    background-color: var(--dark) !important;
}

.navbar-logo {
    height: 50px;
    object-fit: contain;
}

.navbar-links .nav-link {
    color: #ffffff !important;
    font-weight: 700;
    text-transform: uppercase;
    transition: color var(--transition-speed) ease;
}

.navbar-links .nav-link:hover,
.navbar-links .nav-link:focus,
.navbar-links .nav-link.active {
    color: #FFB800 !important;
}

/* Vertical Separator for Desktop */
@media (min-width: 992px) {
    .navbar-links .nav-item {
        position: relative;
    }
    
    .navbar-links .nav-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 16px;
        width: 1px;
        background-color: #ffffff;
        opacity: 0.6;
    }

    .navbar-links .nav-link {
        padding-left: 1.2rem !important;
        padding-right: 1.2rem !important;
    }
}

/* CTA Button */
.btn-cta {
    background-color: #FFB800;
    color: #000000;
    border: none;
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.btn-cta:hover {
    background-color: #e6a600;
    color: #000000;
    transform: translateY(-2px);
}

.btn-cta .btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Promo Badge CTA */
.promo-badge {
    background: linear-gradient(135deg, #FFD700, #FFB800);
    color: #000000;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.4);
    animation: promoGlow 2s infinite;
}





@keyframes promoGlow {
    0%, 100% { box-shadow: 0 4px 10px rgba(255, 184, 0, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(255, 184, 0, 0.8); }
}

/* ========================================= */
/* Hero Section */
/* ========================================= */
.hero {
    position: relative;
    min-height: 72vh; /* Reducido ~1.5cm a 2cm verticales */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 55%, rgba(0, 0, 0, 0.0) 100%), url('../img/banner2.webp');
    background-size: cover;
    background-position: center 30%; /* Enfoca la imagen un poco más hacia arriba */
    background-repeat: no-repeat;
    margin-top: -1px; /* To fix any pixel gap with navbar */
}

.hero .relative-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Montserrat', var(--font-stack);
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -1px;
}

.hero-title .text-warning {
    color: #FFB800 !important;
}

.hero-description {
    font-size: 1.125rem;
    max-width: 600px;
}

/* Ajuste vertical del texto principal del Hero en escritorio (~2cm hacia arriba) */
@media (min-width: 992px) {
    .hero-content-row {
        transform: translateY(-60px);
    }
}

/* Hero Buttons */
.btn-hero {
    padding: 12px 28px;
    transition: all var(--transition-speed) ease;
    border-radius: 4px; /* A slight rounded edge, adjust if necessary */
}

.btn-hero:hover {
    transform: translateY(-3px);
}

.btn-hero.btn-warning {
    background-color: #FFB800;
    color: #000000;
    border: 1px solid #FFB800;
}

.btn-hero.btn-warning:hover {
    background-color: #e6a600;
    border-color: #e6a600;
}

.btn-hero.btn-outline-warning {
    background-color: transparent;
    border: 1px solid #FFB800;
    color: #ffffff;
}

.btn-hero.btn-outline-warning:hover {
    background-color: #FFB800;
    color: #000000 !important;
}

/* Hero Features */
.hero-features {
    position: relative;
    z-index: 2;
}

.hero-features .text-warning {
    color: #FFB800 !important;
}

@media (min-width: 992px) {
    .hero-features {
        transform: translateY(-90px); /* Sube bloque de iconos ~3cm */
    }
}

/* Fix for screens under 835px height */
@media (max-height: 835px) {
    .hero-title {
        line-height: 1.3;
        padding-top: 10px; /* Evita que se recorte el tilde de la Ñ */
    }
    .hero-content-row, .hero-features {
        transform: translateY(-1cm); /* Reemplaza el desplazamiento agresivo de desktop para no solapar el navbar */
    }
}

/* ========================================= */
/* Stats & Clients Divider Section */
/* ========================================= */
.stats-clients-section {
    background-color: #000000;
}

/* Client Logo Carousel Items */
.client-logo {
    max-height: 140px;
    width: 100%; /* Ocupar todo el ancho de su ranura flex */
    transition: all 0.3s ease;
    object-fit: contain;
}

.logo-carousel-wrapper {
    width: 100%;
}

.logo-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    align-items: center;
}

.logo-slide {
    flex: 0 0 33.333%; /* 3 visibles en móvil */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
    position: relative;
}

.logo-slide::after {
    content: '|';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ddd;
    font-size: 2rem;
    font-weight: 300;
}

@media (min-width: 992px) {
    .logo-slide {
        flex: 0 0 20%; /* Exactamente 5 espacios por contenedor en desktop */
    }
}

/* Fading effect on boundaries */
.logo-fade-left, .logo-fade-right {
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    z-index: 5;
    pointer-events: none; /* Allows hovering over the edges */
}

.logo-fade-left {
    left: 0;
    background: linear-gradient(to right, #FFFFFF, transparent);
}

.logo-fade-right {
    right: 0;
    background: linear-gradient(to left, #FFFFFF, transparent);
}

/* ========================================= */
/* Services Section */
/* ========================================= */
.bg-light-custom {
    background-color: #F8F9FA !important;
}

.section-accent-line {
    width: 60px;
    height: 4px;
    background-color: #FFB800;
    border-radius: 2px;
}

.border-radius-custom {
    border-radius: 8px;
}

/* Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px !important; 
    overflow: hidden; /* Applies radius boundary */
}

.service-card img.card-img-top {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* Efecto: la imagen desaparece en hover */
.service-card img.card-img-top {
    transition: opacity 0.4s ease;
    width: 100%;
}

.service-card:hover img.card-img-top {
    opacity: 0;
}

/* Efecto: el título y el texto suben ocupando el lugar de la imagen */
.service-card .card-title {
    transition: margin-top 0.4s ease;
    position: relative;
    z-index: 15;
    margin-top: 0;
}

.service-card:hover .card-title {
    margin-top: -130px; /* Sube la posición del título hacia la zona central superior de la imagen */
}

.service-card .card-text {
    position: relative;
    z-index: 15;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin-top 0.4s ease;
    pointer-events: none; /* Evita parpadeos de hover */
}

.service-card:hover .card-text {
    opacity: 1;
    max-height: 600px; /* Allows the full text to show and expand the card */
    margin-top: 15px; /* Adds a small gap between title and text */
}

/* El icono flotante posicionado sobre la foto y el contenido blanco */
.service-icon-floating {
    position: absolute;
    bottom: 0;
    right: 30px; 
    transform: translateY(50%); /* Con esto solapa exactamente la mitad */
    width: 55px;
    height: 55px;
    background-color: #FFB800;
    color: #000000;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease;
}

.service-card:hover .service-icon-floating {
    transform: translateY(calc(50% - 130px)); /* Acompaña el desplazamiento del título */
}

/* ========================================= */
/* Contact Section */
/* ========================================= */
.contact-section {
    background-color: #F8F9FA; /* Mantiene la fluidez visual con sección anterior */
}

.contact-card {
    background-color: #1a1a1a;
    border: 2px solid #FFB800; /* Reemplazado color dorado genérico por tu paleta HGS */
    box-shadow: 0 10px 40px rgba(255, 184, 0, 0.15) !important;
}

.contact-title {
    font-size: 2.2rem;
    color: #FFB800;
}

.contact-input {
    border: 1px solid rgba(255, 184, 0, 0.6) !important;
    background-color: #ffffff !important;
}

.contact-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 184, 0, 0.25) !important;
    border-color: #FFB800 !important;
}

.contact-btn {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #FFB800, #dca000);
    color: #000000 !important;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 184, 0, 0.4);
    text-transform: uppercase;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 184, 0, 0.6);
    color: #000000 !important;
}

/* Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 60px;
    height: 60px;
    background-color: #FFB800;
    color: #000000;
    border-radius: 50%;
    font-size: 2rem;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    background-color: #e6a600;
    color: #000000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Background Watermark Logo */
.watermark-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0; /* Por encima de los fondos de las secciones, por debajo del contenido */
    opacity: 0.06;
    pointer-events: none;
    width: 90%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    mix-blend-mode: multiply; /* Asegura que contraste sobre blancos y grises */
}

.watermark-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Elevamos el contenido de las secciones para que no quede detrás de la marca de agua */
section .container {
    position: relative;
    z-index: 2;
}

/* ========================================= */
/* Promo Modal Styles */
/* ========================================= */
.promo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none; /* Controlled by JS */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.4s ease-out;
}

.promo-modal-content {
    background-color: #1a1a1a;
    border: 3px solid #FFB800;
    padding: 3.5rem 2rem;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 184, 0, 0.3);
    animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.promo-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}

.promo-close:hover {
    color: #FFB800;
    transform: rotate(90deg);
}

.promo-title {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.2;
}

.promo-timer {
    font-size: 5rem;
    color: #FFB800;
    text-shadow: 0 0 20px rgba(255, 184, 0, 0.4);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 2px;
}

.timer-label {
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 3px;
}

.promo-btn {
    box-shadow: 0 5px 25px rgba(255, 184, 0, 0.5);
    transition: all 0.3s ease;
}

.promo-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 35px rgba(255, 184, 0, 0.7);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Blur background ONLY for promo modal if specified, or exclude all modals */
body.modal-open > *:not(#promoModal):not(.modal):not(.modal-backdrop) {
    filter: blur(5px);
    pointer-events: none;
}

@media (max-width: 576px) {
    .promo-timer {
        font-size: 3.5rem;
    }
    .promo-modal-content {
        padding: 3rem 1.5rem;
    }
}

/* ========================================= */
/* Admin Login Page Styles */
/* ========================================= */
.admin-login-body {
    --primary: #FFB800;
    --primary-dark: #e6a600;
    --accent: #D4AF37;
    --bg-gradient: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
    --glass-bg: rgba(26, 26, 26, 0.8);
    --glass-border: rgba(255, 184, 0, 0.3);
    --text-main: #f8fafc;
    --text-muted: rgba(255, 255, 255, 0.6);
    
    background: var(--bg-gradient) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    overflow: hidden;
}

.admin-login-body .ambient-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 184, 0, 0.1) 0%, rgba(255, 184, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
    animation: adminPulse 15s infinite alternate;
}

.admin-login-body .blob-1 { top: -100px; left: -100px; }
.admin-login-body .blob-2 { bottom: -100px; right: -100px; animation-delay: -5s; }

@keyframes adminPulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.2) translate(50px, 50px); }
}

.admin-login-body .login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
}

.admin-login-body .login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.admin-login-body .login-header {
    text-align: center;
    margin-bottom: 32px;
}

.admin-login-body .logo-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: #000;
    box-shadow: 0 10px 25px -3px rgba(255, 184, 0, 0.4);
}

.admin-login-body h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    color: var(--text-main) !important;
}

.admin-login-body p.subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

.admin-login-body .form-group {
    margin-bottom: 20px;
}

.admin-login-body label {
    display: block;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-weight: 400;
}

.admin-login-body .input-wrapper {
    position: relative;
}

.admin-login-body .input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.admin-login-body input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 16px 12px 48px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.admin-login-body input:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.admin-login-body input:focus + i {
    color: var(--primary);
}

.admin-login-body .btn-login {
    width: 100%;
    background: var(--primary);
    color: #000;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.admin-login-body .btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.admin-login-body .btn-login:active {
    transform: translateY(0);
}

.admin-login-body .btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.admin-login-body #message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    display: none;
    animation: adminFadeIn 0.3s ease;
}

.admin-login-body .message-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.admin-login-body .message-success {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

@keyframes adminFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.admin-login-body .loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: adminSpin 0.8s linear infinite;
    display: none;
}

@keyframes adminSpin {
    to { transform: rotate(360deg); }
}

.admin-login-body .footer-links {
    margin-top: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.admin-login-body .footer-links a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.admin-login-body .footer-links a:hover {
    text-decoration: underline;
}
