/* GLOBAL MEDITH - LANDING PAGE STYLES V2.0 */

:root {
    --primary-blue: #003459;
    --secondary-blue: #007EA7;
    --accent-green: #00A8E8;
    --success-green: #00E676;
    --text-dark: #1a1a1a;
    --text-gray: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-radius: 8px;
    --transition-speed: 0.3s;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.top-bar {
    background: var(--primary-blue);
    color: white;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.top-bar-right {
    display: flex;
    gap: 1.5rem;
}

.top-bar a {
    color: white;
    text-decoration: none;
    transition: opacity var(--transition-speed);
}

.top-bar a:hover {
    opacity: 0.8;
}

header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-section {
    display: flex;
    align-items: center;
}

.logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color var(--transition-speed);
}

nav a:hover {
    color: var(--secondary-blue);
}

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

.btn {
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-blue), var(--accent-green));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,122,167,0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

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

.hero {
    background: linear-gradient(135deg, rgba(0,52,89,0.95), rgba(0,126,167,0.95)),
                url('/images/hero-banner.jpg') center/cover;
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
}

.hero-feature {
    text-align: center;
}

.hero-feature .icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-feature strong {
    display: block;
    font-size: 1.5rem;
}

.cotizador-section {
    background: white;
    padding: 4rem 2rem;
}

.cotizador-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
}

.search-box {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

#resultadoCotizador {
    margin-top: 2rem;
    display: none;
}

.beneficios {
    padding: 4rem 2rem;
    background: var(--bg-light);
}

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

.beneficio-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform var(--transition-speed);
}

.beneficio-card:hover {
    transform: translateY(-5px);
}

.beneficio-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.productos-destacados {
    padding: 4rem 2rem;
}

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

.producto-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform var(--transition-speed);
}

.producto-card:hover {
    transform: translateY(-5px);
}

.producto-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: white;
    padding: 1rem;
}

.producto-info {
    padding: 1.5rem;
}

.producto-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
}

.precio-exclusivo {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: bold;
    margin-top: 1rem;
}

.registro-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
}

.registro-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    color: var(--text-dark);
    padding: 3rem;
    border-radius: 12px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

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

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    max-width: 500px;
    text-align: center;
    animation: modalFadeIn 0.3s ease;
}

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

.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37,211,102,0.5);
    cursor: pointer;
    z-index: 9999;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37,211,102,0.7);
}

.whatsapp-float svg {
    width: 30px;
    height: 30px;
    fill: white;
}

footer {
    background: var(--primary-blue);
    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: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

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

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero-features {
        flex-direction: column;
        gap: 1.5rem;
    }
    .top-bar-content {
        flex-direction: column;
        gap: 1rem;
    }
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    .search-box {
        flex-direction: column;
    }
    .logo {
        height: 50px;
    }
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-gray);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   RESPONSIVE DESIGN MEJORADO
   ============================================ */

/* Ocultar top-bar en móvil */
@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    header {
        padding: 1rem 0;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    /* Hero Section */
    .hero {
        padding: 3rem 1rem;
        min-height: auto;
    }
    
    .hero-content {
        padding: 0;
    }
    
    .hero h1 {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        margin: 2rem 0;
    }
    
    .hero-feature {
        padding: 1rem !important;
    }
    
    .hero-feature strong {
        font-size: 1.5rem;
    }
    
    .hero-feature span {
        font-size: 0.9rem;
    }
    
    /* Botones principales del hero */
    .hero .btn {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 1rem !important;
        margin: 0 !important;
    }
    
    /* Sección Cotizador */
    .cotizador-section {
        padding: 2rem 1rem;
    }
    
    .cotizador-container {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .section-subtitle {
        font-size: 0.9rem !important;
    }
    
    .search-box {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-box input {
        width: 100%;
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    .search-box button {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    /* Beneficios */
    .beneficios {
        padding: 2rem 1rem;
    }
    
    .beneficios-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .beneficio-card {
        padding: 1.5rem;
    }
    
    .beneficio-icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    /* Productos */
    .productos-destacados {
        padding: 2rem 1rem;
    }
    
    .productos-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .producto-card img {
        height: 200px;
        object-fit: contain;
    }
    
    .producto-info h3 {
        font-size: 1.1rem;
    }
    
    .precio-exclusivo {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    /* Registro */
    .registro-section {
        padding: 2rem 1rem;
    }
    
    .registro-container {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 1rem;
        padding: 0.75rem;
    }
    
    /* Footer */
    footer {
        padding: 2rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
    }
    
    .footer-section p,
    .footer-section li {
        font-size: 0.9rem;
    }
    
    /* WhatsApp flotante */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Modal */
    .modal-content {
        width: 90%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
    }
    
    .modal-content p {
        font-size: 0.95rem;
    }
}

/* Móviles pequeños - 480px */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.3rem !important;
    }
    
    .hero-feature strong {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.3rem !important;
    }
    
    .beneficio-card h3 {
        font-size: 1rem;
    }
    
    .producto-info h3 {
        font-size: 1rem;
    }
}

/* Tablets - 600px a 768px */
@media (min-width: 601px) and (max-width: 768px) {
    .productos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .beneficios-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .hero-features {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Tablets grandes - 769px a 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 0 2rem;
    }
    
    .productos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .beneficios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop - 1025px+ */
@media (min-width: 1025px) {
    .productos-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .beneficios-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   MENÚ HAMBURGUESA - SOLO MÓVIL
   ============================================ */

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

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

/* Animación del menú hamburguesa cuando está abierto */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

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

/* RESPONSIVE - MÓVIL */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding-top: 4rem;
    }

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

    .main-nav ul {
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 0;
    }

    .main-nav ul li {
        border-bottom: 1px solid #eee;
    }

    .main-nav ul li a {
        display: block;
        padding: 1rem;
        color: var(--text-dark);
        font-size: 1.1rem;
    }

    .cta-buttons {
        display: none;
    }

    /* Overlay oscuro cuando el menú está abierto */
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    body.menu-open {
        overflow: hidden;
    }
}
