/* ============ ESTILOS GENERALES ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
    padding-top: 90px; /* AUMENTADO de 80px a 90px por logo más grande */
    background-color: #f8f9fa;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============ HEADER ============ */
header {
    background-color: #0f172a;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    min-height: 90px; /* ALTURA MÍNIMA para contener logo grande */
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0; /* AUMENTADO padding para logo grande */
    width: 100%;
}

/* ============ LOGO - TAMAÑO GRANDE CON HEADER AJUSTADO ============ */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 70px; /* Altura fija para contener el logo */
}

.logo-img {
    height: 220px; /* Tamaño grande - 70px */
    width: auto;
    max-width: 300px;
    transition: transform 0.3s ease;
    object-fit: contain; /* Mantiene proporciones */
}

.logo-img:hover {
    transform: scale(1.05);
}

/* ============ NAVEGACIÓN (TAB + SUBRAYADO ANIMADO) ============ */
nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center; /* Centra verticalmente con el logo */
    height: 100%;
}

nav a {
    position: relative;
    color: #ffffff;
    text-decoration: none;
    padding: 8px 16px;          /* tab */
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 6px;         /* tab */
    transition:
        background 0.3s ease,
        box-shadow 0.3s ease,
        color 0.3s ease;
}

/* TAB iluminado */
nav a:hover,
nav a.active {
    color: #ffffff;
    background: rgba(0, 198, 255, 0.16);
    box-shadow: 0 0 12px rgba(0, 198, 255, 0.35);
}

/* Subrayado animado (degradado + glow) */
nav a::after {
    content: "";
    position: absolute;
    left: 10px;                 /* para que no toque bordes del tab */
    right: 10px;
    bottom: 6px;                /* un poco por dentro del tab */
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, #00c6ff, #016dc6);
    transition: width 0.35s ease;
    box-shadow: 0 0 8px rgba(0, 198, 255, 0.5);
}

/* Animación del subrayado */
nav a:hover::after,
nav a.active::after {
    width: calc(100% - 20px);   /* respeta left/right */
}





.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #00a859;
    align-self: center; /* Centra el botón con el logo */
}

/* ============ HERO SECTION ============ */
.hero {
    background: linear-gradient(rgba(26, 54, 93, 0.9), rgba(26, 54, 93, 0.9)),
    url('../img/cpd.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 120px 0 80px;
    margin-top: 0;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #eee;
}

/* ============ BOTONES ============ */
.btn {
    display: inline-block;
    background-color: #00a859;
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #008f4c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    margin-top: 15px;
}

/* ============ TÍTULOS ============ */
h2 {
    text-align: center;
    font-size: 2.5rem;
    margin: 40px 0;
    color: #1a365d;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: #00a859;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* ============ SERVICIOS ============ */
.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.servicio-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.servicio-icon {
    font-size: 2.5rem;
    color: #00a859;
    margin-bottom: 20px;
}

/* ============ NOSOTROS ============ */
.nosotros {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.nosotros-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.nosotros-text {
    flex: 1;
}

.nosotros-img {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.nosotros-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============ CLIENTES ============ */
.clientes-logos {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.cliente-logo {
    width: 150px;
    height: 80px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    color: #555;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.cliente-logo:hover {
    background-color: #e2e8f0;
    transform: scale(1.05);
}

/* ============ CONTACTO ============ */
.contacto {
    background-color: #1a365d;
    color: white;
    padding: 80px 0;
}

.contacto h2 {
    color: white;
}

.contacto h2::after {
    background-color: #00a859;
}

.contacto-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contacto-info h3 {
    color: white;
    margin-bottom: 20px;
}

.contacto-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contacto-icon {
    font-size: 1.2rem;
    color: #00a859;
    margin-right: 15px;
    margin-top: 5px;
}

.contacto-form input,
.contacto-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.contacto-form textarea {
    height: 150px;
    resize: vertical;
}

.contacto-form .btn {
    background-color: #00a859;
    width: 100%;
}

.contacto-form .btn:hover {
    background-color: #008f4c;
}

/* ============ FOOTER ============ */
footer {
    background-color: #0f172a;
    color: #cbd5e1;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* Logo en footer */
.footer-logo-img {
    height: 200px;
    width: auto;
    max-width: 220px;
    margin-bottom: 15px;
    object-fit: contain;
}

.footer-column h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-links a:hover {
    color: #00a859;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #334155;
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-icons a:hover {
    background-color: #00a859;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #334155;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
    body {
        padding-top: 85px; /* Ajustado para tablet */
    }
    
    header {
        min-height: 85px;
    }
    
    .nosotros-content {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .logo-img {
        height: 65px; /* Un poco más pequeño en tablet */
    }
    
    .logo {
        height: 65px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px; /* Ajustado para móvil */
    }
    
    header {
        min-height: 80px;
    }
    
    .header-container {
        padding: 15px 0; /* Menos padding en móvil */
        flex-wrap: wrap; /* Permite que el menú baje */
    }
    
    .mobile-menu-btn {
        display: block;
        order: 2; /* Botón a la derecha del logo */
    }
    
    .logo {
        order: 1; /* Logo primero */
        height: 60px;
    }
    
    .logo-img {
        height: 60px; /* Más pequeño en móvil */
        max-width: 250px;
    }
    
    nav {
        order: 3; /* Menú debajo */
        width: 100%;
        margin-top: 15px;
        position: static;
        transform: none;
        opacity: 1;
        padding: 0;
        background: transparent;
        box-shadow: none;
        display: none; /* Oculto por defecto en móvil */
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    nav a {
        padding: 8px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 80px 0 50px;
    }
    
    .footer-logo-img {
        height: 45px;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 75px; /* Ajustado para móvil pequeño */
    }
    
    header {
        min-height: 75px;
    }
    
    .logo {
        height: 55px;
    }
    
    .logo-img {
        height: 55px;
        max-width: 200px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .servicio-card {
        padding: 20px;
    }
    
    .clientes-logos {
        gap: 15px;
    }
    
    .cliente-logo {
        width: 120px;
        height: 60px;
        font-size: 1rem;
    }
    
    .footer-logo-img {
        height: 40px;
    }
}

/* ============ PÁGINAS INTERNAS ============ */
.hero-interna {
    background: linear-gradient(rgba(0, 168, 89, 0.9), rgba(26, 54, 93, 0.9)), 
                url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?ixlib=rb-4.0.3&auto=format&fit=crop&w=1470&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0 60px;
    margin-top: 0;
}

.hero-interna h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero-interna p {
    color: #ddd;
    font-size: 1.2rem;
}

/* ============ UTILIDADES ============ */
.text-center {
    text-align: center;
}

.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }

.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }

.p-20 { padding: 20px; }
.p-30 { padding: 30px; }
.p-40 { padding: 40px; }
.p-50 { padding: 50px; }

.bg-light {
    background-color: #f8f9fa;
}

.bg-dark {
    background-color: #1a365d;
    color: white;
}

/* ============ FORMULARIOS ============ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #00a859;
    outline: none;
}

/* ============ MENSAJES ============ */
.mensaje-exito {
    background-color: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.mensaje-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* ============ ANIMACIONES ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}