/* -------------------------------------------------------------------- */
/*
  Mejoras de Estilo:
  - Refinamiento de la paleta de colores para un look más profesional y cálido.
  - Suavizado de sombras y bordes para un efecto más sutil y moderno.
  - Ajustes en la tipografía y el espaciado para mejorar la legibilidad y la jerarquía.
  - Animaciones y transiciones más discretas y elegantes.
  - Coherencia en el diseño de las tarjetas, botones y formularios.
  - Organización del código con comentarios para mayor claridad.
*/
/* -------------------------------------------------------------------- */


/* --- Variables y Estilos Base --- */
:root {
    --primary-color: #e67e22; /* Naranja cálido y profesional */
    --primary-color-dark: #cc6d1f; /* Versión más oscura para hover */
    --accent-green: #2ecc71; /* Verde elegante para divisores y acentos */
    --text-color: #333333; /* Texto gris oscuro para mejor contraste */
    --heading-color: #1a1a1a;
    --background-color: #f9f9f9; /* Fondo gris muy claro para suavizar */
    --light-gray: #f2f2f2; /* Gris más claro para fondos de secciones */
    --dark-gray: #555555;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.05); /* Sombra suave y difusa */
    --shadow-medium: 0 8px 20px rgba(0, 0, 0, 0.1); /* Sombra más sutil y moderna */
    --border-radius-base: 10px;
    --border-radius-large: 15px;

    /* Variables para Modo Oscuro */
    --dark-background: #121212;
    --dark-surface: #1e1e1e;
    --dark-text: #e0e0e0;
    --dark-text-secondary: #aaaaaa;
    --dark-card-background: #282828;
    --dark-shadow: 0 4px 12px rgba(255, 255, 255, 0.05);
    --dark-input-border: #444;
    --dark-input-focus-shadow: 0 0 0 3px rgba(230, 126, 34, 0.4);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Estilos del Modo Oscuro --- */
body.dark-mode, @media (prefers-color-scheme: dark) {
    :root {
        --text-color: var(--dark-text);
        --heading-color: #fff;
        --background-color: var(--dark-background);
        --light-gray: var(--dark-surface);
        --dark-gray: var(--dark-text-secondary);
        --shadow-subtle: var(--dark-shadow);
        --shadow-medium: 0 8px 20px rgba(255, 255, 255, 0.08);
    }

    .navbar, .about, .services {
        background-color: var(--dark-surface);
    }

    .service-card, .mv-item, .value-item {
        background-color: var(--dark-card-background);
    }

    .contact {
        background-color: var(--dark-surface);
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        background-color: var(--dark-card-background);
        color: var(--dark-text);
        border-color: var(--dark-input-border);
    }

    .contact-form input:focus,
    .contact-form textarea:focus,
    .contact-form select:focus {
        box-shadow: var(--dark-input-focus-shadow);
    }

    .hero {
        background: linear-gradient(135deg, var(--dark-background) 50%, var(--dark-surface) 50%);
    }

    .footer {
        background-color: var(--dark-surface);
        border-color: #333;
    }

    .modal-content {
        background-color: var(--dark-surface);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .alert-success {
        background-color: #1a331f;
        color: #9cd4a7;
        border-color: #38613d;
    }

    .alert-error {
        background-color: #4b1a1c;
        color: #e09b9f;
        border-color: #8c3b40;
    }
}


/* --- Contenedor Global --- */
.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

section {
    padding: 6rem 0;
}

/* --- Tipografía --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--heading-color);
    font-weight: 700;
    transition: color 0.3s ease;
}

h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); line-height: 1.1; }
h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h4 { font-size: clamp(1.3rem, 3vw, 1.75rem); }

p {
    margin-bottom: 1.5rem;
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--dark-gray);
    transition: color 0.3s ease;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color-dark);
}

/* --- Clases de Utilidad --- */
.section-header {
    text-align: center;
    margin-bottom: 4rem; /* Más espacio para "respirar" */
}

.section-header p {
    color: var(--dark-gray);
    max-width: 650px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: var(--shadow-subtle);
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background-color: #fff;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: var(--shadow-subtle);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-image {
    height: 55px; /* Ligeramente más grande */
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem; /* Más espacio entre los enlaces */
}

.nav-link {
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    padding: 0.5rem 0; /* Espaciado para el underline */
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; /* Posicionado al borde */
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.login-btn {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 50px; /* Borde más redondeado */
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.login-btn:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px; /* Más espacio entre las barras */
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1010;
}

.nav-toggle span {
    display: block;
    width: 28px; /* Ligeramente más grueso */
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, #fff 50%, #f7f7f7 50%);
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    transition: background 0.3s ease;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.hero-text {
    flex: 1;
    animation: slideInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Lema con diseño elegante */
.hero-slogan-group {
    margin-bottom: 2rem; /* Más espacio */
    text-transform: uppercase;
    letter-spacing: 2px;
}
.slogan-text-orange {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}
.slogan-divider {
    display: block;
    width: 100px;
    height: 4px;
    background-color: var(--accent-green);
    margin: 8px 0;
    border-radius: 2px;
}
.slogan-text-dark {
    color: #000000;
    font-weight: 500;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.hero-text h1 {
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-text p {
    color: var(--dark-gray);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 1s ease-in-out;
}

/* Animación del logo (más sutil) */
.animated-logo {
    width: 100%;
    max-width: 400px;
    animation: pulseSubtle 3s infinite ease-in-out;
}

.hero-logo-img {
    width: 100%;
    height: auto;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulseSubtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}


/* --- Secciones de Contenido (Servicios, Nosotros, etc.) --- */
.services {
    background-color: #fff;
    transition: background-color 0.3s ease;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--light-gray);
    padding: 2.5rem; /* Más padding para un look premium */
    border-radius: var(--border-radius-base); /* Coherencia con la nueva variable */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px); /* Movimiento más sutil */
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h3 {
    margin-bottom: 0.5rem;
}

/* --- Sección Nosotros --- */
.about {
    background-color: #fff;
    transition: background-color 0.3s ease;
}
.about-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    margin-bottom: 1rem;
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.mv-item {
    padding: 1.5rem;
    border-radius: var(--border-radius-base);
    background-color: var(--background-color);
    box-shadow: var(--shadow-subtle);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.mv-item h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-team-image {
    width: 50%;
    
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
}

.values-section {
    margin-top: 5rem;
    text-align: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-item {
    padding: 2rem;
    background-color: #fff;
    border-radius: var(--border-radius-base);
    box-shadow: var(--shadow-subtle);
    transition: all 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.icon-circle {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    transition: transform 0.3s ease;
}

.value-item:hover .icon-circle {
    transform: scale(1.1);
}

/* --- Sección de Contacto y Formularios --- */
.contact {
    background-color: var(--light-gray);
    transition: background-color 0.3s ease;
}

.contact-content {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 15px; /* Más padding para inputs */
    border: 1px solid #ddd;
    border-radius: var(--border-radius-base); /* Coherencia con la nueva variable */
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2); /* Sombra de foco más suave */
}

.select-container {
    position: relative;
}

.select-container::after {
    content: '\f0d7';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
}

/* --- Pie de Página --- */
.footer {
    background-color: var(--heading-color);
    color: #fff;
    padding: 4rem 0 2rem;
    transition: background-color 0.3s ease;
}

.footer .container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand .footer-logo {
    height: 60px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #ccc;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-column h4 {
    color: #fff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer-column a {
    display: block;
    color: #ccc;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 2rem;
}

.footer-bottom p {
    margin: 0;
    color: #aaa;
}

/* --- Botón de WhatsApp --- */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
}

/* --- Estilos para los Modales --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: var(--border-radius-large);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: fadeInScale 0.3s ease-out;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 25px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--primary-color);
    text-decoration: none;
}

.login-form-container, .register-form-container {
    text-align: center;
}

.login-form h2, .register-form-container h2 {
    color: var(--heading-color);
    margin-bottom: 25px;
    font-family: var(--font-heading);
    transition: color 0.3s ease;
}

/* Estilos de formulario mejorados */
.form-group input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-base);
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
    outline: none;
}

.login-form button,
.register-form button {
    width: 100%;
    padding: 1rem;
    border-radius: var(--border-radius-base);
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background-color: var(--primary-color);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.login-form button:hover,
.register-form button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-3px);
}

.modal-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.modal-switch a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Clases de accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* --- Mensajes de Alerta --- */
.alert {
    padding: 12px;
    margin: 10px 0;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.modal-open {
    overflow: hidden;
}

/* --- Animaciones --- */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Media Queries --- */
@media screen and (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
    }
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    .hero-image {
        margin-top: 2rem;
    }
    .hero-buttons {
        justify-content: center;
    }
    .about-content, .contact-content {
        flex-direction: column;
    }
    .about-image {
        order: -1;
    }
}

@media screen and (max-width: 768px) {
    .navbar .container {
        height: 70px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100% - 70px);
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease-in-out;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link, .login-btn {
        font-size: 1.25rem;
        margin: 1rem 0;
   }

 .nav-toggle {
       display: flex;
   }

    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .contact-form {
        margin-top: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1.5rem;
    }

    .modal-content {
        padding: 2rem;
    }
    .login-form-container h2,
    .register-form-container h2 {
        font-size: 7vw;
    }
    .form-group input,
    .login-form button,
 .register-form button {
        padding: 0.8rem;
    }
}