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

:root {
    --primary: #2F5496;
    --primary-light: #4A7BC7;
    --primary-dark: #1E3A6E;
    --accent: #E8A317;
    --bg: #F8F9FA;
    --bg-dark: #0F1624;
    --text: #2D3748;
    --text-light: #718096;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --success: #38A169;
    --card-bg: #FFFFFF;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

/* Header */
header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }

.nav-links a {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-links .btn-nav {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
}

.nav-links .btn-nav:hover { background: var(--primary-light); color: var(--white); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
    padding: 5rem 1.5rem 4rem;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
    max-width: 700px;
    margin: 0 auto 1rem;
    letter-spacing: -1px;
}

.hero .subtitle {
    font-size: 1.15rem;
    color: #B0C4DE;
    max-width: 550px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.hero-form {
    display: flex;
    gap: 0.5rem;
    max-width: 480px;
    margin: 0 auto 1.5rem;
}

.hero-form input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    outline: none;
}

.hero-form input::placeholder { color: rgba(255,255,255,0.5); }
.hero-form input:focus { border-color: var(--accent); }

.btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
}

.btn-primary:hover { background: #D4940F; transform: translateY(-1px); }

.hero-stat {
    font-size: 0.95rem;
    color: #8FAAC0;
}

.hero-stat strong { color: var(--accent); font-size: 1.1rem; }

/* Sections */
section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

/* How it works */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step {
    text-align: center;
    padding: 2rem 1.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

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

.step p { color: var(--text-light); font-size: 0.95rem; }

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.card-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-sector { background: #EBF5FF; color: var(--primary); }
.badge-pyme-alta { background: #E6FFED; color: #22543D; }
.badge-pyme-media { background: #FFFBE6; color: #744210; }
.badge-pyme-baja { background: #FFF5F5; color: #822727; }

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.card-meta strong { color: var(--text); }

.card-summary {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Sectors grid */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.sector-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s;
}

.sector-item:hover { border-color: var(--primary); }

.sector-item .name { font-weight: 600; font-size: 0.95rem; }

.sector-item .count {
    background: var(--primary);
    color: var(--white);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Pricing */
.pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.price-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
}

.price-card.featured {
    border-color: var(--primary);
    position: relative;
}

.price-card.featured::before {
    content: 'Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 0.2rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.price-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.price-amount span { font-size: 1rem; font-weight: 400; color: var(--text-light); }

.price-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.price-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.price-features li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

/* Blog */
.blog-list { padding: 2rem 0; }

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
}

.blog-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.blog-card h2 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.blog-card h2 a { color: var(--text); }
.blog-card h2 a:hover { color: var(--primary); }

.blog-card .meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.blog-card p { font-size: 0.95rem; color: var(--text-light); }

/* Blog post */
.blog-post { max-width: 780px; margin: 0 auto; }

.blog-post h1 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.blog-post .meta { color: var(--text-light); margin-bottom: 2rem; font-size: 0.9rem; }

.blog-post .content { line-height: 1.8; }
.blog-post .content h2 { margin: 2rem 0 1rem; color: var(--primary-dark); font-size: 1.4rem; }
.blog-post .content h3 { margin: 1.5rem 0 0.8rem; font-size: 1.15rem; }
.blog-post .content p { margin-bottom: 1rem; }
.blog-post .content ul, .blog-post .content ol { margin: 1rem 0; padding-left: 1.5rem; }
.blog-post .content li { margin-bottom: 0.5rem; }

.breadcrumbs {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }

/* CTA box */
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0;
}

.cta-box h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.cta-box p { color: #B0C4DE; margin-bottom: 1.5rem; }

/* Licitaciones table */
.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filters select, .filters input {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: var(--white);
}

/* Registration form */
.form-page {
    max-width: 500px;
    margin: 2rem auto;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
}

.form-page h2 { margin-bottom: 1.5rem; color: var(--primary-dark); }

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

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

.form-group input, .form-group select {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

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

.btn-full { width: 100%; }

/* Footer */
footer {
    background: var(--bg-dark);
    color: #8FAAC0;
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 0.9rem;
    margin-top: 4rem;
}

footer a { color: #B0C4DE; }

/* Flash messages */
.flash { padding: 1rem; border-radius: 6px; margin-bottom: 1rem; }
.flash-success { background: #E6FFED; color: #22543D; border: 1px solid #C6F6D5; }
.flash-error { background: #FFF5F5; color: #822727; border: 1px solid #FED7D7; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .hero { padding: 3rem 1rem 2.5rem; }
    .hero-form { flex-direction: column; }
    .section-title { font-size: 1.5rem; }
    .nav-links { display: none; }
    .pricing { grid-template-columns: 1fr; }
}
