/* 
    DOMEX SOLUCIONES DESIGN SYSTEM
    Clean, Technical, and Professional
*/

:root {
    /* Colors - Light Polarized Glass (Gris Claro + Vidrio Ahumado) */
    --primary-bg: #ced6e0; /* Light Grey Base */
    --secondary-bg: #dfe4ea;
    --accent: #f59e0b;
    --accent-glow: rgba(245, 158, 11, 0.2);
    --text-main: #ffffff;
    --text-dim: #f1f2f6;
    --white: #ffffff;
    --black: #000000;
    --border-color: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(20, 25, 30, 0.85); /* Dark Polarized Glass */
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(20, 25, 30, 0.9);
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-fancy: 'Outfit', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    letter-spacing: -0.04em;
    font-weight: 800;
}

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

ul {
    list-style: none;
}

/* Quiénes Somos Section */
.about-section {
    background: linear-gradient(135deg, var(--primary-bg), #1a1a1a);
    padding: 100px 0;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    line-height: 1.8;
}

.lead-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 30px;
    font-family: var(--font-fancy);
    letter-spacing: -1px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 60px 0;
}

.about-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.5) 100%);
    padding: 45px;
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(35px); /* Very deep blur for thick glass feel */
}

.about-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 50px 100px rgba(0,0,0,0.7);
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.6) 100%);
}

.card-icon-header {
    color: var(--accent);
    margin-bottom: 25px;
    background: rgba(255,255,255,0.05);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    transition: var(--transition);
}

.about-card:hover .card-icon-header {
    background: var(--accent);
    color: var(--secondary-bg);
    transform: rotate(10deg);
}

.about-card h3 {
    font-size: 1.6rem;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 800;
}

.list-bullet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: var(--accent);
    color: var(--secondary-bg);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-right: 12px;
}

.coverage-box {
    background: linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    padding: 45px;
    border-radius: 40px;
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    transition: var(--transition);
    backdrop-filter: blur(30px);
}

.coverage-box:hover {
    border-color: var(--accent);
}

.coverage-box h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-family: var(--font-fancy);
    color: var(--accent);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    .lead-text {
        font-size: 1.4rem;
    }
}

/* Hero Section */
/* Hero Section Background Video (Reverted and Light Theme Optimized) */
#hero {
    position: relative;
    height: 90vh; /* A bit taller for impact */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white); /* White text for dark overlay */
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.3)); /* Industrial Stone Overlay */
    z-index: -1;
}

.hero-container {
    animation: fadeIn 1s ease-out;
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.logo {
    max-width: 200px;
    margin-bottom: 24px;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.1));
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--white);
    text-align: center;
}

.tagline {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 40px;
    text-transform: uppercase;
    text-align: center;
}

.hero-badges {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.badge {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.875rem;
    color: var(--accent);
    font-weight: 500;
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.primary {
    background: var(--accent);
    color: var(--secondary-bg);
}

.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
    background: #fbbf24;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    text-transform: uppercase;
    color: #1e272e; /* Darker for light background */
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.service-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.5) 100%);
    padding: 40px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    text-align: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(25px);
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.6) 100%);
}

.service-icon {
    color: var(--accent);
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--white);
    font-weight: 800;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 35px;
    color: var(--text-dim);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-hint {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 15px;
}

.card-footer {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
}

.service-list li {
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    color: var(--text-dim);
}

.service-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
}


/* Benefits Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid */
    gap: 40px;
    margin-top: 20px;
}
@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}

.benefit-item {
    padding: 35px;
    background: var(--glass-bg);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    backdrop-filter: blur(20px);
}

.benefit-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.benefit-icon {
    color: var(--accent);
    margin-bottom: 20px;
}

.benefit-item h4 {
    margin-bottom: 10px;
    color: var(--white);
}

.benefit-item p {
    font-size: 0.95rem;
    color: var(--text-dim);
}

/* Catalog Slider (Nuestros Trabajos) */
.slider-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--accent);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.slider-arrow:hover {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.slider-arrow.prev { left: -25px; }
.slider-arrow.next { right: -25px; }

@media (max-width: 992px) {
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    .slider-arrow.prev { left: -10px; }
    .slider-arrow.next { right: -10px; }
}

.catalog-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 15px;
    padding: 20px 0 40px;
    scrollbar-width: none; /* Hide scrollbar for clean look */
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.catalog-grid::-webkit-scrollbar {
    display: none;
}

.catalog-item {
    flex: 0 0 calc(50% - 8px); /* 2 items per view on mobile */
    scroll-snap-align: start;
    border-radius: 20px;
    overflow: hidden;
    height: 350px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.catalog-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.5); 
    transition: var(--transition);
}

