/* ============================================
   ENREN - Página de Inicio - Estilos
   ============================================ */

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

:root {
    --primary: #667eea;
    --secondary: #764ba2;
    --success: #10b981;
    --text-dark: #1a202c;
    --text-light: #718096;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 1.1rem;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

.btn-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Mobile Navigation Icons */
.nav-mobile-icons {
    display: none;
    align-items: center;
    gap: 15px;
}

.mobile-user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mobile-user-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.mobile-user-icon svg {
    width: 22px;
    height: 22px;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger animation when active */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-item-desktop {
    display: block;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: -15% 0;
    z-index: 0;
    will-change: transform;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content .highlight {
    background: linear-gradient(to right, #ffd700, #ffa500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.hero-image {
    position: relative;
}

.hero-carousel {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.hero-slides {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.hero-dot:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.4);
}

.hero-dot.active {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

/* ============================================
   SECCIONES
   ============================================ */
.section {
    padding: 5rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   BENEFICIOS
   ============================================ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.7rem;
}

.benefit-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Benefit card expandable details */
.benefit-card {
    cursor: pointer;
    position: relative;
}

.benefit-card.active {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25);
    transform: translateY(-10px);
}

.benefit-card.active::after {
    content: '';
    position: absolute;
    bottom: -1.15rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid var(--primary);
}

.benefit-detail {
    grid-column: 1 / -1;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #5a6fd6));
    border-radius: 16px;
    color: white;
    padding: 0 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.benefit-detail.open {
    max-height: 300px;
    opacity: 1;
    padding: 1.5rem 2rem;
}

.benefit-detail-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.benefit-detail-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.benefit-detail-text {
    font-size: 1.05rem;
    line-height: 1.7;
}

.benefit-detail-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* ============================================
   PROCESO
   ============================================ */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    position: relative;
}

.step {
    text-align: center;
    position: relative;
    cursor: pointer;
    padding: 1.5rem;
    border-radius: 16px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.step.active {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25);
    transform: translateY(-5px);
}

.step.active::after {
    content: '';
    position: absolute;
    bottom: -1.15rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid var(--primary);
}

.step-detail {
    grid-column: 1 / -1;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark, #5a6fd6));
    border-radius: 16px;
    color: white;
    padding: 0 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.step-detail.open {
    max-height: 300px;
    opacity: 1;
    padding: 1.5rem 2rem;
}

.step-detail-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-detail-number {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-detail-text {
    font-size: 1.05rem;
    line-height: 1.7;
}

.step-detail-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.step h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.step p {
    color: var(--text-light);
}

/* ============================================
   CONTACTO
   ============================================ */
.contact-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.contact-section-title {
    color: white;
    margin-bottom: 0.5rem;
}

/* Field tooltips */
.field-tooltip-wrap {
    position: relative;
}

.field-tooltip {
    position: absolute;
    left: 105%;
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 10px 14px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform: translateY(-50%) translateX(6px);
}

.field-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

/* Arrow pointing left towards the input */
.field-tooltip::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 7px solid #1e293b;
}

/* On smaller screens, tooltip goes below the field */
@media (max-width: 900px) {
    .field-tooltip {
        left: 0;
        right: 0;
        top: 100%;
        width: auto;
        transform: translateY(6px);
        margin-top: 4px;
    }

    .field-tooltip.visible {
        transform: translateY(0);
    }

    .field-tooltip::before {
        left: 20px;
        top: -7px;
        transform: none;
        border-left: 7px solid transparent;
        border-right: 7px solid transparent;
        border-bottom: 7px solid #1e293b;
        border-top: none;
    }
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

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

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.consent-group {
    margin-bottom: 0.5rem;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
}

.consent-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.consent-label a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 500;
}

.consent-label a:hover {
    color: var(--secondary);
}

/* ============================================
   CONTACT INFO
   ============================================ */
.contact-details {
    margin-top: 2rem;
    font-size: 1.15rem;
}

.contact-detail-item {
    margin-bottom: 1.2rem;
}

.contact-icon {
    font-size: 1.8rem;
}

.contact-text {
    margin-left: 0.5rem;
}

.contact-link {
    color: white;
    text-decoration: underline;
    margin-left: 0.5rem;
}

.contact-link:hover {
    opacity: 0.9;
}

/* ============================================
   FORM SELECT
   ============================================ */
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ============================================
   SECTION BG LIGHT
   ============================================ */
.section-bg-light {
    background: #f7fafc;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    /* Show mobile icons, hide desktop menu items */
    .nav-mobile-icons {
        display: flex;
    }

    .nav-item-desktop {
        display: none;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu li {
        padding: 0.8rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }

    .hero-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-image {
        order: -1;
    }

    .hero-carousel {
        max-width: 100%;
    }

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

    .section-subtitle {
        font-size: 1rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .mobile-user-icon {
        width: 40px;
        height: 40px;
    }

    .mobile-user-icon svg {
        width: 20px;
        height: 20px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
    }

    .nav-mobile-icons {
        gap: 10px;
    }
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top-icon {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .scroll-to-top-icon {
        font-size: 1.3rem;
    }
}
