/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2d3748;
    --color-secondary: #4a5568;
    --color-accent: #e53e3e;
    --color-success: #38a169;
    --color-warning: #dd6b20;
    --color-bg: #ffffff;
    --color-bg-alt: #f7fafc;
    --color-border: #e2e8f0;
    --color-text: #2d3748;
    --color-text-light: #718096;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--color-text);
    background: var(--color-bg-alt);
    line-height: 1.6;
}

/* Top Bar con ticker */
.top-bar {
    background: #1a1f3a;
    color: white;
    padding: 10px 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.top-bar-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.market-ticker {
    display: flex;
    gap: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
    overflow-x: auto;
    white-space: nowrap;
}

.market-ticker::-webkit-scrollbar {
    display: none;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticker-item .positive {
    color: #68d391;
}

.ticker-item .negative {
    color: #fc8181;
}

/* Navegación principal única */
.main-nav {
    background: #0a0e27;
    border-bottom: 2px solid #1a1f3a;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mark-line {
    position: absolute;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    border-radius: 2px;
    transition: all 0.3s;
}

.mark-line-1 {
    width: 24px;
    height: 3px;
    top: 12px;
    left: 9px;
    transform: rotate(45deg);
}

.mark-line-2 {
    width: 24px;
    height: 3px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mark-line-3 {
    width: 24px;
    height: 3px;
    bottom: 12px;
    left: 9px;
    transform: rotate(-45deg);
}

.brand:hover .mark-line-1 {
    transform: rotate(45deg) translateX(3px);
}

.brand:hover .mark-line-2 {
    transform: translate(-50%, -50%) scaleX(1.2);
}

.brand:hover .mark-line-3 {
    transform: rotate(-45deg) translateX(3px);
}

.brand-text {
    line-height: 1.2;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: 0.3s;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    position: relative;
    padding: 0.6rem 1rem;
    border-radius: 6px;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #e53e3e, transparent);
    transition: transform 0.3s;
}

.nav-links a:hover::before,
.nav-links a.active::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(229, 62, 62, 0.1);
}

.nav-links a.active {
    color: #ffffff;
    background: rgba(229, 62, 62, 0.15);
}

/* Hero Banner con animaciones */
.hero-banner {
    background: #0f1629;
    color: white;
    padding: 120px 20px 100px;
    position: relative;
    overflow: hidden;
    min-height: 650px;
    display: flex;
    align-items: center;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.hero-grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(229, 62, 62, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(229, 62, 62, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    opacity: 0.3;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    position: relative;
    z-index: 2;
}

.hero-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.hero-date {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
    position: relative;
    padding-left: 1.5rem;
}

.hero-date::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #e53e3e;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
    50% { opacity: 0.5; transform: translateY(-50%) scale(1.3); }
}

.hero-tag {
    display: inline-block;
    background: rgba(229, 62, 62, 0.2);
    border: 1px solid rgba(229, 62, 62, 0.4);
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fc8181;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -2px;
}

.hero-title-line {
    display: block;
    animation: slideInLeft 0.8s ease-out;
}

.hero-title-line:nth-child(2) {
    animation-delay: 0.15s;
}

.hero-title-line:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-title-accent {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 50%, #e53e3e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-text {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 750px;
    line-height: 1.8;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.7s both;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.hero-stat:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(229, 62, 62, 0.4);
    transform: translateY(-5px);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-desc {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenedor general */
.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.container-wide {
    padding: 80px 20px;
}

/* Content Intro Section */
.content-intro-section {
    background: white;
    padding: 80px 20px;
}

.content-intro {
    max-width: 950px;
    margin: 0 auto;
}

.intro-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 2.5rem;
    text-align: center;
    line-height: 1.2;
}

.intro-paragraphs {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--color-text);
}

.intro-lead {
    font-size: 1.2rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.intro-paragraphs p {
    margin-bottom: 1.3rem;
    color: var(--color-text);
}

.container-medium {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.header-divider {
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    margin: 0 auto;
}

/* Highlight Section */
.highlight-section {
    background: white;
}

.highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.featured-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.featured-card.large {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.card-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.featured-card.large .card-image {
    height: auto;
}

.card-content {
    padding: 2rem;
}

.card-category {
    display: inline-block;
    background: var(--color-bg-alt);
    color: var(--color-accent);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
    line-height: 1.4;
}

.card-content p {
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* Timeline Section */
.timeline-section {
    background: var(--color-bg-alt);
}

.timeline-container {
    max-width: 900px;
    margin: 0 auto;
}

.timeline-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    width: 16px;
    height: 16px;
    background: var(--color-accent);
    border-radius: 50%;
    margin-top: 4px;
    position: relative;
}

.timeline-marker::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 7px;
    width: 2px;
    height: 100px;
    background: var(--color-border);
}

.timeline-item:last-child .timeline-marker::after {
    display: none;
}

.timeline-content {
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.timeline-content p {
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--color-warning);
}

/* Tools Section */
.tools-section {
    background: white;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--color-bg-alt);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--color-border);
}

.tool-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--color-accent);
    stroke-width: 2;
}

.tool-icon svg {
    width: 100%;
    height: 100%;
}

.tool-card h3 {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.tool-card p {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.tool-interactive label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-interactive label span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.tool-interactive input {
    padding: 0.75rem;
    border: 2px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
}

.tool-interactive input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.tool-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 0.5rem;
}

.tool-btn:hover {
    background: var(--color-warning);
}

.tool-btn-secondary {
    width: 100%;
    padding: 0.75rem;
    background: white;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tool-btn-secondary:hover {
    background: var(--color-accent);
    color: white;
}

.tool-result {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    text-align: center;
}

.tool-result strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}

#returnValue {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-success);
}

/* Tabla comparativa */
.comparison-table {
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
    background: white;
    font-weight: 600;
    color: var(--color-primary);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

/* Concepto del día */
.concept-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-accent);
}

