/* Importar fuentes modernas */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables CSS para consistencia */
:root {
    --primary-color: #FF6F61;
    --secondary-color: #AEDFF7;
    --accent-color: #87CEEB;
    --dark-color: #333333;
    --light-color: #f8fafc;
    --white: #ffffff;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Arial', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    background-color: var(--light-color); /* Tailwind bg-gray-50 */
    overflow-x: hidden;
}

/* Ensure page content is visible below a fixed header */
/* Reduce top padding because pages use `main.pt-20` (Tailwind) and header is fixed. */
/* Page spacing handled by per-page Tailwind classes (main.pt-20). Keep no global top padding. */
body { padding-top: 0; }

/* Animaciones globales */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Clases de utilidad para animaciones */
.fade-in { animation: fadeIn 0.6s ease-out; }
.animate-fade-in { animation: fadeInUp 1s ease-out; }
.animate-slide-up { animation: slideUp 0.8s ease-out; }

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

/* Mejoras adicionales para accesibilidad */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estilos de impresión globales */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

body.editing-mode {
    padding-top: 70px; /* Ajusta según la altura de tu overlay de edición */
}

/* Fallbacks: ensure .container and hero content are centered if Tailwind container isn't active */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.hero-content {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
}

/* Center common max-width utilities and improve prose readability */
.max-w-4xl,
.max-w-3xl,
.max-w-2xl,
.max-w-none {
    margin-left: auto !important;
    margin-right: auto !important;
}

.prose {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
    color: var(--gray-800);
    line-height: 1.8;
}

.prose img,
.prose video,
.prose iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

/* Make sure main content blocks don't collapse to the left */
main .container > div,
main .container > section,
main .container > .max-w-4xl {
    width: 100%;
}
