/* ============================================
   PERFECT SEALING - Negro y Blanco
   ============================================ */

:root {
    --black: #000000;
    --dark: #161616;
    --white: #ffffff;
    --gray: #e2e2e2;
    --gray-light: #f7f7f7;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--white);
    overflow-x: hidden;
    background-color: var(--black);
}

/* Navbar */
#mainNav {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

#mainNav.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(0, 0, 0, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    margin-left: 5px;
    color: var(--gray) !important;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.07em;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white) !important;
}

/* Hero Carousel */
#heroCarousel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

#heroCarousel .carousel-item {
    height: 100vh;
}

.hero-slide {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    z-index: 2;
}

.hero-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
    z-index: -1;
}

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

/* Page Header */
.page-header {
    min-height: 40vh;
    background: var(--black);
    padding-top: 80px;
    position: relative;
}

/* Section Services */
.section-services {
    background: var(--dark);
    padding: 5rem 0;
    position: relative;
}

.section-services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.section-title {
    color: var(--white);
}

.section-subtitle {
    color: var(--gray);
}

.section-divider {
    border-color: var(--white) !important;
    width: 50px !important;
    margin: 0 auto;
    border-bottom-width: 2px !important;
}

/* Cards Servicio */
.card-servicio {
    transition: all 0.3s ease;
    border-radius: 4px;
    background: var(--black);
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.card-servicio .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-servicio:hover .card-img-top {
    transform: scale(1.05);
}

.card-servicio .card-body h4 {
    color: var(--white);
}

.card-servicio .card-body p {
    color: var(--gray);
}

/* Section About */
.section-about {
    background: var(--black);
    padding: 5rem 0;
    position: relative;
}

.section-about::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.about-icon-box {
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 3rem;
    text-align: center;
}

/* Contact Section */
.section-contact {
    background: var(--black);
    padding: 5rem 0;
    position: relative;
}

.section-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.1);
}

.form-card {
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
}

.form-card .form-control,
.form-card .form-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--white);
}

.form-card .form-control::placeholder {
    color: rgba(255,255,255,0.4);
}

.form-card .form-control:focus,
.form-card .form-select:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--white);
    box-shadow: inset 0 0 0 1px currentColor;
    color: var(--white);
}

.form-card .form-label {
    color: var(--white);
}

.info-card {
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    padding: 2rem;
}

.info-card h5 {
    color: var(--white);
}

.info-card p {
    color: var(--gray);
}

/* Contact */
.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Stats Bar */
.stats-bar {
    background: var(--white);
    padding: 2.5rem 0;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--black);
}

.stat-item p {
    color: rgba(0,0,0,0.6);
    margin: 0;
    font-weight: 500;
}

/* Service Icon Large */
.service-icon-lg {
    transition: all 0.3s ease;
    background: var(--dark);
    border: 1px solid rgba(255,255,255,0.1);
}

.service-icon-lg:hover {
    transform: scale(1.05);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background-color: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 3px 18px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: whatsappBlink 1.5s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 30px rgba(37, 211, 102, 0.7);
    color: var(--white);
}

@keyframes whatsappBlink {
    0%, 100% { box-shadow: 0 3px 18px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 3px 18px rgba(37, 211, 102, 0.7), 0 0 0 15px rgba(37, 211, 102, 0); }
}

/* Instagram Floating Button */
.instagram-float {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 3px 18px rgba(225, 48, 108, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: instagramBlink 1.5s ease-in-out infinite;
}

.instagram-float:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 30px rgba(225, 48, 108, 0.7);
    color: var(--white);
}

@keyframes instagramBlink {
    0%, 100% { box-shadow: 0 3px 18px rgba(225, 48, 108, 0.4), 0 0 0 0 rgba(225, 48, 108, 0.4); }
    50% { box-shadow: 0 3px 18px rgba(225, 48, 108, 0.7), 0 0 0 15px rgba(225, 48, 108, 0); }
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
    color: var(--black);
}

/* Footer */
footer {
    background-color: var(--black);
    border-top: 1px solid rgba(255,255,255,0.1);
}

footer p {
    color: var(--gray);
}

footer a {
    transition: color 0.3s ease;
    color: var(--gray);
}

footer a:hover {
    color: var(--white) !important;
}

