/* Base Styles */
html {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

body {
    font-family: var(--font-secondary);
    font-size: var(--font-base);
    line-height: var(--leading-normal);
    color: var(--secondary-color);
    /* background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%); */
    overflow-x: hidden;
    padding-top: var(--nav-height-mobile);
    margin: 0;
}

@media (min-width: 768px) {
    body {
        padding-top: var(--nav-height);
    }
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1280px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--dark-gray);
    margin-bottom: var(--space-4);
}

h1 {
    font-size: var(--font-4xl);
}

h2 {
    font-size: var(--font-3xl);
}

h3 {
    font-size: var(--font-2xl);
}

h4 {
    font-size: var(--font-xl);
}

h5 {
    font-size: var(--font-lg);
}

h6 {
    font-size: var(--font-base);
}

@media (min-width: 768px) {
    h1 {
        font-size: var(--font-5xl);
    }
    
    h2 {
        font-size: var(--font-4xl);
    }
    
    h3 {
        font-size: var(--font-3xl);
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: var(--font-6xl);
    }
}

p {
    margin-bottom: var(--space-4);
    line-height: var(--leading-relaxed);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Lists */
ul, ol {
    /* margin-bottom: var(--space-4); */
    /*margin-top: var(--space-4);*/
}

li {
    /* margin-bottom: var(--space-2); */
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -ms-interpolation-mode: bicubic;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Sections */
section {
    padding: var(--space-16) 0;
    position: relative;
    isolation: isolate;
    background-color: inherit;
    z-index: 1;
}

@media (min-width: 768px) {
    section {
        padding: var(--space-20) 0;
    }
}

@media (min-width: 1024px) {
    section {
        padding: var(--space-24) 0;
    }
}

/* Hero section needs special handling */
section.hero {
    padding: 0 !important;
    margin-bottom: -5px !important;
    border-bottom: 0 !important;
}

/* Remove any potential padding from other sections that might cause gaps */
section {
    border-top: 0;
    border-bottom: 0;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-header.light .section-title,
.section-header.light .section-subtitle {
    color: var(--white);
}

.section-title {
    font-size: var(--font-3xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-4);
    position: relative;
    padding-bottom: var(--space-4);
}

.section-title::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(var(--space-2) * -1);
    width: 120px;
    height: 3px;
    background: radial-gradient(ellipse at center, rgba(236,38,143,0.5) 60%, rgba(236,38,143,0.15) 100%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}



.section-header.light .section-title::after {
    background: var(--white);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    height: 4px;
}

.section-subtitle {
    font-size: var(--font-lg);
    color: var(--dark-gray);
    margin-bottom: 0;
    margin-top: var(--space-4);
}

.section-header.light .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-weight: var(--font-medium);
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--font-4xl);
    }
    
    .section-subtitle {
        font-size: var(--font-xl);
    }
}

/* Utility Classes */
.highlight {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary-light), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(2px 2px 5px rgba(0, 0, 0, 1)) 
           drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.9))
           drop-shadow(0px 0px 3px var(--primary-color));
    font-weight: var(--font-extrabold);
    position: relative;
}

/* Fallback for browsers that don't support background-clip: text */
@supports not (-webkit-background-clip: text) {
    .highlight {
        color: var(--primary-light) !important;
        background: none;
        text-shadow: 3px 3px 8px rgba(0, 0, 0, 1), 1px 1px 4px rgba(0, 0, 0, 0.95), 0px 0px 16px rgba(0, 0, 0, 0.9);
        font-weight: var(--font-extrabold);
    }
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Margin utilities */
.mt-2 {
    margin-top: var(--space-2);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mt-12 {
    margin-top: var(--space-12);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ensure mobile navigation works properly */
.nav-menu.active {
    display: flex !important;
}

/* Fix for missing images - show placeholder */
.activity-image[src*="docs/images"] {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.activity-image[src*="docs/images"]:after {
    content: "Imagen";
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus visible improvements */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-base);
}