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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

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

/* BARRA SUPERIOR */
.top-bar {
    background: #1a2332;
    color: #a8b2c1;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1001;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar i {
    font-size: 0.85rem;
    color: #3498db;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    color: #a8b2c1;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: #3498db;
    transform: translateY(-2px);
}

/* MENÚ DE NAVEGACIÓN */
.navbar {
    background: #ffffff;
    color: #333;
    padding: 0;
    position: fixed;
    width: 100%;
    top: 41px; /* Altura de la top-bar */
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid #f0f2f5;
    transition: top 0.3s ease;
}

.navbar .container {
    padding: 0 20px;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 20px;
}

.logo h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
}

.logo .accent {
    color: #3498db;
    position: relative;
}

.logo a {
    color: #2c3e50;
    text-decoration: none;
}

.logo a:hover .accent {
    color: #2980b9;
    transition: color 0.3s;
}

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

.nav-menu a {
    color: #5a6c7d;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-menu a:hover {
    color: #3498db;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-nav {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transition: left 0.3s ease;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-nav:hover::before {
    left: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* SECCIÓN HERO */
.hero {
    background: #f8f9fa;
    padding: 100px 0 60px;
    margin-top: 121px; /* Altura navbar (80px) + top-bar (41px) */
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 60px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 700;
}

.text-gradient {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 500px;
}

/* CTAs del Hero */
.hero-cta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 3rem;
}

.btn-primary-hero {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    display: inline-block;
}