.catalog-item:hover img {
    filter: brightness(1.0);
}

@media (min-width: 992px) {
    .catalog-item {
        flex: 0 0 calc(33.333% - 10px); /* 3 items on desktop */
    }
}

@media (max-width: 480px) {
    .catalog-item {
        height: 250px;
    }
}

/* Emergency Section */
.dark-section {
    background: #1e2022; /* Dark industrial anchor for contrast */
    color: var(--white);
    padding: 100px 0;
    position: relative;
    border-top: 5px solid var(--accent);
}

.gold-text {
    color: var(--accent);
}

.dark-section h2 {
    color: var(--accent);
}

.emergency-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 50px;
    border-radius: 40px;
    max-width: 800px;
    margin: 0 auto;
    backdrop-filter: blur(20px);
}

.emergency-desc {
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.emergency-list {
    margin: 30px auto;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 400px;
}

.emergency-list li {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
    width: 100%;
}

.emergency-list li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 900;
    font-size: 1.4rem;
}

.emergency-contacts {
    display: flex;
    justify-content: center;
}

.contact-pill {
    background: var(--accent);
    color: var(--secondary-bg);
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-pill svg {
    margin-right: 8px;
}

.contact-pill:hover {
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 45px;
    border-radius: 35px;
    max-width: 650px;
    width: 95%;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(40px);
    color: var(--white);
}

/* Lightbox Specific */
.image-lightbox .lightbox-content {
    background: transparent;
    border: none;
    box-shadow: none;
    max-width: 90vw;
    max-height: 90vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.close-image-modal {
    position: fixed;
    right: 30px;
    top: 30px;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    z-index: 2010;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: var(--text-dim);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--accent);
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-header h2 {
    color: var(--accent);
    margin-top: 12px;
}

.service-list-expanded {
    margin-bottom: 32px;
}

.service-list-expanded li {
    margin-bottom: 16px;
    color: var(--text-main);
    padding-left: 20px;
    position: relative;
}

.service-list-expanded li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.modal-cta {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
}

/* Contact & Socials */
.contact-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.contact-email {
    font-size: 1.1rem;
    font-family: var(--font-heading);
    background: rgba(0, 0, 0, 0.4); /* Darker interior */
    border: 1px solid var(--accent); /* Persistent gold border for 'enclosure' */
    padding: 15px 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.contact-email:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--accent-glow);
}

.contact-icon-small {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

.contact-email a {
    color: var(--white);
    font-weight: 500;
}

.contact-email a:hover {
    color: var(--accent);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.social-icons img {
    width: 50px;
    height: 50px;
    transition: var(--transition);
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}

.social-icons a[title="WhatsApp"] img {
    filter: brightness(1); /* No extra boost needed in light theme unless desired */
}

.social-icons a:hover img {
    transform: translateY(-5px);
    filter: grayscale(0) brightness(1);
}

/* On hover, don't lose the brightness for WhatsApp */
.social-icons a[title="WhatsApp"]:hover img {
    filter: brightness(3);
    transform: translateY(-5px);
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    font-size: 0.9rem;
    background: #151718;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Media Queries */
@media (max-width: 992px) {
    #hero {
        padding: 40px 0;
        height: auto;
        min-height: 80vh;
    }

    .hero-container {
        padding: 0 20px;
    }
    
    .logo {
        max-width: 140px;
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 70px 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .about-card {
        padding: 30px 20px;
        border-radius: 30px;
        backdrop-filter: blur(20px); /* Lower blur for mobile performance */
    }

    .coverage-box {
        padding: 30px 20px;
    }
    
    .emergency-box {
        padding: 40px 20px;
    }
    
    .emergency-list {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .contact-pill {
        font-size: 1.15rem;
        padding: 16px 28px;
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        padding: 30px 20px;
        width: 92%;
        margin: 4vh auto;
        border-radius: 20px;
    }

    .cta-button {
        width: 100%;
        padding: 18px 24px;
    }

    .badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.25rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .tagline {
        font-size: 0.85rem;
        margin-bottom: 25px;
    }

    .service-card {
        padding: 35px 25px;
    }

    .about-card h3 {
        font-size: 1.4rem;
    }
}

.contact-icon-small {
    width: 24px;
    height: 24px;
    /* Removed filter: invert(1) for light theme as icons should be dark now */
}

.contact-details {
    margin-bottom: 40px;
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
    filter: brightness(3); /* WhatsApp brightness up to 300% */
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}
