/* --- Variables y Estilos Globales --- */
:root {
    --primary-color: #1A7589; /* Teal del logo */
    --secondary-color: #DD6B20; /* Naranja del logo */
    --highlight-red: #E53935; /* Rojo para acciones importantes */
    --dark-color: #1f2a36;
    --light-color: #f5f7fa;
    --white-color: #ffffff;
    --font-family: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--white-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Ajuste de espaciado en encabezados de página */
.page-header {
    padding: 40px 0 20px 0; /* antes era más grande */
}

.page-header h1 {
    margin-bottom: 10px; /* Reduce el espacio bajo el título */
}

.page-header p {
    margin-top: 0;
}

/* --- Contenedores --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Tipografía --- */
h1, h2, h3 {
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

/* --- Enlaces --- */
a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* --- Navbar claro con texto oscuro --- */
.navbar {
    background: linear-gradient(to right, #ffffff, #e6f3f6); /* Tonos claros del logo */
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .logo img {
    height: 55px;
}

.navbar .nav-links {
    display: flex;
    align-items: center;
}

.navbar .nav-links li {
    margin-left: 25px;
}

.navbar .nav-links a {
    color: var(--primary-color); /* Teal oscuro */
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    background-color: rgba(26, 117, 137, 0.1);
    color: var(--highlight-red); /* Rojo para hover */
}

/* --- Botones --- */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--highlight-red);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #c62828;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(229,57,53,0.3);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-secondary:hover {
    background-color: #145d69;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(26,117,137,0.3);
}

/* --- Hero --- */
.hero {
    background: linear-gradient(rgba(26,117,137,0.8), rgba(229,57,53,0.6)),
        url('https://via.placeholder.com/1600x800.png?text=Fondo+Industrial+Moderno') no-repeat center/cover;
    color: var(--white-color);
    text-align: center;
    padding: 120px 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease forwards;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    animation: fadeInUp 1s ease forwards;
}

/* --- Secciones --- */
section {
    padding: 20px 0;
}

.value-card, .solution-card {
    background: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover, .solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* --- Acordeón Cursos --- */
.accordion {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.4s;
    border-radius: 5px;
}

.accordion:hover, .accordion.active {
    background-color: #145d69;
}

.panel {
    padding: 0 18px;
    background-color: var(--white-color);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    border: 1px solid #ddd;
    border-top: none;
}

/* --- Formulario de contacto --- */
.contact-form form {
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form button {
    width: 50%;
}

/* --- Footer --- */
footer {
    background: var(--dark-color);
    color: var(--white-color);
    text-align: center;
    padding: 20px 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: none;
        flex-direction: column;
        background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
        width: 100%;
        padding: 20px;
    }

    .navbar .nav-links.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    section {
        padding: 60px 0;
    }
}

/* --- Animaciones --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Overlay del menú --- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* --- Animación slide-in menú móvil --- */
@media (max-width: 768px) {
    .navbar .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100%;
        width: 70%;
        max-width: 280px;
        background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
        padding-top: 80px;
        transition: right 0.3s ease;
        z-index: 999;
    }

    .navbar .nav-links.active {
        right: 0;
    }

    body.menu-open {
        overflow: hidden;
    }

    .navbar .nav-links li {
        margin: 15px 0;
    }

    .navbar .nav-links a {
        color: var(--white-color);
        font-size: 1.2rem;
    }
}

.value-card, .solution-card {
    background: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.value-card:hover, .solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, rgba(229, 57, 53, 0.08), rgba(26, 117, 137, 0.05));
}
