/* ========================================
   ESTILOS BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #1f2937;
    line-height: 1.6;
}

/* ========================================
   UTILIDADES DE COLOR
======================================== */
.accent-blue {
    background-color: #1e3a8a;
    color: white;
}

.accent-text-blue {
    color: #1e3a8a;
}

/* ========================================
   HEADER CON IMAGEN DE FONDO
======================================== */
.header-bg {
    background-image: url('https://www.adecco.com/-/media/project/adecco/adecco-es/perfiles/redes/l3.jpg?h=483&iar=0&w=724&hash=CFE8FCD2FB7B103782B9D75E30836B17');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    padding-bottom: 0;
}

.header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 15;
}

.header-bg::after {
    content: none;
}

/* ========================================
   NAVEGACIÓN
======================================== */
/* El nav ya está dentro del header */
nav {
    position: relative;
    z-index: 20;
}

/* ========== Botón Hamburguesa ========== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 10000;
    background: none;
    border: none;
    padding: 5px;
    position: relative;
    margin-left: auto;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: #ffffff;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

/* Animación del botón hamburguesa cuando está activo */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========== Menú de Navegación ========== */
.nav-menu {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
    display: block;
    opacity: 0.7;
}

.nav-menu a:hover {
    color: #fbbf24;
    opacity: 1;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: #fbbf24;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* ========================================
   BOTONES Y CTA
======================================== */
.cta-button {
    transition: background-color 0.3s ease, transform 0.1s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
    z-index: 20;
}

.cta-button:hover {
    transform: translateY(-1px) scale(1.01);
    background-color: #3b82f6;
}

/* ========================================
   TARJETAS DE SERVICIOS
======================================== */
.service-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    background-color: white;
}

.service-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.service-icon-placeholder {
    font-size: 2rem;
    line-height: 1;
}

/* ========================================
   FOOTER
======================================== */
.footer {
    background-color: #1a1a2e;
    color: #e4e4e4;
    padding: 40px 20px 20px;
    font-family: Arial, sans-serif;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 20px;
}

.footer-section {
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #1a6bb3;
    margin-bottom: 15px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    border-bottom: 2px solid #ffcc00;
    padding-bottom: 5px;
}

.footer-section p {
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    line-height: 1.5;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #e4e4e4;
    text-decoration: none;
    font-size: clamp(0.85rem, 2vw, 0.9rem);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #1a6bb3;
    text-decoration: underline;
}

.footer-section.contact i {
    margin-right: 8px;
    color: #1a6bb3;
}

.social-links a {
    display: inline-block;
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-right: 15px;
    color: #e4e4e4;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #1a6bb3;
}

.footer-bottom {
    border-top: 1px solid #333;
    text-align: center;
    padding-top: 15px;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
}

/* ========================================
   MEDIA QUERIES
======================================== */

/* ========== Tablets y Móviles (hasta 768px) ========== */
@media only screen and (max-width: 768px) {
    
    /* Mostrar botón hamburguesa */
    .hamburger {
        display: flex;
    }
    
    /* Ocultar menú normal en móvil */
    nav .nav-menu {
        display: none;
    }

    /* Menú móvil activo */
    .nav-menu.active {
        display: flex;
        position: fixed;
        left: 0;
        top: 0;
        flex-direction: column;
        background-color: rgba(30, 58, 138, 0.98);
        width: 100%;
        text-align: center;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
        padding: 80px 0 20px;
        gap: 0;
        z-index: 9999;
        height: auto;
        overflow-y: auto;
        backdrop-filter: blur(10px);
    }

    .nav-menu li {
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu a {
        font-size: 18px;
        padding: 15px 0;
        opacity: 1;
    }

    .nav-menu a::after {
        display: none;
    }
    
    /* En móvil, solo cambiar a amarillo sin línea */
    .nav-menu a:hover {
        color: #fbbf24;
    }

    /* Ajustes del header */
    .header-bg {
        min-height: 350px;
        padding: 20px 0;
    }

    .header-bg h2 {
        font-size: 2.5rem !important;
        line-height: 1.2;
    }

    .header-bg p {
        font-size: 1rem !important;
    }

    /* Grid de servicios responsive */
    #servicios .grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Footer responsive */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h3 {
        border-bottom: none;
        padding-bottom: 10px;
    }

    .social-links {
        text-align: center;
    }

    /* Botón CTA responsive */
    .cta-button {
        font-size: 16px !important;
        padding: 12px 24px !important;
    }
}

/* ========== Móviles pequeños (hasta 480px) ========== */
@media only screen and (max-width: 480px) {
    .header-bg {
        min-height: 300px;
    }

    .header-bg h2 {
        font-size: 2rem !important;
    }

    .header-bg p {
        font-size: 0.9rem !important;
    }

    #servicios h3 {
        font-size: 1.5rem !important;
    }

    .service-card {
        padding: 16px !important;
    }

    .service-card h4 {
        font-size: 1rem !important;
    }

    .service-card p {
        font-size: 0.85rem !important;
    }
}

/* ========== Tablets (768px - 1024px) ========== */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    #servicios .grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .nav-menu {
        gap: 25px;
    }
}

/* ========== Desktop (1024px+) ========== */
@media only screen and (min-width: 1024px) {
    #servicios .grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ========================================
   AJUSTES PARA TAILWIND
======================================== */
/* Asegurar que el z-index funcione correctamente */
.max-w-7xl {
    position: relative;
}

/* Mejorar responsividad de padding en header */
@media (max-width: 640px) {
    .header-bg .max-w-7xl {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Ajuste de margen superior en el contenido del header */
@media (max-width: 768px) {
    .header-bg .mt-16 {
        margin-top: 40px;
    }
    
    /* Ocultar el contenido del header cuando el menú está activo */
    .nav-menu.active ~ .max-w-7xl,
    body:has(.nav-menu.active) .header-bg .max-w-7xl:last-child {
        visibility: hidden;
    }
}