/* =========================================
 *   1. VARIABLES GLOBALES Y RESET
 *   ========================================= */
:root {
    /* Paleta Clara (Inicio/Servicios) */
    --primary-color: #207A71;
    --secondary-color: #155e56;
    --accent-hover: #2c9f94;
    --text-dark: #1f2937;
    --card-bg: rgba(255, 255, 255, 0.96);
    --nav-height: 80px;

    /* Paleta Oscura (Nosotros) */
    --bg-dark: #0f0f11;
    --text-main: #ffffff;
    --text-muted: #e0e0e0;
    --accent-bright: #2ae6d6;

    /* Alineación Maestra para Asimetría */
    --align-offset: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =========================================
 *   2. BARRA DE NAVEGACIÓN
 *   ========================================= */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: auto;
    display: block;
    object-fit: contain;
}

.brand-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-tu {
    font-size: 1.25rem;
    font-weight: 700;
    color: #102F5E;
}

.brand-empresa {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--primary-color); }
.nav-links a:hover::after { width: 100%; }

.link-servicios { color: var(--secondary-color) !important; }

.btn-contact {
    background-color: var(--secondary-color);
    color: white !important;
    padding: 10px 20px;
    border-radius: 6px;
    transition: background-color 0.3s ease !important;
}

.btn-contact:hover { background-color: var(--primary-color); }
.btn-contact::after { display: none; }

/* Menú Móvil */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* =========================================
 *   3. CARRUSEL HERO (INICIO)
 *   ========================================= */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

.carousel-nav { display: none; }

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff; z-index: 3;
    width: 80%;
    max-width: 800px;
}

.slide-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out 0.3s;
}

.slide-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out 0.5s;
}

/* Lógica Carrusel */
#slide1:checked ~ .carousel-slides #slide1-content,
#slide2:checked ~ .carousel-slides #slide2-content,
#slide3:checked ~ .carousel-slides #slide3-content,
#slide4:checked ~ .carousel-slides #slide4-content { opacity: 1; z-index: 10; }

#slide1:checked ~ .carousel-slides #slide1-content .slide-content h1,
#slide1:checked ~ .carousel-slides #slide1-content .slide-content p,
#slide2:checked ~ .carousel-slides #slide2-content .slide-content h1,
#slide2:checked ~ .carousel-slides #slide2-content .slide-content p,
#slide3:checked ~ .carousel-slides #slide3-content .slide-content h1,
#slide3:checked ~ .carousel-slides #slide3-content .slide-content p,
#slide4:checked ~ .carousel-slides #slide4-content .slide-content h1,
#slide4:checked ~ .carousel-slides #slide4-content .slide-content p { opacity: 1; transform: translateY(0); }

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 20;
    transform: translateY(-50%);
}

.carousel-controls label {
    cursor: pointer;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    transition: background 0.3s;
    user-select: none;
    backdrop-filter: blur(5px);
}

.carousel-controls label:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #000;
}

#slide1:checked ~ .carousel-controls .prev-1, #slide1:checked ~ .carousel-controls .next-1,
#slide2:checked ~ .carousel-controls .prev-2, #slide2:checked ~ .carousel-controls .next-2,
#slide3:checked ~ .carousel-controls .prev-3, #slide3:checked ~ .carousel-controls .next-3,
#slide4:checked ~ .carousel-controls .prev-4, #slide4:checked ~ .carousel-controls .next-4 { display: flex; }

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 20;
}

.carousel-indicators label {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-indicators label:hover {
    background: rgba(255, 255, 255, 0.8);
}

#slide1:checked ~ .carousel-indicators label[for="slide1"],
#slide2:checked ~ .carousel-indicators label[for="slide2"],
#slide3:checked ~ .carousel-indicators label[for="slide3"],
#slide4:checked ~ .carousel-indicators label[for="slide4"] { background: #fff; transform: scale(1.3); }

/* =========================================
 *   4. SECCIÓN DE SERVICIOS
 *   ========================================= */
#servicios {
background-image: url('fondo-servicios.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-attachment: fixed;
padding: 100px 0;
position: relative;
}

#servicios::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.65);
z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.divider {
    width: 70px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-header p {
    color: #e5e7eb;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

.service-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 35px 30px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border-top: 4px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.3);
    border-top: 4px solid var(--accent-hover);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background-color: #eefdfb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.service-card:hover .icon-wrapper { background-color: #d4f5f2; }

/* --- CAMBIO CLAVE PARA SVG EXTERNO --- */
.icon-wrapper img {
    width: 32px;
    height: 32px;
    /* Filtro para convertir el negro del SVG a var(--primary-color) #207A71 */
    filter: brightness(0) saturate(100%) invert(46%) sepia(85%) saturate(380%) hue-rotate(130deg);
}

.service-card h3 {
    font-size: 1.35rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.service-card p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* =========================================
 *   5. SECCIÓN QUIÉNES SOMOS
 *   ========================================= */
#nosotros-section {
background-color: var(--bg-dark);
color: var(--text-main);
position: relative;
overflow: hidden;
background-image: linear-gradient(rgba(15, 15, 17, 0.85), rgba(15, 15, 17, 0.95)), url('fondo-somos.jpg');
background-size: cover;
background-position: center;
background-attachment: fixed;
padding-bottom: 120px;
}

#nosotros-section h1,
#nosotros-section h2,
#nosotros-section h3 {
color: #ffffff;
text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
font-weight: 800;
letter-spacing: -0.03em;
}

.hero-nosotros,
.stack-section {
    margin-left: 23%;
    margin-right: auto;
    width: 100%;
    max-width: 1600px;
    padding-left: 0;
    position: relative;
}

.hero-nosotros {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 40px;
}

.hero-nosotros h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1.1;
    margin-bottom: 30px;
    margin-top: 0;
    color: #ffffff;
    border-left: none;
    width: 100%;
    max-width: 750px;
    padding-left: 30px;
    box-sizing: border-box;
    background: transparent;
}

