/* === VARIABLES Y RESET === */
:root {
    --primary: #0284c7;
    --primary-light: #38bdf8;
    --primary-dark: #0369a1;
    --accent: #f59e0b;
    --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #e0f2fe 100%);
    --text-main: #1e293b;
    --text-muted: #475569;
    --white: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.85);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: system-ui, sans-serif; }
body { background: var(--bg-gradient); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* === NAVEGACIÓN === */
header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }

/* Botón Menú Móvil (Oculto en Escritorio) */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; transition: all 0.3s ease-in-out;}
.nav-links a { font-weight: 500; color: var(--text-muted); transition: color 0.3s; }
.nav-links a:hover { color: var(--primary); }
.mobile-login-btn { display: block; }

.btn-primary {
    background: var(--primary); color: var(--white) !important;
    padding: 0.6rem 1.5rem; border-radius: 8px; font-weight: 600;
    transition: all 0.3s; display: inline-block; border: none; cursor: pointer; text-align: center;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* === HERO === */
.hero { padding: 9rem 2rem 5rem; text-align: center; max-width: 900px; margin: 0 auto; }
.hero h1 { font-size: 4.5rem; font-weight: 900; line-height: 1.1; margin-bottom: 1.5rem; color: var(--text-main); }
.hero h1 span { color: #1594b5; } 
.hero p { font-size: 1.35rem; color: var(--text-muted); margin-bottom: 3rem; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* === CONFIGURADOR DE ANUNCIOS === */
.ads-banner {
    background: #1e293b; color: white; border-radius: 16px;
    padding: 2rem; margin: 0 auto 5rem; max-width: 800px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    text-align: left;
}
.ads-banner h3 { color: #38bdf8; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem;}
.ads-banner p { color: #cbd5e1; font-size: 0.95rem; margin-bottom: 1.5rem; }
.ads-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ad-tag {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    padding: 0.4rem 1rem; border-radius: 99px; font-size: 0.85rem;
    cursor: pointer; transition: all 0.2s;
}
.ad-tag:hover, .ad-tag.selected { background: var(--primary); border-color: var(--primary); }

/* === TOGGLE Y HERRAMIENTAS === */
.tools-section { padding: 2rem 2rem 5rem; max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 1rem; }

.toggle-container { display: flex; justify-content: center; margin-bottom: 3rem; width: 100%;}
.toggle-bg { background: #cbd5e1; padding: 0.25rem; border-radius: 99px; display: inline-flex; position: relative; min-width: 340px; max-width: 100%;}
.toggle-btn {
    flex: 1; text-align: center; padding: 0.75rem 2rem; border: none; background: transparent;
    font-weight: 600; color: var(--text-muted); cursor: pointer;
    border-radius: 99px; position: relative; z-index: 2; transition: color 0.3s;
}
.toggle-btn.active { color: var(--primary-dark); }
.toggle-slider {
    position: absolute; top: 0.25rem; left: 0.25rem;
    width: calc(50% - 0.25rem); height: calc(100% - 0.5rem);
    background: var(--white); border-radius: 99px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: transform 0.3s ease; z-index: 1;
}

.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.hidden { display: none !important; }

.tool-card {
    background: var(--card-bg); backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8); border-radius: 16px;
    padding: 2rem; transition: all 0.3s; position: relative; overflow: hidden;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); border-color: var(--primary-light); }

.badge-soon {
    position: absolute; top: 1rem; right: -2rem;
    background: var(--accent); color: white; font-size: 0.75rem; font-weight: bold;
    padding: 0.25rem 2.5rem; transform: rotate(45deg); text-transform: uppercase;
}
.card-disabled { opacity: 0.85; border: 1px dashed #cbd5e1; }
.card-disabled:hover { transform: none; border-color: var(--accent); box-shadow: none;}

.card-category { font-size: 0.85rem; font-weight: 700; color: var(--primary); text-transform: uppercase; margin-bottom: 0.5rem; }
.tool-card h3 { font-size: 1.25rem; margin-bottom: 1rem; color: #1e293b; }
.tool-card ul { list-style: none; }
.tool-card ul li { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; color: var(--text-muted); font-size: 0.9rem; }
.tool-card ul li::before { content: '→'; position: absolute; left: 0; color: var(--primary-light); font-weight: bold; }

/* === PRECIOS === */
.pricing-section { padding: 5rem 2rem; background: var(--white); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; max-width: 1200px; margin: 3rem auto 0; }
.pricing-card {
    background: #f8fafc; border-radius: 16px; padding: 3rem 2rem;
    text-align: center; border: 1px solid #e2e8f0; display: flex; flex-direction: column; position: relative;
}
.pricing-card.popular { border: 2px solid var(--primary); background: var(--white); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); transform: scale(1.02); }
.badge-popular {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: white; padding: 0.25rem 1rem; border-radius: 99px; font-size: 0.85rem; font-weight: bold;
}
.price { font-size: 2.5rem; font-weight: 800; color: var(--text-main); margin: 1rem 0 2rem; }
.price span { font-size: 1rem; color: var(--text-muted); font-weight: normal; }
.pricing-features { list-style: none; text-align: left; margin-bottom: 2rem; flex-grow: 1; }
.pricing-features li { margin-bottom: 0.75rem; color: var(--text-muted); font-size: 0.95rem;}
.highlight-feature { color: #059669 !important; font-weight: 600; background: #d1fae5; padding: 0.2rem 0.5rem; border-radius: 4px; display: inline-block;}

/* === ACADEMIA IA === */
.ai-academy-section { padding: 5rem 2rem; background: var(--bg-gradient); border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0;}
.ai-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 800px; margin: 0 auto; }
.ai-card {
    background: var(--white); border-radius: 16px; padding: 2.5rem 2rem;
    border: 1px solid #e2e8f0; position: relative; transition: all 0.3s;
    display: flex; flex-direction: column;
}
.ai-card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border-color: var(--primary-light); }
.ai-category { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; margin-bottom: 0.5rem; padding: 0.2rem 0.8rem; border-radius: 99px; display: inline-block; align-self: flex-start;}
.ai-category.b2c { background: #f3e8ff; color: #7e22ce; } 
.ai-category.b2b { background: #fef3c7; color: #b45309; } 
.ai-card h3 { font-size: 1.25rem; color: #1e293b; margin-bottom: 1rem; margin-top: 1rem;}
.ai-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.5; flex-grow: 1;}
.ai-price { font-weight: 800; font-size: 1.5rem; color: var(--text-main); margin-bottom: 1.5rem; display: block;}

/* === AGENCIA DE DESARROLLO === */
.agency-section { padding: 5rem 2rem; background: var(--white); }
.agency-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.agency-card {
    background: var(--card-bg); backdrop-filter: blur(12px); border-radius: 16px;
    padding: 2.5rem 2rem; border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex; flex-direction: column; position: relative; transition: all 0.3s;
}
.agency-card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); border-color: var(--primary-light); }
.agency-card.popular { border: 2px solid var(--primary); background: var(--white); }

.agency-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.5; }
.agency-features { list-style: none; flex-grow: 1; margin-bottom: 2rem; }
.agency-features li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; color: var(--text-muted); font-size: 0.9rem; }
.agency-features li::before { content: '✓'; position: absolute; left: 0; color: #059669; font-weight: bold; }

.agency-price { background: #f8fafc; padding: 1.5rem; border-radius: 12px; text-align: center; margin-bottom: 1.5rem; border: 1px dashed #cbd5e1; }
.agency-price span { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.agency-price strong { font-size: 1.8rem; color: var(--text-main); display: block; margin: 0.5rem 0; }
.discount-badge { background: #d1fae5; color: #059669; font-size: 0.85rem; font-weight: 700; padding: 0.25rem 0.75rem; border-radius: 99px; display: inline-block; margin-top: 0.5rem; }

/* === PREGUNTAS FRECUENTES === */
.faq-section { padding: 5rem 2rem 6rem; max-width: 800px; margin: 0 auto; }
.faq-section h2 { text-align: center; font-size: 2.5rem; margin-bottom: 2.5rem; color: var(--text-main); }

.faq-item {
    background: var(--white);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 1rem;
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.faq-item:hover { border-color: var(--primary-light); }

.faq-question { font-weight: 700; color: var(--text-main); font-size: 1.1rem; display: flex; align-items: center; user-select: none; }
.faq-icon { font-size: 0.75rem; margin-right: 0.8rem; transition: transform 0.3s ease; color: var(--text-main); }
.faq-item.active .faq-icon { transform: rotate(180deg); }

.faq-answer {
    color: var(--text-muted); font-size: 1rem; margin-top: 0; max-height: 0; overflow: hidden;
    transition: all 0.3s ease; opacity: 0; padding-left: 1.55rem;
}
.faq-item.active .faq-answer { margin-top: 1rem; max-height: 200px; opacity: 1; }

footer { background: #0f172a; color: #94a3b8; padding: 3rem 2rem; text-align: center; }

/* =========================================
   ADAPTACIÓN RESPONSIVE (MÓVIL / TABLET)
   ========================================= */

@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .tools-grid, .pricing-grid, .agency-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
}

@media (max-width: 768px) {
    /* Navegación y Menú Hamburguesa */
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--white);
        padding: 1.5rem 0;
        margin-top: 1rem;
        border-radius: 12px;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        position: absolute;
        top: 100%;
        left: 0;
    }
    .nav-links.active { display: flex; }
    nav { padding: 1rem; position: relative; }
    
    .mobile-login-btn { width: 100%; text-align: center; padding: 0 1rem; margin-top: 1rem;}
    .mobile-login-btn button { width: 100%; }

    /* Textos y Espaciados Generales */
    .hero { padding: 7rem 1rem 3rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .section-header h2 { font-size: 2rem; }

    /* Tarjetas y Contenedores */
    .ads-banner { padding: 1.5rem; }
    .tools-section, .pricing-section, .ai-academy-section, .agency-section, .faq-section { padding: 3rem 1rem; }
    .pricing-card.popular { transform: scale(1); margin-top: 1rem; }
    
    /* Toggles para Móvil */
    .toggle-bg { min-width: 100%; display: flex; }
    .toggle-btn { padding: 0.6rem 1rem; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .price { font-size: 2rem; }
    .btn-primary { width: 100%; }
}