.concept-card h4 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.concept-card p {
    color: var(--color-text-light);
    line-height: 1.7;
}

/* Sectores */
.sectors-section {
    background: var(--color-bg-alt);
}

.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.sector-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sector-card h3 {
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sector-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-bg-alt);
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.75rem;
    color: var(--color-accent);
    text-transform: uppercase;
}

.sector-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.sector-stat {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
    font-weight: 600;
}

.sector-stat .positive {
    color: var(--color-success);
}

.sector-stat .negative {
    color: var(--color-accent);
}

/* Newsletter */
.newsletter-section {
    background: white;
}

.newsletter-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
}

.newsletter-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-card p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #1e3a8a;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: scale(1.05);
}

/* Footer */
.site-footer {
    background: var(--color-primary);
    color: white;
    padding: 3rem 20px 1rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    margin-bottom: 1rem;
    color: #f7fafc;
}

.footer-col p {
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 0.9rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.disclaimer-text {
    font-size: 0.85rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.9rem;
}

/* Páginas internas */
.page-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-content-area {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

.content-box {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.content-box h2 {
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.7rem;
}

.content-box h3 {
    color: var(--color-secondary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-box p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-box ul,
.content-box ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-box li {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.info-banner {
    background: #fff5f5;
    border-left: 4px solid var(--color-accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 6px;
}

.info-banner p {
    color: var(--color-text);
    margin: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-box {
    background: var(--color-bg-alt);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-box h3 {
    margin: 0 0 0.5rem 0;
    color: var(--color-primary);
}

.contact-box p {
    margin: 0;
    color: var(--color-text);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        display: none;
        gap: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--color-border);
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .highlight-grid {
        grid-template-columns: 1fr;
    }

    .featured-card.large {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .sectors-grid {
        grid-template-columns: 1fr;
    }

    .market-ticker {
        font-size: 0.75rem;
        gap: 1rem;
    }
}

