/* ==========================================================================
   HYDROS INGENIERÍA S.A.S. - ESTILOS AVANZADOS, MOTION DESIGN, FAVICON WAVE,
   MEGA-MENÚ DE SERVICIOS, CLEAN MINIMAL SIGN-IN, PORTAL & PANEL DE USUARIO
   ========================================================================== */

:root {
    --section-padding-y: 80px;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 12px 35px rgba(11, 25, 44, 0.22);
}

section {
    padding: var(--section-padding-y) 0;
}

/* 1. PANTALLA DE CARGA & FAVICON.SVG ANIMADO (ECUALIZADOR HIDRÁULICO SIN DEFORMACIÓN) */
.hydros-preloader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #132A46 0%, #0B192C 70%, #070F1E 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.hydros-preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hydros-favicon-stage {
    width: 96px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hydros-favicon-stage svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    display: block;
}

.hydros-preloader-caption {
    margin-top: 22px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(131, 192, 215, 0.85);
    opacity: 0.9;
}

/* Respeto estricto a prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .hydros-preloader {
        transition: opacity 0.2s ease;
    }
    html {
        scroll-behavior: auto;
    }
}

/* 2. LIQUID GLASS BUTTONS & MICROINTERACCIONES */
.btn-liquid-glass {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: linear-gradient(135deg, rgba(0, 163, 166, 0.92), rgba(0, 180, 216, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 24px rgba(0, 163, 166, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.35);
}

.btn-liquid-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    transform: skewX(-20deg);
    transition: left 0.65s ease;
}

.btn-liquid-glass:hover::before {
    left: 140%;
}

/* 3. NAVBAR EXTENDIDA & MEGA-MENÚ DESPLEGABLE DE SERVICIOS */
header.scrolled {
    background: rgba(7, 15, 30, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    padding: 2px 0;
}

.nav-item-has-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-dropdown-trigger i {
    font-size: 0.72rem;
    transition: transform 0.3s ease;
}

.nav-item-has-dropdown:hover .nav-dropdown-trigger i,
.nav-item-has-dropdown.open .nav-dropdown-trigger i {
    transform: rotate(180deg);
}

.hydros-services-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 680px;
    max-width: 92vw;
    background: rgba(11, 25, 44, 0.98);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 180, 216, 0.28);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.nav-item-has-dropdown:hover .hydros-services-dropdown,
.nav-item-has-dropdown.open .hydros-services-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-service-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
    cursor: pointer;
    text-align: left;
}

.dropdown-service-item:hover {
    background: rgba(0, 163, 166, 0.16);
    border-color: var(--accent-teal);
    transform: translateX(4px);
}

.dropdown-service-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0, 163, 166, 0.18);
    color: var(--accent-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.dropdown-service-info h5 {
    color: var(--white);
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.25;
}

.dropdown-service-info span {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.74rem;
    display: block;
    line-height: 1.35;
}

.nav-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-nav-auth {
    padding: 9px 18px;
    font-size: 0.82rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.btn-nav-auth:hover {
    background: rgba(0, 163, 166, 0.25);
    border-color: var(--accent-teal);
    color: var(--white);
}

/* 4. TARJETAS DE SERVICIO INTERACTIVAS Y DRAWER/MODAL DE ESPECIALIDAD (SIN ABRIR NUEVA PESTAÑA) */
.service-card {
    position: relative;
    cursor: pointer;
}

.service-card-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.btn-service-explore {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.btn-service-explore:hover {
    color: var(--primary-dark);
}

.btn-service-wa-mini {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(37, 211, 102, 0.12);
    color: #15803D;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-service-wa-mini:hover {
    background: #25D366;
    color: var(--white);
}

/* Modal / Panel Dinámico de Servicio Integrado */
.hydros-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7, 15, 30, 0.78);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hydros-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.hydros-service-modal {
    background: var(--white);
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    border: 1px solid #E2E8F0;
}

.service-modal-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-navy));
    color: var(--white);
    padding: 28px 32px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.service-modal-header h3 {
    color: var(--white);
    font-size: 1.45rem;
    margin-bottom: 6px;
}

.service-modal-body {
    padding: 28px 32px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 28px;
}

.service-modal-Close {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
}

.service-faq-item {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 10px;
}

.service-faq-item h5 {
    font-size: 0.88rem;
    margin-bottom: 4px;
    color: var(--primary-dark);
}

.service-faq-item p {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin: 0;
}

/* 5. CLEAN MINIMAL SIGN-IN (REFERENCIA 21ST.DEV @preetsuthar17/clean-minimal-sign-in) */
.clean-auth-modal {
    background: #FFFFFF;
    width: 100%;
    max-width: 430px;
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 24px 60px rgba(11, 25, 44, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.9);
    position: relative;
    text-align: center;
}

.clean-auth-logo-badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #0B192C;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px;
    box-shadow: 0 8px 20px rgba(11, 25, 44, 0.18);
}

.clean-auth-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 6px;
}

.clean-auth-subtitle {
    font-size: 0.88rem;
    color: #64748B;
    margin-bottom: 24px;
}

.clean-auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    background: #F1F5F9;
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.clean-auth-tab {
    padding: 8px 12px;
    border-radius: 9px;
    border: none;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clean-auth-tab.active {
    background: #FFFFFF;
    color: #0B192C;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.btn-google-oauth {
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #1E293B;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 18px;
}

.btn-google-oauth:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.clean-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #94A3B8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.clean-auth-divider::before,
.clean-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

.clean-input-group {
    text-align: left;
    margin-bottom: 14px;
}

.clean-input-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 5px;
}

.clean-input-wrapper {
    position: relative;
}

.clean-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 0.9rem;
}

.clean-input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #0F172A;
    background: #F8FAFC;
    transition: all 0.2s ease;
}

.clean-input:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 163, 166, 0.14);
}

.btn-clean-submit {
    width: 100%;
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    background: #0B192C;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
}

.btn-clean-submit:hover {
    background: var(--primary-navy);
    transform: translateY(-1px);
}

/* 6. PORTAL DE CONOCIMIENTO, PROYECTOS Y TESTIMONIOS */
.knowledge-section {
    background: #FFFFFF;
}

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.article-card {
    background: var(--bg-light);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-cyan);
}

.article-cover {
    height: 190px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-navy));
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    color: var(--white);
    background-size: cover;
    background-position: center;
}

.article-category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(0, 163, 166, 0.9);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.article-body {
    padding: 22px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.article-body h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    line-height: 1.35;
}

.article-body p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Marquee / Testimonios sutiles */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 35px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 24px;
    text-align: left;
    color: rgba(255, 255, 255, 0.9);
}

.testimonial-quote {
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.85);
}

.testimonial-author {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-teal);
}

.testimonial-org {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive ajustes adicionales */
@media (max-width: 992px) {
    .knowledge-grid, .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .service-modal-body {
        grid-template-columns: 1fr;
    }
    .hydros-services-dropdown {
        position: static;
        transform: none;
        width: 100%;
        grid-template-columns: 1fr;
        display: none;
        margin-top: 10px;
    }
    .nav-item-has-dropdown.open .hydros-services-dropdown {
        display: grid;
    }
}

@media (max-width: 768px) {
    .knowledge-grid, .testimonials-grid {
        grid-template-columns: 1fr;
    }
}