.hero-nosotros p {
    font-size: 1.25rem;
    color: var(--text-muted);
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(90deg, rgba(32,122,113,0.05) 0%, transparent 100%);
    box-shadow: 3px 0 15px rgba(32, 122, 113, 0.4);
    padding-left: 30px;
    padding-right: 20px;
    padding-top: 30px;
    padding-bottom: 30px;
    width: 100%;
    max-width: 750px;
    box-sizing: border-box;
    border-radius: 4px;
    text-align: left;
    font-weight: 400;
    line-height: 1.6;
    margin-left: 0;
}

.hero-nosotros strong {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.stack-section {
    padding-bottom: 120px;
}

.stack-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-bright), transparent);
    box-shadow: 0 0 20px var(--primary-color);
    opacity: 0.8;
    z-index: 0;
}

.item {
    margin-bottom: 100px;
    position: relative;
    padding-left: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards;
    z-index: 1;
}

.item::before {
    content: '';
    position: absolute;
    left: -54.5px;
    top: 1.2em;
    width: 14px;
    height: 14px;
    background-color: var(--bg-dark);
    border: 3px solid var(--accent-bright);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 15px var(--primary-color), 0 0 30px var(--accent-bright);
}

.item h2 {
    font-size: 2.8rem;
    margin-top: 0;
    margin-bottom: 24px;
    text-shadow: 0 0 15px rgba(32, 122, 113, 0.3);
    line-height: 1.2;
}

.item p, .item ul {
    font-size: 1.15rem;
    color: #d1d1d1;
    width: 100%;
    max-width: 750px;
    font-weight: 300;
    line-height: 1.6;
}

.item p strong {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.item ul {
    list-style: none;
    padding: 0;
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.item ul li {
    display: flex;
    align-items: flex-start;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 4px;
    border-left: 2px solid var(--primary-color);
    box-sizing: border-box;
}

.item ul li::before {
    content: '';
    flex-shrink: 0;
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-bright);
    border-radius: 50%;
    margin-right: 20px;
    margin-top: 8px;
    box-shadow: 0 0 10px var(--primary-color);
}

.item ul li strong {
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
    line-height: 1.5;
    display: block;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.item:nth-child(1) { animation-delay: 0.1s; }
.item:nth-child(2) { animation-delay: 0.3s; }
.item:nth-child(3) { animation-delay: 0.5s; }

/* =========================================
 *   6. FOOTER Y BOTÓN WHATSAPP
 *   ========================================= */
.site-footer {
    background-color: #1a1a1a;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

.social-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #333;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-link img { width: 24px; height: 24px; }
.social-link:hover { transform: translateY(-5px); }
.social-link.facebook:hover { background-color: #1877F2;}
.social-link.instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-link.tiktok:hover { background: linear-gradient(45deg, #00f2ea, #ff0050); }
.social-link.linkedin:hover { background-color: #0A66C2; }
.social-link.whatsapp:hover { background-color: #25D366; }

.social-link.email:hover,
.social-link.email:focus-visible {
    background-color: #207A71;
}

.footer-text {
    font-size: 0.85rem;
    color: #bfbfbf;
    margin: 0;
}

.footer-links a {
    color: #bfbfbf;
    text-decoration: none;
    margin: 0 8px;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: #155e56;
    text-decoration: underline;
}

/* Botón Flotante WhatsApp */
.whatsapp-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    background-color: #128C7E;
}

.whatsapp-btn i {
    color: white;
    font-size: 40px;
}

@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); }
}

/* =========================================
 *   7. RESPONSIVIDAD (MEDIA QUERIES)
 *   ========================================= */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
    }
    .nav-links.active { transform: translateY(0); }
    .btn-contact {
        width: 80%;
        text-align: center;
    }

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

    .slide-content h1 { font-size: 2rem; }
    .slide-content p {
        text-align: left;
        font-weight: 700;
        padding: 0;
        font-size: 1.1rem;
    }
    .carousel-controls label {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    .section-header h2 { font-size: 2rem; }
    .services-grid { grid-template-columns: 1fr; }
    #servicios { background-attachment: scroll; }

    :root { --align-offset: 20px; }

    .hero-nosotros h1 { font-size: 3.2rem; }
    .hero-nosotros { padding-left: var(--align-offset); }
    .stack-section { padding-left: var(--align-offset); }

    .item {
        margin-bottom: 80px;
        padding-left: 25px;
    }
    .item h2 { font-size: 2rem; }
    .item::before {
        left: -6.5px;
        width: 12px;
        height: 12px;
        top: 0.5em;
    }

    .item ul li {
        flex-direction: column;
        padding: 15px;
    }
    .item ul li::before {
        margin-bottom: 10px;
        margin-right: 0;
        margin-top: 0;
    }
}