.btn-primary-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary-hero {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-secondary-hero:hover {
    gap: 12px;
    color: #2980b9;
}

.btn-secondary-hero i {
    font-size: 1.4rem;
}

/* Estadísticas del Hero */
.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat strong {
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1;
}

.stat span {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Imagen del Hero */
.hero-image {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    perspective: 1000px;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transform: rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: rotateY(0deg) rotateX(0deg);
}

/* Tarjetas flotantes */
.floating-card {
    position: absolute;
    background: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    color: #3498db;
    font-size: 1.2rem;
}

.card-1 {
    top: 20px;
    left: -60px;
    animation-delay: 0s;
}

.card-2 {
    bottom: 40px;
    right: -40px;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Partners/Logos */
.hero-partners {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
    overflow: hidden;
}

.hero-partners p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.partners-marquee {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.partners-logos {
    display: flex;
    align-items: center;
    gap: 60px;
    animation: marquee 20s linear infinite;
    padding: 0 30px;
    width: max-content;
}

.partners-logos img {
    height: 40px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.partners-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

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

.btn-primary {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary:hover {
    background: #c0392b;
}

/* SECCIÓN PROCESO */
.proceso {
    padding: 100px 0;
    background: #ffffff;
}

.proceso-header {
    text-align: center;
    margin-bottom: 80px;
}

.proceso-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.proceso-timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* Línea horizontal del timeline */
.timeline-line {
    position: absolute;
    top: 30px;
    left: calc(16.66% + 30px);
    right: calc(16.66% + 30px);
    height: 3px;
    background: #e9ecef;
    z-index: 1;
}

.timeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: #3498db;
    transition: width 1s ease-out;
}

.proceso-timeline:hover .timeline-line::after {
    width: 100%;
}

.proceso-fase {
    position: relative;
    text-align: center;
    padding: 20px;
}

/* Número de fase */
.fase-numero {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 3px solid #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #3498db;
    z-index: 3;
    transition: all 0.3s ease;
}

.fase-2 .fase-numero,
.fase-3 .fase-numero {
    border-color: #e9ecef;
    color: #a8b2c1;
}

/* Contenido de cada fase */
.fase-contenido {
    margin-top: 100px;
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
}

.fase-contenido::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 20px solid #f8f9fa;
}

/* Icono de cada fase */
.fase-icono {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.fase-icono i {
    font-size: 2rem;
    color: white;
}

.fase-contenido h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.fase-contenido p {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Lista de características */
.fase-lista {
    list-style: none;
    text-align: left;
    max-width: 250px;
    margin: 0 auto;
}

.fase-lista li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: #7f8c8d;
    font-size: 0.95rem;
}

.fase-lista li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

/* Estados activos y hover */
.proceso-fase:hover .fase-numero {
    background: #3498db;
    color: white;
    transform: translateX(-50%) scale(1.1);
    border-color: #3498db;
}

.proceso-fase:hover .fase-contenido {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* Animar la línea del timeline al hover */
.proceso-fase:hover ~ .proceso-fase .fase-numero {
    transition-delay: 0.1s;
}

.fase-1:hover ~ .timeline-line::after,
.fase-2:hover ~ .timeline-line::after,
.fase-3:hover ~ .timeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #3498db;
    animation: fillLine 0.5s ease-out forwards;
}

@keyframes fillLine {
    from { width: 0; }
    to { width: 100%; }
}

/* CTA de la sección */
.proceso-cta {
    text-align: center;
    margin-top: 80px;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
}

.proceso-cta p {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* SECCIÓN SERVICIOS */
.servicios {
    padding: 80px 0;
    background: #f8f9fa;
}

.servicios h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitulo {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
}

.campos-obligatorios {
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    margin-top: -2rem;
    margin-bottom: 2rem;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

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

.servicio-card:hover {
    transform: translateY(-10px);
}

.servicio-card i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.servicio-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

/* SECCIÓN SOBRE NOSOTROS */
.sobre-nosotros {
    padding: 80px 0;
}

.sobre-nosotros h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.caracteristicas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.caracteristica {
    text-align: center;
}

.caracteristica i {
    font-size: 2.5rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

/* FORMULARIO DE CONTACTO */
.contacto {
    padding: 80px 0;
    background: #f8f9fa;
}

.contacto h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.formulario {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Filas de formulario */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-half {
    flex: 1;
    margin-bottom: 0;
}

.form-prefix {
    flex: 0 0 180px; /* Aumentado para evitar scroll horizontal */
    margin-bottom: 0;
}

.form-phone {
    flex: 1;
    margin-bottom: 0;
    position: relative;
}

.phone-hint {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #999;
    pointer-events: none;
}

.form-phone input:focus + .phone-hint,
.form-phone input:not(:placeholder-shown) + .phone-hint {
    display: none;
}

/* Estilos para el selector de prefijo personalizado */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-width: 170px;
    font-size: 0.9rem;
}

.custom-select:hover {
    border-color: #3498db;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.custom-select.open {
    border-color: #3498db;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.selected-flag {
    display: flex;
    align-items: center;
    gap: 8px;
}

.selected-flag img,
.custom-option img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    border: 1px solid #f0f0f0;
}

.arrow {
    font-size: 0.8rem;
    color: #666;
    transition: transform 0.3s;
}

.custom-select.open .arrow {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #3498db;
    border-top: none;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    max-height: 200px;
    overflow-y: auto; /* Permite scroll vertical si hay muchas opciones */
    overflow-x: hidden; /* Evita scroll horizontal */
    z-index: 100;
    display: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.custom-options.show {
    display: block;
}

.custom-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    font-size: 0.9rem;
}

.custom-option:hover {
    background-color: #f8f9fa;
    color: #3498db;
    padding-left: 22px;
}

.custom-option.selected {
    background-color: #e3f2fd;
    color: #3498db;
    font-weight: 600;
    position: relative;
    padding-right: 45px; /* Espacio adicional aumentado para el check */
}

.custom-option.selected::before {
    content: '✓';
    position: absolute;
    right: 15px;
    color: #3498db;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Estilos anteriores del select (eliminar o comentar) */
#prefijo {
    display: none;
}

/* PIE DE PÁGINA */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.legal-links {
    margin: 1rem 0;
    font-size: 0.9rem;
}

.legal-links a {
    color: #bdc3c7;
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.3s;
}

.legal-links a:hover {
    color: white;
}

.redes-sociales {
    margin-top: 1rem;
}

.redes-sociales a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.redes-sociales a:hover {
    color: #3498db;
}

/* DISEÑO RESPONSIVE */
@media (max-width: 768px) {
    /* Ocultar barra superior en móvil */
    .top-bar {
        display: none;
    }
    
    /* Ajustar navbar para móvil */
    .navbar {
        top: 0;
    }
    
    .hero {
        margin-top: 70px;
    }
    .nav-wrapper {
        position: relative;
        height: 70px;
        padding: 0 10px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu,
    .nav-actions {
        display: none;
    }
    
    /* Hero responsive */
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2rem;
    }
    
    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 30px;
    }
    
    .hero-image {
        order: -1;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .floating-card {
        display: none;
    }
    
    .partners-logos {
        gap: 20px;
        animation-duration: 15s; /* Más rápido en móvil */
    }
    
    .partners-logos img {
        height: 30px;
    }
    
    /* Proceso responsive */
    .proceso-timeline {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .timeline-line {
        display: none;
    }
    
    .fase-contenido {
        margin-top: 80px;
    }
    
    .proceso-cta {
        padding: 30px 20px;
    }
    
    .proceso-cta p {
        font-size: 1.1rem;
    }
    
    .servicios-grid {
        grid-template-columns: 1fr;
    }
    
    /* Formulario responsive */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-half,
    .form-prefix,
    .form-phone {
        margin-bottom: 1.5rem;
    }
    
    .form-prefix {
        flex: 1;
    }
    
    .custom-select-wrapper {
        width: 100%;
    }
    
    .phone-hint {
        font-size: 0.75rem;
        right: 10px;
    }
}

/* Estilos adicionales para el menú móvil activo */
.nav-menu.active {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-menu.active li {
    text-align: center;
    padding: 0.5rem 0;
}

/* CTA FLOTANTE */
.cta-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
}

.cta-flotante.visible {
    opacity: 1;
    transform: translateY(0);
}

.cta-flotante-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

.cta-flotante-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.5);
    animation: none;
}

.cta-flotante-btn i {
    font-size: 1.3rem;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Ocultar en móvil pequeño */
@media (max-width: 480px) {
    .cta-flotante {
        bottom: 20px;
        right: 20px;
    }
    
    .cta-flotante-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .cta-flotante-btn span {
        display: none;
    }
    
    .cta-flotante-btn i {
        font-size: 1.5rem;
    }
}