/* TOKENS CSS Y DESIGN SYSTEM SEGÚN DOC-RIDE-DIR-004-2026 */
:root {
    /* MODO OSCURO (DEFAULT) */
    --bg-base: #0b0f19;
    --bg-surface: #111827;
    --bg-surface-alt: #162032;
    --bg-glass: rgba(17, 24, 39, 0.75);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(14, 165, 233, 0.3);
    
    /* PALETA 60-30-10 */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #0ea5e9; /* Sky 500 */
    --accent-secondary: #0284c7;
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #6366f1 100%);
    --accent-glow: rgba(14, 165, 233, 0.15);
    
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --card-border: 1px solid rgba(255, 255, 255, 0.06);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Montserrat', sans-serif;
}

[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --border-glass: rgba(0, 0, 0, 0.08);
    --border-highlight: rgba(14, 165, 233, 0.4);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-primary: #0284c7;
    --accent-secondary: #0369a1;
    --accent-gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 50%, #4f46e5 100%);
    --accent-glow: rgba(14, 165, 233, 0.1);
    
    --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --card-border: 1px solid rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* HEADER RECTOR */
.rector-header {
    position: relative;
    z-index: 900;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 0.85rem 1.5rem;
}

.header-container {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-rector {
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent-primary);
    border: 1px solid var(--border-highlight);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.brand-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.selector-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0 0.5rem;
}

.selector-icon {
    font-size: 0.9rem;
    margin-right: 0.25rem;
}

#langSelector {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 0.4rem 0.25rem;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

#langSelector option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.btn-theme {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
}

.btn-theme:hover {
    border-color: var(--accent-primary);
}

/* HERO SECTION */
.hero-section {
    position: relative;
    padding: 4.5rem 1.5rem 3.5rem;
    background: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 60%);
    text-align: center;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(14, 165, 233, 0.12);
    color: var(--accent-primary);
    border: 1px solid var(--border-highlight);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 720px;
    margin: 0 auto 2.5rem;
}

/* SERVER STATUS CARD */
.server-status-card {
    background: var(--bg-glass);
    border: var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--card-shadow);
    max-width: 820px;
    margin: 0 auto;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-info {
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.status-val {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-divider {
    width: 1px;
    height: 30px;
    background: var(--border-glass);
}

/* SECTIONS */
.section-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem;
}

.alt-bg {
    background: var(--bg-surface-alt);
    max-width: 100%;
}

.alt-bg .section-container {
    padding: 4.5rem 1.5rem;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3rem;
}

.section-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0.5rem 0 0.75rem;
    letter-spacing: -0.5px;
}

.section-sub {
    color: var(--text-secondary);
    font-size: 1rem;
}

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

.glass-card {
    background: var(--bg-surface);
    border: var(--card-border);
    border-radius: 16px;
    padding: 2.25rem 1.75rem;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.highlight-card {
    border-color: var(--border-highlight);
    background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(14, 165, 233, 0.05) 100%);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.glass-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.glass-card p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-features {
    list-style: none;
    border-top: 1px solid var(--border-glass);
    padding-top: 1rem;
}

.card-features li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-features li span {
    color: #10b981;
    font-weight: bold;
}

/* BIDDING CALCULATOR */
.bidding-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.bid-calculator {
    background: var(--bg-surface);
    border: var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.calc-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.calc-badge {
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent-primary);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.calc-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#distRange {
    width: 100%;
    margin-bottom: 0.5rem;
    accent-color: var(--accent-primary);
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.active-val {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.calc-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.res-box {
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.85rem 0.5rem;
    text-align: center;
}

.res-box.primary {
    border-color: var(--accent-primary);
    background: rgba(14, 165, 233, 0.08);
}

.res-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.res-val {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.res-box small {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.commission-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comm-text strong {
    font-size: 0.85rem;
    color: #10b981;
}

.comm-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.comm-val {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: #10b981;
}

.bidding-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    gap: 1rem;
}

.info-num {
    width: 38px;
    height: 38px;
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    color: var(--accent-primary);
    font-weight: 800;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.info-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* GEO GRID */
.geo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.geo-feature {
    background: var(--bg-surface);
    border: var(--card-border);
    border-radius: 14px;
    padding: 1.75rem 1.5rem;
}

.geo-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.geo-feature h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.geo-feature p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* DOCS BADGES */
.doc-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.doc-badge-pill {
    background: var(--bg-surface);
    border: var(--card-border);
    padding: 0.65rem 1.25rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--card-shadow);
}

/* FOOTER */
.rector-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-glass);
    padding: 3.5rem 1.5rem 2.5rem;
}

.footer-container {
    max-width: 1240px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    max-width: 400px;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-col h5 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.footer-col ul li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-col ul li a, .geo-feature a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-col ul li a:hover, .geo-feature a:hover {
    text-decoration: underline;
}

/* LAUNCHPAD DE PORTALES UI */
.launchpad-section {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
}

.launchpad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.35rem;
}

.launchpad-card {
    background: var(--bg-surface);
    border: var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.launchpad-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 18px 35px -12px var(--accent-glow);
}

.launchpad-card.highlight-lp {
    border-color: var(--border-highlight);
    background: linear-gradient(180deg, var(--bg-surface) 0%, var(--accent-glow) 100%);
}

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

.lp-icon {
    font-size: 2rem;
}

.launchpad-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.launchpad-card p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    flex-grow: 1;
    margin: 0;
}

.card-cta-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

/* RESPONSIVE */
@media (max-width: 868px) {
    .nav-links { display: none; }
    .hero-title { font-size: 2.2rem; }
    .server-status-card { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .status-divider { display: none; }
    .bidding-showcase { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; gap: 2rem; }
}

