/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.logo {
    border-radius: 8px;
}

.chile-flag {
    color: #d52b1e;
    font-size: 1.5rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

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

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #2563eb;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Content */
.main-content {
    padding: 4rem 0;
}

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

.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #2563eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-section h3 {
    font-size: 1.5rem;
    color: #374151;
    margin: 2rem 0 1rem;
}

.content-section h4 {
    font-size: 1.25rem;
    color: #4b5563;
    margin: 1.5rem 0 1rem;
}

.content-section p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.lead {
    font-size: 1.125rem;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 2rem;
}

/* Highlight Boxes */
.highlight-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #2563eb;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.highlight-box h4 {
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlight-box ul,
.highlight-box ol {
    margin-left: 1.5rem;
}

.highlight-box li {
    margin-bottom: 0.5rem;
}

/* Two Column Lists */
.two-column-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.column h4 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-green {
    color: #059669;
}

.text-red {
    color: #dc2626;
}

/* Tech Requirements */
.tech-requirements {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.tech-item {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.tech-item h4 {
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-item ul {
    margin-left: 1.5rem;
}

.tech-item li {
    margin-bottom: 0.5rem;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.benefit-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.benefit-item i {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.benefit-item h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Timeline */
.timeline {
    position: relative;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 80px;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline-content h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: #6b7280;
    margin-bottom: 0;
}

/* Challenges Grid */
.challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.challenge-item i {
    color: #dc2626;
    font-size: 1.25rem;
}

.challenge-item h4 {
    color: #991b1b;
    margin: 0;
    font-size: 0.9rem;
}

/* Employment Areas */
.employment-areas {
    background: #f0f9ff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #bae6fd;
    margin: 2rem 0;
}

.employment-areas h4 {
    color: #0c4a6e;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.employment-areas ul {
    margin-left: 1.5rem;
}

.employment-areas li {
    margin-bottom: 0.5rem;
    color: #0f172a;
}

/* Fiscal Projections */
.fiscal-projections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.projection-item {
    text-align: center;
    padding: 1.5rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
}

.projection-item i {
    font-size: 2rem;
    color: #059669;
    margin-bottom: 1rem;
}

.projection-item h4 {
    color: #064e3b;
    margin-bottom: 0.5rem;
}

.projection-item p {
    color: #065f46;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.note {
    font-style: italic;
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* Important Note */
.important-note {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.important-note p {
    color: #92400e;
    margin-bottom: 0;
    font-weight: 500;
}

/* Author Section */
.author-section {
    background: #f8fafc;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
}

.author-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
}

.author-image {
    border-radius: 50%;
    flex-shrink: 0;
}

.author-info h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.author-info h4 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.author-info p {
    color: #4b5563;
    margin-bottom: 1rem;
    text-align: justify;
}

/* Footer */
.footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #f9fafb;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #2563eb;
}

.footer-logo {
    margin-bottom: 1rem;
    border-radius: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin-bottom: 0.5rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .content-section h2 {
        font-size: 1.75rem;
    }
    
    .two-column-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .challenges-grid {
        grid-template-columns: 1fr;
    }
    
    .fiscal-projections {
        grid-template-columns: 1fr;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
    
    .timeline-item {
        padding-left: 70px;
    }
    
    .author-card {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        align-self: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .content-section {
        margin-bottom: 3rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .content-section h3 {
        font-size: 1.25rem;
    }
    
    .highlight-box,
    .important-note {
        padding: 1rem;
    }
    
    .tech-item,
    .benefit-item {
        padding: 1rem;
    }
    
    .author-section {
        padding: 2rem 0;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav,
    .back-to-top,
    .footer {
        display: none;
    }
    
    .hero {
        background: none;
        color: #333;
        padding: 2rem 0;
    }
    
    .main-content {
        padding: 0;
    }
    
    .content-section {
        page-break-inside: avoid;
    }
    
    .highlight-box,
    .important-note {
        border: 1px solid #ccc;
        background: #f9f9f9;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hero {
        background: #000;
        color: #fff;
    }
    
    .highlight-box,
    .important-note {
        border-width: 2px;
    }
}
