/* ========================================
   VARIABLES Y RESET
   ======================================== */
:root {
    --vino-profundo: #4A0404;
    --vino-oscuro: #2C0101;
    --rojo-vino: #8B0000;
    --gris-metalico: #4B5563;
    --blanco: #FFFFFF;
    --gris-claro: #F3F4F6;
}

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

html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1F2937;
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   UTILIDADES
   ======================================== */
.bg-vino-profundo { background-color: var(--vino-profundo); }
.bg-vino-oscuro   { background-color: var(--vino-oscuro); }
.text-vino        { color: var(--vino-profundo); }
.border-vino      { border-color: var(--vino-profundo); }

/* ========================================
   NAVBAR / HEADER
   ======================================== */
.navbar {
    background-color: var(--vino-oscuro);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-image {
    height: 65px !important;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.desktop-menu {
    display: flex;
    gap: 2.5rem;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    list-style: none;
}

.desktop-menu a {
    color: white;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s;
    white-space: nowrap;
    text-decoration: none;
}

.desktop-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--rojo-vino);
    transition: width 0.3s ease;
}

.desktop-menu a:hover::after { width: 100%; }
.desktop-menu a:hover { color: var(--rojo-vino); }

.cotizar-btn-desktop {
    background-color: var(--rojo-vino);
    color: white;
    padding: 0.5rem 1.4rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.cotizar-btn-desktop:hover {
    background-color: transparent;
    border-color: var(--rojo-vino);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

/* ========================================
   MOBILE MENU
   ======================================== */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: rgba(139, 0, 0, 0.2);
    padding: 14px 18px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    margin-left: auto;
    z-index: 1001;
}

.menu-toggle:hover { background: var(--rojo-vino); border-color: white; }

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: white;
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.mobile-menu-overlay.active { display: block; opacity: 1; }

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: linear-gradient(135deg, var(--vino-oscuro) 0%, var(--vino-profundo) 100%);
    z-index: 9999;
    padding: 80px 20px 20px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.mobile-menu.active { right: 0; }

.mobile-menu-header {
    position: absolute;
    top: 20px; left: 20px; right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
}

.mobile-menu-logo { height: 60px; width: auto; }

.close-menu {
    width: 50px; height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.close-menu:hover {
    background: var(--rojo-vino);
    transform: rotate(90deg);
    border-color: var(--rojo-vino);
}

.mobile-menu-items {
    margin-top: 30px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-right: 5px;
}

.mobile-menu-items::-webkit-scrollbar { width: 5px; }
.mobile-menu-items::-webkit-scrollbar-track { background: rgba(255,255,255,0.1); border-radius: 10px; }
.mobile-menu-items::-webkit-scrollbar-thumb { background: var(--rojo-vino); border-radius: 10px; }

.mobile-menu a {
    color: white;
    font-size: 1.3rem;
    padding: 18px 15px;
    display: block;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    border-radius: 10px;
    margin-bottom: 5px;
    text-decoration: none;
}

.mobile-menu a i { width: 30px; color: var(--rojo-vino); margin-right: 10px; }
.mobile-menu a:hover { background: rgba(139, 0, 0, 0.3); padding-left: 25px; }

.mobile-menu .cotizar-btn-mobile {
    background: var(--rojo-vino);
    text-align: center;
    margin-top: 20px;
    border-radius: 50px;
    font-weight: bold;
    border: none;
}

.mobile-menu .cotizar-btn-mobile:hover { background: #6B0000; padding-left: 15px; }

.mobile-menu-footer {
    position: absolute;
    bottom: 20px; left: 20px; right: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
}

.mobile-menu-footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.mobile-menu-footer .social-icons a {
    color: white;
    font-size: 1.8rem;
    transition: color 0.3s;
    padding: 0;
    border: none;
    display: inline-block;
}

.mobile-menu-footer .social-icons a:hover { color: var(--rojo-vino); background: transparent; transform: scale(1.1); }
.mobile-menu-footer p { color: rgba(255,255,255,0.5); font-size: 0.9rem; }

/* ========================================
   HERO SECTION
   ======================================== */
.hero-overlay {
    position: relative;
    width: 100%;
    min-height: 100svh;
    background-image: linear-gradient(rgba(42, 1, 1, 0.85), rgba(74, 4, 4, 0.7)), url('../img/InicioGrupoBM.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo {
    height: 180px !important;
    width: auto !important;
    max-width: 90% !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0 !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: rgba(255,255,255,0.9);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.hero-buttons .btn-vino,
.hero-buttons .btn-outline {
    min-width: 220px;
    text-align: center;
}

/* ========================================
   COUNTER BOXES
   ======================================== */
.counter-box {
    background: linear-gradient(135deg, var(--vino-oscuro) 0%, var(--vino-profundo) 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    text-align: center;
    box-shadow: 0 15px 35px rgba(74, 4, 4, 0.3);
    border-bottom: 4px solid var(--rojo-vino);
    transition: all 0.3s;
}

.counter-box:hover { transform: scale(1.05); border-bottom-color: white; }

.counter-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

/* ========================================
   PACKAGE / SERVICE CARDS
   ======================================== */
.package-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid rgba(139, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
}

.package-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(139, 0, 0, 0.3);
    border-color: var(--rojo-vino);
}

.package-badge {
    position: absolute;
    top: 15px; right: 15px;
    background: var(--rojo-vino);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.package-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.package-card:hover .package-img { transform: scale(1.1); }

.package-content { padding: 25px; }

.package-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vino-oscuro);
    margin-bottom: 10px;
}

.package-btn {
    background: transparent;
    border: 2px solid var(--rojo-vino);
    color: var(--rojo-vino);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    margin-top: 10px;
    cursor: pointer;
    width: 100%;
}

.package-btn:hover { background: var(--rojo-vino); color: white; }

/* ========================================
   SERVICE MODAL
   ======================================== */
.service-hero-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: linear-gradient(135deg, var(--vino-oscuro) 0%, var(--vino-profundo) 100%);
    z-index: 10000;
    overflow-y: auto;
    animation: slideIn 0.4s ease-out;
}

.service-hero-modal.active { display: block; }

.service-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    color: white;
}

@keyframes slideIn {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.close-modal {
    position: fixed;
    top: 30px; right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(5px);
}

.close-modal:hover {
    background: var(--rojo-vino);
    transform: rotate(90deg) scale(1.1);
    border-color: white;
}

/* ========================================
   MODAL IMAGE SLIDER
   ======================================== */
.modal-slider {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    height: 380px;
}

.modal-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

.modal-slide {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(44, 1, 1, 0.75);
    color: white;
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-slider-btn:hover { background: var(--rojo-vino); }
.modal-slider-btn.prev { left: 12px; }
.modal-slider-btn.next { right: 12px; }

.modal-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.modal-slider-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.modal-slider-dots span.active { background: white; }

/* ========================================
   MODAL LOGO
   ======================================== */
.modal-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
    display: block;
}

/* ========================================
   GALLERY GRID
   ======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 260px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    -webkit-user-drag: none;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44,1,1,0.88), transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1rem 1.2rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay p { color: white; font-weight: 600; font-size: 0.95rem; margin: 0; }

@media (hover: none) {
    .gallery-overlay  { opacity: 1; }
    .gallery-item img { transform: none !important; }
}

/* ========================================
   LIGHTBOX
   ======================================== */
.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 20000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.gallery-lightbox.active { display: flex; }

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lightbox-content p {
    color: rgba(255,255,255,0.8);
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.lightbox-close {
    position: fixed;
    top: 20px; right: 20px;
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 20001;
}

.lightbox-close:hover { background: var(--rojo-vino); transform: rotate(90deg); }

.lightbox-nav {
    position: fixed;
    top: 50%; transform: translateY(-50%);
    width: 50px; height: 50px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white; font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center;
    z-index: 20001;
}

.lightbox-nav:hover { background: var(--rojo-vino); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ========================================
   CLIENT LOGOS / SWIPER
   ======================================== */
.client-logo {
    height: 80px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.client-logo:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }
.client-swiper { padding: 40px 0; }
.client-swiper .swiper-slide { display: flex; align-items: center; justify-content: center; }
.swiper-pagination-bullet { background: var(--rojo-vino) !important; }

/* ========================================
   WHATSAPP FLOAT
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px; right: 30px;
    background-color: #25d366;
    color: white;
    width: 70px; height: 70px;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
    animation: pulse 2s infinite;
    text-decoration: none;
}

.whatsapp-float:hover { transform: scale(1.15) rotate(5deg); background-color: #20ba57; }

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70%  { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-vino {
    background-color: var(--rojo-vino);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-vino:hover {
    background-color: var(--vino-profundo);
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(139, 0, 0, 0.3);
    color: white;
}

.btn-outline {
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    background: transparent;
}

.btn-outline:hover { background-color: white; color: var(--vino-oscuro); }

/* ========================================
   FORM CONTROLS
   ======================================== */
.form-control-modern {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s;
    width: 100%;
}

.form-control-modern:focus {
    border-color: var(--rojo-vino);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.25);
    outline: none;
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section-title {
    position: relative;
    display: inline-block;
    color: var(--vino-oscuro);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px; height: 3px;
    background-color: var(--rojo-vino);
}

/* ========================================
   FOOTER
   ======================================== */
.footer-link {
    color: #9CA3AF;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
    margin-bottom: 8px;
}

.footer-link:hover { color: var(--rojo-vino); transform: translateX(5px); }
.footer-logo { height: 100px !important; width: auto; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .desktop-menu  { gap: 1.5rem; }
    .logo-image    { height: 55px !important; }
    .hero-logo     { height: 150px !important; }
    .section-title { font-size: 2rem; }
    .modal-slider  { height: 300px; }
    .gallery-grid  { grid-template-columns: repeat(2, 1fr); }
    .gallery-item  { height: 220px; }
}

@media (max-width: 768px) {
    .navbar .container         { padding: 0 1rem; }
    .desktop-menu              { display: none !important; }
    .cotizar-btn-desktop       { display: none !important; }
    .menu-toggle               { display: flex; }
    .logo-image                { height: 80px !important; }

    .hero-overlay {
        min-height: auto;
        padding: 5rem 0 4rem;
        background-attachment: scroll;
        background-position: center center;
        background-size: cover;
        display: block;
    }

    .hero-logo {
        height: 120px !important;
        margin-bottom: 0.5rem !important;
        margin-top: 0 !important;
    }

    .hero-overlay h1 {
        font-size: 2.2rem !important;
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-buttons              { flex-direction: column; align-items: center; }
    .hero-buttons .btn-vino,
    .hero-buttons .btn-outline { width: 100%; max-width: 280px; }

    .counter-number            { font-size: 2.8rem; }
    .footer-logo               { height: 70px !important; }
    .modal-slider              { height: 220px; }
    .modal-logo                { height: 55px; }

    .service-hero-content      { padding: 80px 16px 40px; }
    .service-hero-content .grid { grid-template-columns: 1fr; }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

@media (max-width: 639px) {
    .gallery-grid  { grid-template-columns: 1fr; }
    .gallery-item  { height: 200px; }
}

@media (min-width: 769px) {
    .mobile-menu,
    .mobile-menu-overlay { display: none !important; }
}

.client-logo {
    max-height: 100px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(0%);
}

.client-logo:hover {
    transform: scale(1.05);
    filter: grayscale(0%);
}