/* ============================================
   VARIABLES Y RESET
   ============================================ */

:root {
    --primary-color: #1F3A70;
    --accent-color: #E63946;
    --light-bg: #F8F9FA;
    --dark-text: #1F3A70;
    --light-text: #666666;
    --border-color: #E0E0E0;
    --success-color: #28a745;
    --error-color: #dc3545;
    
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s ease;
    --shadow: 0 2px 8px rgba(31, 58, 112, 0.1);
    --shadow-lg: 0 8px 24px rgba(31, 58, 112, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--dark-text);
    line-height: 1.6;
    background-color: #ffffff;
}

/* ============================================
   CONTAINER Y LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */

.header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-color);
}

.logo-img {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-whatsapp-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.btn-whatsapp-header:hover {
    background: #d62828;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.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);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a9e 100%);
    color: white;
    padding: 120px 20px;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(230, 57, 70, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(30px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: slideDown 0.8s ease;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: slideUp 0.8s ease 0.2s both;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #d62828;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary:hover {
    background: #162a52;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* ============================================
   SECCIONES GENERALES
   ============================================ */

section {
    padding: 80px 20px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto 50px;
    line-height: 1.8;
}

/* ============================================
   RETOS SECTION
   ============================================ */

.retos {
    background: var(--light-bg);
}

.retos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.reto-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--accent-color);
}

.reto-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.reto-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.reto-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.reto-card p {
    color: var(--light-text);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   SERVICIOS SECTION
   ============================================ */

.servicios {
    background: white;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.servicio-card {
    background: linear-gradient(135deg, var(--light-bg) 0%, white 100%);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, white 0%, var(--light-bg) 100%);
}

.servicio-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.servicio-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.servicio-card p {
    color: var(--light-text);
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   ÁREAS SECTION
   ============================================ */

.areas {
    background: var(--light-bg);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.area-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.area-card:hover {
    box-shadow: var(--shadow-lg);
}

.area-header {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a9e 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    font-family: var(--font-heading);
}

.area-header:hover {
    background: linear-gradient(135deg, #162a52 0%, var(--primary-color) 100%);
}

.area-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.toggle-icon {
    font-size: 24px;
    font-weight: 300;
    transition: var(--transition);
}

.area-card.active .toggle-icon {
    transform: rotate(45deg);
}

.area-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 20px;
}

.area-card.active .area-content {
    max-height: 500px;
    padding: 20px;
}

.area-content ul {
    list-style: none;
    padding: 0;
}

.area-content li {
    padding: 10px 0;
    color: var(--light-text);
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.area-content li:last-child {
    border-bottom: none;
}

.area-content li::before {
    content: '✓ ';
    color: var(--accent-color);
    font-weight: 600;
    margin-right: 8px;
}

/* ============================================
   POR QUÉ NOSOTROS SECTION
   ============================================ */

.nosotros {
    background: white;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.nosotros-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d5a9e 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.nosotros-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.nosotros-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.nosotros-card h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.nosotros-card p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
}

/* ============================================
   CONTACTO SECTION
   ============================================ */

.contacto {
    background: var(--light-bg);
}

.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 50px;
    align-items: start;
}

.contacto-form {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
    color: var(--dark-text);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-group.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-group.checkbox input {
    width: auto;
    margin-top: 4px;
    cursor: pointer;
}

.form-group.checkbox label {
    margin-bottom: 0;
    cursor: pointer;
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.contacto-info {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contacto-info h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.info-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 14px;
}

.info-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.info-item a:hover {
    text-decoration: underline;
}

.contacto-info .btn {
    width: 100%;
    margin-top: 20px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--primary-color);
    color: white;
    padding: 50px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    opacity: 0.9;
}

.footer-section a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    opacity: 0.8;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .btn-whatsapp-header {
        display: none;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .section-title {
        font-size: 32px;
    }

    .contacto-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .retos-grid,
    .servicios-grid,
    .areas-grid,
    .nosotros-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 50px 20px;
    }

    .hero {
        padding: 80px 20px;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-wrap: wrap;
    }

    .hero-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 24px;
    }

    .contacto-form,
    .contacto-info {
        padding: 20px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}
