/* ==========================================
   VARIABLES Y ESTILOS GLOBALES
   ========================================== */
:root {
    /* Colores principales */
    --color-navy: #0A2342;
    --color-navy-light: #1a3a5f;
    --color-green: #0D6938;
    --color-green-light: #E8F5E9;
    --color-white: #FFFFFF;
    --color-gray-light: #F5F5F5;
    --color-gray: #757575;
    --color-text: #333333;

    /* Tipografía */
    --font-primary: 'Poppins', sans-serif;

    /* Espaciados */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
}

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

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero-section {
    background-image: url('images/hero-image.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--color-white);
    position: relative;
    padding-bottom: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 35, 66, 0.9) 0%, rgba(26, 58, 95, 0.85) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section .min-vh-100 {
    min-height: auto !important;
    padding: 80px 0 60px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.6;
    opacity: 0.95;
}

.hero-section .btn-primary {
    background-color: var(--color-green);
    border: none;
    padding: 1rem 3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.hero-section .btn-primary:hover {
    background-color: #0a5029;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-image img {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Ticker Informativo */
.ticker-wrapper {
    background-color: var(--color-green);
    color: var(--color-white);
    overflow: hidden;
    padding: 0.75rem 0;
    position: relative;
    z-index: 2;
}

.ticker {
    display: flex;
    white-space: nowrap;
    animation: scroll 30s linear infinite;
}

.ticker span {
    padding: 0 3rem;
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==========================================
   SERVICIOS SECTION
   ========================================== */
.servicios-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.servicios-content {
    background-color: #E5F3EC;
    padding: 3rem 2rem;
    border-radius: 8px;
}

.section-tag {
    color: var(--color-green);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.3;
}

.proceso-section .section-title {
    color: #A72120;
}

.section-description {
    font-size: 1rem;
    color: var(--color-gray);
    line-height: 1.7;
}

.feature-item {
    align-items: flex-start;
    background-color: var(--color-white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.feature-icon {
    flex-shrink: 0;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

.feature-text {
    font-size: 0.95rem;
    color: var(--color-gray);
    margin: 0;
}

.servicios-image img {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   PROCESO SECTION
   ========================================== */
.proceso-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.step-card {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.step-card:hover {
    transform: translateY(-10px);
    z-index: 11;
}

.steps-container {
    position: relative;
}

.step-number {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.step-number .badge {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    position: relative;
    background-color: var(--color-green) !important;
    z-index: 10;
    box-shadow: 0 0 0 10px white;
}

/* Línea conectora horizontal */
.steps-connector {
    position: absolute;
    top: 220px;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 1;
    pointer-events: none;
}

.connector-line {
    position: absolute;
    top: 0;
    left: 12.5%;
    width: 75%;
    height: 3px;
    background-color: var(--color-green);
    z-index: 1;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #A72120;
    margin-bottom: 0.75rem;
}

.step-description {
    font-size: 0.9rem;
    color: var(--color-gray);
    line-height: 1.5;
}

/* ==========================================
   FORMULARIO SECTION
   ========================================== */
.formulario-section {
    background-color: var(--color-gray-light);
    padding: var(--spacing-xl) 0;
}

.formulario-wrapper {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.formulario-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-navy);
}

/* Contenedor del formulario Kommo */
.kommo-form-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.formulario-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Estilos para el formulario */
#uploadForm .form-label {
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 0.5rem;
}

#uploadForm .form-control,
#uploadForm .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#uploadForm .form-control:focus,
#uploadForm .form-select:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 0.2rem rgba(13, 105, 56, 0.15);
}

#uploadForm .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #e0e0e0;
    margin-right: 0.5rem;
}

#uploadForm .form-check-input:checked {
    background-color: var(--color-green);
    border-color: var(--color-green);
}

#uploadForm .form-check-label {
    color: var(--color-gray);
    cursor: pointer;
}

#uploadForm .form-check-inline {
    display: block;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#uploadForm .form-check-inline:hover {
    border-color: var(--color-green);
    background-color: rgba(13, 105, 56, 0.05);
}

#uploadForm .form-check-input:checked ~ .form-check-label {
    color: var(--color-green);
}

#uploadForm textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

#uploadForm .btn-success {
    background-color: var(--color-green);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#uploadForm .btn-success:hover {
    background-color: #0a5029;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 105, 56, 0.3);
}

#uploadForm .btn-success:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Alertas del formulario */
#formAlert {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

#formAlert.alert-success {
    background-color: #E8F5E9;
    border: 1px solid var(--color-green);
    color: var(--color-green);
}

#formAlert.alert-danger {
    background-color: #FFEBEE;
    border: 1px solid #D32F2F;
    color: #D32F2F;
}

/* ==========================================
   FAQ SECTION
   ========================================== */
.faq-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.faq-section .section-title {
    color: #A72120;
}

.accordion-item {
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0 !important;
}

.accordion-button {
    background-color: transparent;
    color: var(--color-navy);
    font-weight: 600;
    font-size: 1rem;
    padding: 1.5rem 0;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background-color: transparent;
    color: var(--color-navy);
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230A2342'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-body {
    padding: 0 0 1.5rem 0;
    color: var(--color-gray);
    line-height: 1.7;
}

