/* Tipografías */
@font-face {
    font-family: 'Lora';
    src: url('../fonts/Lora-Regular.woff2') format('woff2'),
         url('../fonts/Lora-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lora';
    src: url('../fonts/Lora-Medium.woff2') format('woff2'),
         url('../fonts/Lora-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lora';
    src: url('../fonts/Lora-SemiBold.woff2') format('woff2'),
         url('../fonts/Lora-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lora';
    src: url('../fonts/Lora-Bold.woff2') format('woff2'),
         url('../fonts/Lora-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Regular.woff2') format('woff2'),
         url('../fonts/OpenSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-SemiBold.woff2') format('woff2'),
         url('../fonts/OpenSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}


/* Variables CSS */
:root {
    /* Colores principales */
    --color-primary: #0066cc;
    --color-primary-dark: #004999;
    --color-primary-light: #3389d9;
    
    /* Colores secundarios */
    --color-secondary: #2c5282;
    --color-secondary-dark: #1a365d;
    --color-secondary-light: #4299e1;
    
    /* Escala de grises */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f5f7fa;
    --color-gray-200: #e4e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4a5568;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    
    /* Estados y feedback */
    --color-success: #059669;
    --color-warning: #d97706;
    --color-error: #dc2626;
    --color-info: #3b82f6;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-dark));
    --gradient-secondary: linear-gradient(135deg, var(--color-secondary-light), var(--color-secondary-dark));
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    
    /* Bordes */
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    
    /* Tipografía */
    --font-headings: 'Lora', serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* Tamaños de fuente */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    /* Transiciones */
    --transition-fast: 150ms;
    --transition-normal: 300ms;
    --transition-slow: 500ms;
    --transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Breakpoints */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

/* Preferencias de usuario */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-gray-50: #111827;
        --color-gray-100: #1f2937;
        --color-gray-200: #374151;
        --color-gray-300: #4b5563;
        --color-gray-400: #6b7280;
        --color-gray-500: #9ca3af;
        --color-gray-600: #d1d5db;
        --color-gray-700: #e5e7eb;
        --color-gray-800: #f3f4f6;
        --color-gray-900: #f9fafb;
    }
}

/* Reset y estilos base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-gray-700);
    background-color: var(--color-gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tipografía optimizada */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-gray-900);
    margin-bottom: var(--spacing-md);
}

/* Optimización de imágenes */
img {
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

/* Optimización de botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal) var(--transition-timing);
    cursor: pointer;
    border: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    will-change: transform;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Container optimizado */
.container {
    width: 100%;
    max-width: min(1200px, 90%);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@container (min-width: 50em) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* Media Queries optimizados */
@media (max-width: 767px) {
    html { 
        font-size: 14px; 
    }
    
    .container { 
        padding: 0 var(--spacing-sm);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* Utilidades modernas */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-balance {
    text-wrap: balance;
}

.text-pretty {
    text-wrap: pretty;
}

/* Tipografía */
h1 {
    font-size: var(--text-5xl);
    font-weight: 700;
}

h2 {
    font-size: var(--text-4xl);
    font-weight: 600;
}

h3 {
    font-size: var(--text-3xl);
    font-weight: 600;
}

h4 {
    font-size: var(--text-2xl);
    font-weight: 500;
}

h5 {
    font-size: var(--text-xl);
    font-weight: 500;
}

h6 {
    font-size: var(--text-lg);
    font-weight: 500;
}


/* Layout */
.container-sm {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}


/* Utilidades */
.text-center { text-align: center; }
.my-1 { margin: var(--spacing-md) 0; }
.py-1 { padding: var(--spacing-md) 0; }

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Estilos para secciones */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--bs-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--bs-gray-600);
    margin-bottom: 2rem;
}

/* Estilos para la galería */
.gallery-section {
    background-color: var(--bs-light);
    padding: 80px 0;
}

.gallery-card {
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 15px;
    overflow: hidden;
    background: white;
}

.gallery-container {
    padding: 20px;
}

.gallery-container .row {
    display: flex;
    flex-wrap: wrap;
    margin: -8px;
}

.gallery-container .col-md-4 {
    padding: 8px;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.gallery-item {
    position: relative !important;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 350px;
    margin: 0 auto;
    display: block;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    position: relative;
    z-index: 1;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 40% !important;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 50%, transparent 100%) !important;
    padding: 15px !important;
    color: white !important;
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    pointer-events: none !important;
}

.gallery-overlay h4 {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
}

.gallery-overlay p {
    margin: 5px 0 0 !important;
    font-size: 0.85rem !important;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
}

/* Estilos para el Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-info {
    color: black;
    text-align: center;
    margin-top: 20px;
    padding: 0 20px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.lightbox-close:hover {
    background-color: rgba(255,255,255,0.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 4px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        position: static;
        margin: 10px;
    }
    
    .lightbox-content {
        flex-direction: column;
    }
    
    .gallery-item {
        max-width: 100%;
    }
} 