/**
 * MAIN.CSS - Estilos para Landing Page
 * 
 * PROPÓSITO: Estilos principales para index.html
 * DISEÑO: macOS-style con glassmorphism y neumorphism
 * COLORES: #007AFF (azul Apple), #5856D6 (púrpura Apple), neutros
 * 
 * SE CONECTA CON:
 * - index.html (página principal)
 * - assets/js/main.js (interacciones)
 */

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, Arial, sans-serif;
    line-height: 1.6;
    color: #1d1d1f;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* ===== HEADER CON GLASSMORPHISM ===== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    padding: 0 20px;
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #007AFF;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-links a:hover {
    background: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

/* ===== BOTÓN HAMBURGUESA MÓVIL ===== */
.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: #1d1d1f;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
    margin-top: 80px;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.3rem;
    color: #6e6e73;
    margin-bottom: 40px;
    line-height: 1.5;
}

/* ===== BOTÓN CTA PRINCIPAL ===== */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    padding: 16px 32px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 122, 255, 0.3);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 122, 255, 0.4);
}

/* ===== CONTENEDOR GENERAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1d1d1f;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #6e6e73;
    margin-bottom: 60px;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-content {
    padding: 25px;
}

.portfolio-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1d1d1f;
}

.portfolio-content p {
    color: #6e6e73;
    font-size: 1rem;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.05) 0%, rgba(88, 86, 214, 0.05) 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.service-icon {
    font-size: 3rem;
    color: #007AFF;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d1d1f;
}

.service-card p {
    color: #6e6e73;
    line-height: 1.6;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    padding: 80px 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

.testimonial-text {
    font-style: italic;
    color: #6e6e73;
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.author-info h4 {
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.author-info p {
    color: #6e6e73;
    font-size: 0.9rem;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 80px 20px;
    background: linear-gradient(135deg, #1d1d1f 0%, #2d2d2f 100%);
    color: white;
}

.contact .section-title,
.contact .section-subtitle {
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.contact-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.5rem;
    color: #007AFF;
    width: 30px;
}

.contact-item div h4 {
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-item div p {
    color: #b0b0b0;
}

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.6);
}

/* ===== FOOTER ===== */
.footer {
    background: #1d1d1f;
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.footer p {
    color: #b0b0b0;
}

/* ===== MODAL STYLES ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    margin: 10% auto;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.close {
    color: #6e6e73;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.close:hover {
    color: #007AFF;
}

/* ===== FORMULARIOS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d1d1f;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* ===== BOTONES SECUNDARIOS ===== */
.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
    border: 2px solid rgba(0, 0, 0, 0.1);
    padding: 16px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #007AFF;
    color: #007AFF;
    transform: translateY(-2px);
}

/* ===== ANIMACIONES DE MENSAJE ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu {
        display: flex;
    }

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

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

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

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 15px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .services-grid,
    .portfolio-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===== MODAL FIXES ACTUALIZADOS ===== */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0,0,0,0.5) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 2000 !important;
    overflow-y: auto !important; /* FORZAR scroll */
    padding: 10px 0 !important;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    margin: 20px auto !important;
    padding: 30px !important;
    border-radius: 20px !important;
    width: 90% !important;
    max-width: 500px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    position: relative !important;
    max-height: 85vh !important; /* ALTURA MÁXIMA */
    overflow-y: auto !important; /* SCROLL INTERNO */
}

/* Alertas más pequeñas */
.alert {
    max-height: 300px !important;
    overflow-y: auto !important;
    word-wrap: break-word !important;
}

/* Responsive mejorado */
@media (max-width: 768px) {
    .modal {
        padding: 5px 0 !important;
    }
    
    .modal-content {
        width: 95% !important;
        padding: 20px !important;
        margin: 10px auto !important;
        max-height: 90vh !important;
    }
    
    .alert {
        max-height: 200px !important;
    }
}
