/* ================================================
   TERRA INGENIERÍA - CUSTOM STYLES
   ================================================ */

/* --- Colores Corporativos --- */
:root {
    --color-azul: #2B426D;
    --colñor-azul-claro: #304d8a;
    --color-verde: #00A955;
    --color-azul-hover: #1e2f4d;
    --color-verde-hover: #008f47;
}

/* --- Reset y configuración base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Saira', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    line-height: 1.6;
    color: #1f2937;
}

/* --- Hero Video --- */
#heroVideo {
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
}

/* --- Transiciones suaves globales --- */
a,
button,
.transition-all {
    transition: all 0.3s ease-in-out;
}

/* --- Navbar Enhancements --- */
nav {
    transition: box-shadow 0.3s ease-in-out;
}

nav:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Dropdown submenus */
.group:hover .group-hover\:block {
    display: block;
    animation: fadeInDown 0.3s ease-in-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px) translateX(-50%);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%);
    }
}

/* Hover effect en items de submenu */
.group\/item:hover .bg-green-600 {
    width: 4px;
    background-color: var(--color-verde) !important;
}

/* --- Hero Section --- */
.hero-title {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* Overlay pixelado */
.pixel-overlay {
    background-image: url('../img/pixel-overlay.png');
    background-repeat: repeat;
    background-size: 8px 8px;
    pointer-events: none;
}

/* Overlay pixelado generado por CSS (fallback) */
.pixel-overlay-css {
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .05) 26%, transparent 27%, transparent 74%, rgba(255, 255, 255, .05) 75%, rgba(255, 255, 255, .05) 76%, transparent 77%, transparent);
    background-size: 8px 8px;
    background-position: 0 0;
    pointer-events: none;
}

/* Subrayado parcial para "COMO TRABAJAMOS" */
.underline-partial {
    position: relative;
    display: inline-block;
}

.underline-partial::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 50%;
    height: 2px;
    background-color: var(--color-verde);
    transition: width 0.3s ease;
}

.underline-partial:hover::after {
    width: 100%;
    left: 0;
}

/* --- Buttons --- */
.btn-primary {
    padding: 1rem 2.5rem;
    background-color: white;
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    border: 2px solid white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--color-verde);
    color: white;
    border-color: var(--color-verde);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 169, 85, 0.3);
}

.btn-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background-color: white;
    border-radius: 50%;
    color: #1f2937;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-play:hover {
    background-color: var(--color-verde);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 169, 85, 0.4);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: "Titillium Web", system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.text-hero {
    font-size: clamp(2.5rem, 8vw, 6rem);
    letter-spacing: -0.025em;
}

/* --- Utilidades --- */
.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* --- Mobile Menu Animations --- */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Submenu mobile animations */
#empresa-submenu,
#servicios-submenu {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
}

#empresa-submenu.hidden,
#servicios-submenu.hidden {
    max-height: 0;
    opacity: 0;
}

/* Chevron rotation */
.rotate-180 {
    transform: rotate(180deg);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .text-hero {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    nav {
        position: sticky;
        top: 0;
        z-index: 50;
    }
}

/* --- Scroll Behavior --- */
html {
    scroll-behavior: smooth;
}

/* --- Focus States (Accesibilidad) --- */
a:focus,
button:focus {
    outline: 2px solid var(--color-verde);
    outline-offset: 2px;
}

/* --- Loading States --- */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* --- Print Styles --- */
@media print {
    nav,
    button,
    .btn-primary,
    .btn-play {
        display: none;
    }
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--color-verde);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-verde-hover);
}