/* Buttons */
.btn-primary {
    background: var(--white);
    color: var(--black);
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--gray-light);
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-google {
    background: var(--white);
    color: #333;
    font-weight: 500;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-google:hover {
    background: #f8f8f8;
    color: #333;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.btn-accent {
    background: var(--white);
    color: var(--black);
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background: var(--gray-light);
    color: var(--black);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: #25d366;
    border-color: #25d366;
}

.btn-success:hover {
    background: #20bd5a;
    border-color: #20bd5a;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--white);
    box-shadow: inset 0 0 0 1px currentColor;
}

/* Animations */
.hero-title {
    animation: heroFadeUp 0.8s ease-out both;
}

.hero-subtitle {
    animation: heroFadeUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    animation: heroFadeUp 0.8s ease-out 0.4s both;
}

.hero-stats {
    animation: heroFadeUp 0.8s ease-out 0.6s both;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for cards */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* 3D Card Tilt */
.card-servicio {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.card-servicio:hover {
    transform: translateY(-5px) rotateX(2deg) rotateY(-2deg);
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5) !important;
}

/* Button Ripple */
.btn {
    position: relative;
    overflow: hidden;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* WhatsApp Pulse */
.whatsapp-float {
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0% { box-shadow: 0 3px 18px rgba(0, 0, 0, 0.25); }
    50% { box-shadow: 0 3px 18px rgba(37, 211, 102, 0.5), 0 0 0 12px rgba(37, 211, 102, 0.1); }
    100% { box-shadow: 0 3px 18px rgba(0, 0, 0, 0.25); }
}

/* Gallery Stagger */
.gallery-stagger {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-stagger.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Lightbox Animation */
.lightbox {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    animation: lightboxZoom 0.3s ease;
}

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

/* Form Field Cascade */
.form-cascade {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.form-cascade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Divider Animation */
.section-divider {
    width: 0 !important;
    transition: width 0.8s ease;
}

.section-divider.animate {
    width: 50px !important;
}

/* Stats Counter */
.stat-item h3 {
    transition: transform 0.3s ease;
}

.stat-item:hover h3 {
    transform: scale(1.1);
}

/* Info Card Items Stagger */
.info-item {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.info-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Page Transition */
.page-transition {
    animation: pageFadeIn 0.5s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .stat-item h3 {
        font-size: 1.8rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }

    .instagram-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 85px;
        right: 20px;
    }
}

html {
    scroll-behavior: smooth;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    height: 80px;
    margin-bottom: 20px;
    animation: logoFade 1.5s ease-in-out infinite;
}

@keyframes logoFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.preloader-balls {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.preloader-balls span {
    width: 14px;
    height: 14px;
    background: var(--white);
    border-radius: 50%;
    animation: ballBounce 1.4s ease-in-out infinite;
}

.preloader-balls span:nth-child(1) { animation-delay: 0s; }
.preloader-balls span:nth-child(2) { animation-delay: 0.2s; }
.preloader-balls span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ballBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-20px); opacity: 1; }
}

.preloader-text {
    margin-top: 24px;
    color: var(--gray);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: textFade 1.5s ease-in-out infinite;
}

@keyframes textFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Gallery */
.gallery-img {
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.gallery-arrow {
    filter: invert(1);
    width: 50px;
    height: 50px;
    padding: 12px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
}

#galleryNautico .carousel-control-prev,
#galleryNautico .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    opacity: 0.9;
}

#galleryNautico .carousel-control-prev:hover,
#galleryNautico .carousel-control-next:hover {
    opacity: 1;
}

#galleryNautico .carousel-control-prev {
    left: -15px;
}

#galleryNautico .carousel-control-next {
    right: -15px;
}

#galleryResidencial .carousel-control-prev,
#galleryResidencial .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    opacity: 0.9;
}

#galleryResidencial .carousel-control-prev:hover,
#galleryResidencial .carousel-control-next:hover {
    opacity: 1;
}

#galleryResidencial .carousel-control-prev {
    left: -15px;
}

#galleryResidencial .carousel-control-next {
    right: -15px;
}

#galleryLimpieza .carousel-control-prev,
#galleryLimpieza .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    opacity: 0.9;
}

#galleryLimpieza .carousel-control-prev:hover,
#galleryLimpieza .carousel-control-next:hover {
    opacity: 1;
}

#galleryLimpieza .carousel-control-prev {
    left: -15px;
}

#galleryLimpieza .carousel-control-next {
    right: -15px;
}

#galleryPiscinas .carousel-control-prev,
#galleryPiscinas .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    opacity: 0.9;
}

#galleryPiscinas .carousel-control-prev:hover,
#galleryPiscinas .carousel-control-next:hover {
    opacity: 1;
}

#galleryPiscinas .carousel-control-prev {
    left: -15px;
}

#galleryPiscinas .carousel-control-next {
    right: -15px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    z-index: 100000;
    background: none;
    border: none;
}

.lightbox-close:hover {
    color: #ccc;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 50px;
    color: white;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0,0,0,0.8);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    z-index: 100000;
}

@media (max-width: 768px) {
    .gallery-img {
        height: 200px;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 45px;
        height: 45px;
        font-size: 35px;
    }
}

/* Cookie Consent Banner */
#cookieConsent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}
#cookieConsent.show {
    transform: translateY(0);
}
#cookieConsent .btn-accept {
    background: #fff;
    color: #000;
    border: none;
    padding: 10px 30px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}
#cookieConsent .btn-accept:hover {
    background: #ddd;
}
#cookieConsent .btn-decline {
    background: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}
#cookieConsent .btn-decline:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}