/* ==========================================
   ESTADÍSTICAS SECTION
   ========================================== */
.estadisticas-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--color-white);
}

.stats-wrapper {
    background: linear-gradient(135deg, var(--color-navy) 0%, #2d5a8c 100%);
    padding: 3rem 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.social-icons a {
    color: var(--color-navy);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-green);
}

/* ==========================================
   CTA FINAL SECTION
   ========================================== */
.cta-final-section {
    background-image: url('images/cta-hands.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--color-white);
    position: relative;
    padding: 5rem 0;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 105, 56, 0.92) 0%, rgba(10, 80, 40, 0.88) 100%);
    z-index: 1;
}

.cta-final-section .container {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.cta-description {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.98;
}

.cta-final-section .btn-light {
    background-color: var(--color-white);
    color: var(--color-green);
    border: none;
    padding: 1rem 3rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.cta-final-section .btn-light:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   FOOTER SECTION
   ========================================== */
.footer-section {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 1.5rem;
}

.footer-menu {
    padding: 0;
    margin: 0;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--color-green);
}

.footer-contact {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-item i {
    color: var(--color-green);
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.social-icon:hover {
    background-color: var(--color-green);
    color: var(--color-white);
    transform: translateY(-3px);
}

/* ==========================================
   RESPONSIVE STYLES - MOBILE FIRST
   ========================================== */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Fix para imagen de fondo en móviles */
    .hero-section {
        background-attachment: scroll;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .cta-title {
        font-size: 1.5rem;
    }

    /* Hero Section Mobile */
    .hero-section {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero-section .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Proceso Section Mobile */
    .step-card {
        padding: 1.5rem 1rem;
    }

    .step-illustration img {
        max-height: 100px !important;
    }

    .step-title {
        font-size: 1rem;
    }

    .step-description {
        font-size: 0.85rem;
    }

    /* Ocultar línea conectora en móvil */
    .steps-connector {
        display: none;
    }

    /* Servicios Section Mobile */
    .servicios-content {
        padding: 1.5rem 1rem;
    }

    .feature-item {
        padding: 1rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* Formulario Section Mobile */
    .formulario-wrapper {
        padding: 1.5rem 1rem !important;
    }

    .formulario-title {
        font-size: 1.25rem;
    }

    /* FAQ Section Mobile */
    .accordion-button {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .accordion-body {
        font-size: 0.9rem;
        padding: 1rem;
    }

    /* Estadísticas Mobile */
    .stats-wrapper {
        padding: 2rem 1rem;
    }

    /* CTA Section Mobile */
    .cta-content {
        padding: 2rem 1rem !important;
    }

    .cta-description {
        font-size: 0.95rem;
    }

    /* Footer Mobile */
    .footer-section {
        text-align: center;
    }

    .footer-logo img {
        max-width: 200px !important;
    }

    .footer-title {
        margin-top: 1.5rem;
    }

    .footer-social {
        justify-content: center;
    }

    .contact-item {
        justify-content: center;
        text-align: center;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section {
        padding: 120px 0 80px;
    }

    .formulario-wrapper {
        padding: 2rem !important;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .step-card {
        padding: 2rem;
    }

    .formulario-wrapper {
        padding: 2.5rem !important;
    }

    .footer-section {
        text-align: left;
    }

    .footer-social {
        justify-content: flex-start;
    }
}

/* Tablets landscape (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Fix para imagen de fondo en tablets */
    .hero-section {
        background-attachment: scroll;
    }

    .step-illustration img {
        max-height: 120px !important;
    }

    .stat-number {
        font-size: 2rem;
    }

    .cta-content {
        padding: 2.5rem !important;
    }

    .feature-item h5 {
        font-size: 1rem;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .cta-image {
        height: 100%;
        min-height: 500px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 3.25rem;
    }
}

/* ==========================================
   UTILIDADES
   ========================================== */
.text-navy {
    color: var(--color-navy);
}

.text-green {
    color: var(--color-green);
}

.bg-navy {
    background-color: var(--color-navy);
}

.bg-green {
    background-color: var(--color-green);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    padding-top: 70px; /* Espacio para navbar fixed */
}

/* Transiciones globales */
a, button {
    transition: all 0.3s ease;
}

/* Mejora de imágenes */
img {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar {
    background-color: var(--color-navy);
    padding: 1rem 0;
    transition: all 0.3s ease;
    z-index: 2147483647 !important;
}

/* Forzar que el formulario Kommo quede debajo del navbar */
.kommo-form-container,
.kommo-form-container * {
    z-index: 1000 !important;
}

.formulario-section {
    position: relative;
    z-index: 1;
}

.navbar-scrolled {
    background-color: var(--color-navy) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    color: var(--color-white) !important;
    font-weight: 500;
    padding: 0.5rem 1.5rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--color-green) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 60%;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Navbar en móvil */
@media (max-width: 991.98px) {
    .navbar {
        background-color: var(--color-navy);
    }

    .navbar-collapse {
        padding: 1rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0 !important;
    }
}
