:root {
    /* Palette: Material Pastel Dream */
    --primary-color: #FF9AA2;
    --primary-gradient: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 100%);
    --secondary-gradient: linear-gradient(135deg, #C7CEEA 0%, #B5EAD7 100%);
    --accent-color: #FFDAC1;
    --bg-color: #FFF5F5;
    --surface-color: #FFFFFF;
    --text-color: #4A4A4A;
    --text-light: #888888;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 3px 6px rgba(0, 0, 0, 0.2);
    --shadow-float: 0 2px 5px rgba(0, 0, 0, 0.12);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Quicksand', sans-serif;
    --radius-md: 20px;
    --radius-lg: 32px;
    --radius-pill: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
}

/* --- Typography --- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: #2D3436;
}

h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 10px rgba(255, 154, 162, 0.3));
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2D3436;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==================== */
/* HEADER NAVEGACIÓN */
/* ==================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.8rem 3%;
    transition: all 0.3s ease;
    background: transparent;
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.0);
    /* Fully transparent */
    backdrop-filter: blur(10px);
    /* Reduced blur to avoid "milky" look */
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: relative;
}

/* Logo */
.logo {
    position: absolute;
    left: 0;
}

.logo a {
    font-family: 'Pacifico', var(--font-heading), cursive;
    font-size: 1.8rem;
    font-weight: 400;
    color: #2D3436;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.3rem;
}

/* Botón Hamburguesa - Oculto en desktop */
.hamburger-btn {
    position: absolute;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    flex-shrink: 0;
    margin-top: 0.9rem;
}

.hamburger-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background: #2D3436;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Menú Desktop */
.desktop-nav {
    display: block;
    flex-shrink: 1;
    overflow: visible;
    margin-top: 1.3rem;
}

.nav-menu {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: nowrap;
    align-items: center;
}

.nav-menu li {
    flex-shrink: 0;
}

/* Efecto Hover ULTRA MODERNO para los enlaces de navegación */
.nav-menu a {
    display: block;
    position: relative;
    padding: 0.55rem 1.1rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    color: #4A4A4A;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    /* Prevent super long titles from breaking layout */
    z-index: 1;
}

/* Efecto de gradiente animado de fondo */
.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #FF9AA2, #FFB7B2, #FFDAC1, #C7CEEA);
    background-size: 200% 200%;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: -1;
    border-radius: 50px;
}

/* Efecto de brillo que se desplaza */
.nav-menu a::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
    z-index: -1;
}

.nav-menu a:hover {
    color: #fff;
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 10px 25px rgba(255, 154, 162, 0.5),
        0 5px 15px rgba(255, 183, 178, 0.3),
        0 0 20px rgba(255, 218, 193, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-menu a:hover::before {
    left: 0;
    animation: gradientShift 3s ease infinite;
}

.nav-menu a:hover::after {
    opacity: 1;
    left: 100%;
    top: 100%;
}

/* Animación del gradiente */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Efecto activo (al hacer clic) */
.nav-menu a:active {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 154, 162, 0.4);
}



/* Ocultar hamburguesa cuando el menú móvil está activo */
.hamburger-btn.active {
    display: none !important;
}

/* Menú Mobile */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.6);
    /* Translucent glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1003;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: #2D3436;
}

.close-btn {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #FF808B;
    /* Darker pink for better contrast */
    font-size: 1.4rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.close-btn:hover {
    background: #FF9AA2;
    color: #fff;
    transform: rotate(90deg);
}

.mobile-nav {
    padding: 1.5rem 1rem;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: 0.5rem;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    color: #4A4A4A;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 56px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 0.5rem;
    /* Ensure spacing between buttons */
}

.mobile-nav a:hover,
.mobile-nav a:active {
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(255, 154, 162, 0.4);
    transform: translateX(8px);
}

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1002;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ==================== */
/* HERO SECTION */
/* ==================== */
.hero {
    width: 100%;
    min-height: 60vh;
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    align-content: center;
    background: transparent;
    padding-top: 150px;
    margin-bottom: 1.5rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* Fallback gradient when image doesn't exist */
    background-color: #f8f9fa;
    background-image: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ff9a9e 100%);
    z-index: 0;
    will-change: transform;
    opacity: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.9) 100%);
    z-index: 1;
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 90%;
    max-width: 900px;
    padding: 4rem;
    background: transparent;
    backdrop-filter: none;
    border-radius: var(--radius-lg);
    border: none;
    margin: auto;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    color: #555;
    font-weight: 600;
}

/* ==================== */
/* BUTTONS */
/* ==================== */
.btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    top: 0;
}

.btn-hero {
    background: linear-gradient(-45deg,
            #FFC5C5,
            #FFA07A,
            #FF99CC,
            #C5CAE9,
            #87CEEB,
            #C7B8EA,
            #FFC0CB,
            #FFC5C5);
    background-size: 400% 400%;
    animation: rainbow-gradient-move 8s ease infinite;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 5px 0 rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(255, 154, 162, 0.4);
}

/* ==================== */
/* CARDS & CONTAINERS */
/* ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 9rem 5% 4rem;
}

/* Increase top padding for pages where container starts the content (Gallery, Blog, etc.) */
.main-header~.container {
    padding-top: 11rem;
}

/* Reset for homepage where hero comes first */
.hero~.container {
    padding-top: 9rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}

.card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(0);
}

.card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover {
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
    z-index: 10;
}

.card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-content .btn {
    margin-top: auto;
}

.card-category {
    font-size: 0.8rem;
    color: #FF9AA2;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.card-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: #2D3436;
}

/* ==================== */
/* FORMS */
/* ==================== */
input,
textarea {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 154, 162, 0.15);
}

/* ==================== */
/* TITLE CONTAINER & BACK BUTTON */
/* ==================== */
.title-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.btn-back-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 154, 162, 0.1);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn-back-title:hover {
    background: var(--primary-gradient);
    color: #fff;
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(255, 154, 162, 0.3);
}

.btn-back-blog {
    color: #000;
    transition: color 0.3s ease;
}

.btn-back-blog:hover {
    color: var(--primary-color);
}

/* Contact Page Styles */
#contact-icon {
    color: #444;
    transition: color 0.3s ease;
}

.contact-email-link {
    color: #444;
    text-decoration: none;
    border-bottom: 2px solid #444;
    transition: all 0.3s ease;
}

/* ==================== */
/* FOOTER */
/* ==================== */
footer {
    background: #fff;
    color: var(--text-color);
    padding: 6rem 5% 2rem;
    margin-top: 8rem;
    border-top-left-radius: 60px;
    border-top-right-radius: 60px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.05);
}

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

.footer-section h3 {
    color: #2D3436;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

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

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

.footer-section a {
    color: var(--text-light);
    font-weight: 600;
    transition: all 0.3s;
}

.footer-section a:hover {
    color: #FF9AA2;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--surface-color);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.social-links a:hover {
    background: var(--primary-gradient);
    color: #fff;
    transform: translateY(-5px) rotate(10deg);
    box-shadow: 0 10px 20px rgba(255, 154, 162, 0.4);
    padding-left: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==================== */
/* ANIMATIONS */
/* ==================== */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== */
/* ABOUT PAGE LAYOUT */
/* ==================== */
.about-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.about-image-container {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
}

.about-content {
    flex: 2;
    min-width: 300px;
}

/* ==================== */
/* RESPONSIVE */
/* ==================== */
/* SCROLL INDICATOR */
/* ==================== */
.scroll-down-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    /* Hidden by default (desktop) */
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    opacity: 0.8;
    animation: bounce-scroll 2s infinite;
    z-index: 10;
    pointer-events: none;
}

/* Show scroll indicator only on mobile */
@media (max-width: 1150px) {
    .scroll-down-indicator {
        display: flex;
    }
}

.scroll-down-indicator span {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
}

.scroll-down-indicator i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

@keyframes bounce-scroll {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ==================== */

/* Tablet y móviles */
/* Tablet y móviles (Breakpoint aumentado para evitar solapamientos con textos largos) */
@media (max-width: 1150px) {
    .desktop-nav {
        display: none !important;
    }

    .nav-menu {
        display: none !important;
    }

    .header-container {
        min-height: 80px;
        display: flex !important;
        position: relative;
        justify-content: flex-start !important;
        align-items: center !important;
        padding-right: 0;
        /* Reset padding as we handle spacing manually */
    }

    .logo {
        position: relative !important;
        left: auto !important;
        flex-grow: 0 !important;
        /* Don't expand */
        margin-right: 0 !important;
        z-index: 1002;
        /* Ensure logo is clickable */
    }

    .logo a {
        margin-top: 0;
    }

    /* CENTERED Settings Button */
    .theme-controls {
        display: flex !important;
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        z-index: 1001;
    }

    /* RIGHT ALIGNED Hamburger */
    .hamburger-btn {
        display: flex !important;
        position: absolute !important;
        top: 50% !important;
        right: 0 !important;
        transform: translateY(-50%) !important;
        left: auto !important;
        margin: 0 !important;
    }

    /* Hero adjustments for mobile */
    .hero {
        padding-top: 140px;
        padding-bottom: 6rem;
        margin-bottom: 0;
        min-height: 92vh;
        /* Full screen effect */
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: visible;
    }

    .hero-content {
        padding: 0 1.5rem;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 0.5rem;
        margin-bottom: 2rem;
    }

    .container {
        padding-top: 9rem;
        /* Restore safe padding for pages without hero */
    }

    .hero+.container {
        padding-top: 6rem;
    }

    .btn-hero {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
        width: auto;
        max-width: 100%;
    }

    /* Centrar imagen de perfil en móvil */
    .about-layout {
        flex-direction: column;
        align-items: center;
    }

    .about-image-container {
        max-width: 300px;
        margin: 0 auto 2rem;
    }

    .about-content {
        width: 100%;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    .mobile-menu {
        width: 100%;
        max-width: 100%;
    }

    .logo a {
        font-size: 1.4rem;
    }
}

/* ==================== */
/* MAGIC MODE - EMOJIS FLOTANTES */
/* ==================== */
.emoji-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-emoji {
    position: absolute;
    top: -50px;
    opacity: 0.7;
    pointer-events: none;
    user-select: none;
    animation-timing-function: ease-in-out;
    animation-fill-mode: forwards;
}

/* Magic wand button active state - green when effects are active */
body.magic-mode #animationToggle {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4) !important;
    border-color: #4CAF50 !important;
}

body.magic-mode #animationToggle i {
    color: #fff !important;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    }

    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
    }
}

@keyframes float-up {
    0% {
        top: -50px;
        transform: translateX(0) rotate(0deg);
    }

    100% {
        top: 110vh;
        transform: translateX(50px) rotate(360deg);
    }
}

@keyframes float-diagonal {
    0% {
        top: -50px;
        transform: translateX(0) rotate(0deg) scale(1);
    }

    50% {
        transform: translateX(100px) rotate(180deg) scale(1.2);
    }

    100% {
        top: 110vh;
        transform: translateX(-50px) rotate(360deg) scale(0.8);
    }
}

@keyframes float-wave {
    0% {
        top: -50px;
        transform: translateX(0) rotate(0deg);
    }

    25% {
        transform: translateX(50px) rotate(90deg);
    }

    50% {
        transform: translateX(-50px) rotate(180deg);
    }

    75% {
        transform: translateX(50px) rotate(270deg);
    }

    100% {
        top: 110vh;
        transform: translateX(0) rotate(360deg);
    }
}

@keyframes float-spin {
    0% {
        top: -50px;
        transform: rotate(0deg) scale(1);
    }

    100% {
        top: 110vh;
        transform: rotate(1080deg) scale(1.5);
    }
}

@keyframes float-bounce {
    0% {
        top: -50px;
        transform: translateY(0);
    }

    20% {
        transform: translateY(80px);
    }

    30% {
        transform: translateY(40px);
    }

    40% {
        transform: translateY(120px);
    }

    50% {
        transform: translateY(60px);
    }

    60% {
        transform: translateY(140px);
    }

    70% {
        transform: translateY(80px);
    }

    80% {
        transform: translateY(150px);
    }

    100% {
        top: 110vh;
        transform: translateY(0);
    }
}

@keyframes float-zigzag {
    0% {
        top: -50px;
        transform: translateX(0);
    }

    20% {
        transform: translateX(-80px);
    }

    40% {
        transform: translateX(80px);
    }

    60% {
        transform: translateX(-80px);
    }

    80% {
        transform: translateX(80px);
    }

    100% {
        top: 110vh;
        transform: translateX(0);
    }
}

@keyframes from-bottom {
    0% {
        top: 110vh;
        transform: translateX(0) rotate(0deg);
    }

    100% {
        top: -50px;
        transform: translateX(50px) rotate(360deg);
    }
}

@keyframes dvd-bounce {
    0% {
        top: 5vh;
        left: 5vw;
    }

    /* Primer rebote - esquina inferior derecha */
    12.5% {
        top: 85vh;
        left: 85vw;
    }

    /* Segundo rebote - esquina superior derecha */
    25% {
        top: 10vh;
        left: 90vw;
    }

    /* Tercer rebote - esquina superior izquierda */
    37.5% {
        top: 5vh;
        left: 5vw;
    }

    /* Cuarto rebote - esquina inferior izquierda */
    50% {
        top: 90vh;
        left: 10vw;
    }

    /* Quinto rebote - esquina inferior derecha */
    62.5% {
        top: 85vh;
        left: 88vw;
    }

    /* Sexto rebote - centro derecha */
    75% {
        top: 45vh;
        left: 90vw;
    }

    /* Séptimo rebote - esquina inferior izquierda */
    87.5% {
        top: 88vh;
        left: 8vw;
    }

    /* Final - esquina superior derecha */
    100% {
        top: 8vh;
        left: 92vw;
    }
}

@keyframes twinkle {
    0% {
        top: 20vh;
        transform: scale(0) rotate(0deg);
    }

    10% {
        transform: scale(0.5) rotate(45deg);
    }

    20% {
        transform: scale(1.2) rotate(90deg);
    }

    30% {
        transform: scale(0.8) rotate(135deg);
    }

    40% {
        transform: scale(1.1) rotate(180deg);
    }

    50% {
        transform: scale(0.9) rotate(225deg);
    }

    60% {
        transform: scale(1.2) rotate(270deg);
    }

    70% {
        transform: scale(0.7) rotate(315deg);
    }

    80% {
        transform: scale(1.1) rotate(360deg);
    }

    90% {
        transform: scale(0.8) rotate(405deg);
    }

    100% {
        top: 85vh;
        transform: scale(0) rotate(450deg);
    }
}

/* =========================================
   PAGINATION STYLES
   ========================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem auto;
    flex-wrap: wrap;
    max-width: 800px;
}

.pagination-btn,
.page-number {
    padding: 0.6rem 1.2rem;
    background: #fff;
    color: var(--text-color);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.pagination-btn:hover:not(.disabled),
.page-number:hover:not(.active) {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 154, 162, 0.3);
}

.page-number.active {
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 100%);
    color: #fff;
    border-color: #FF9AA2;
    box-shadow: 0 4px 12px rgba(255, 154, 162, 0.4);
    cursor: default;
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .pagination {
        gap: 0.4rem;
        margin: 2rem auto;
    }

    .pagination-btn,
    .page-number {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 40px;
    }

    .pagination-btn {
        font-size: 0.8rem;
    }
}


/* Asegurar que el contenido esté por encima de los emojis */
.container,
.hero,
footer {
    position: relative;
    z-index: 1;
}

/* ==================== */
/* GOOGLE TRANSLATE */
/* ==================== */
/* Overlay para el selector de idiomas */
.translate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1010;
}

.translate-overlay.active {
    opacity: 1;
    pointer-events: all;
}

#google_translate_element {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    padding: 3rem 2rem 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1011;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    display: flex;
    flex-direction: column;
}

@media (max-width: 600px) {
    #google_translate_element {
        min-width: auto;
        width: 90%;
        padding: 2rem 1rem;
    }
}

#google_translate_element.show {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}


/* Ocultar elementos innecesarios del widget */
.goog-te-banner-frame,
.goog-te-balloon-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Estilos del selector de idioma */
.goog-te-gadget {
    font-family: var(--font-body) !important;
    font-size: 0.9rem !important;
}

.goog-te-gadget-simple {
    background: linear-gradient(135deg, #FF9AA2 0%, #FFB7B2 100%) !important;
    border: none !important;
    padding: 1rem 2rem !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
    order: -1 !important;
    box-shadow: 0 4px 15px rgba(255, 154, 162, 0.3) !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    margin: 1rem 0 !important;
}

.goog-te-gadget-simple:hover {
    background: linear-gradient(135deg, #FFB7B2 0%, #FFC7C2 100%) !important;
    box-shadow: 0 6px 20px rgba(255, 154, 162, 0.4) !important;
    transform: translateY(-2px) !important;
}

.goog-te-gadget-simple .goog-te-menu-value {
    color: #fff !important;
    font-size: 1rem !important;
}


.goog-te-gadget-icon {
    display: none !important;
}

/* Dropdown del traductor */
/* Dropdown del traductor */
.goog-te-menu-frame {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
    max-width: 90vw !important;
    /* Limit width to viewport width */
    width: auto !important;
    box-sizing: border-box !important;
    /* Force centering on mobile */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10000 !important;
}

/* Título del selector */
#google_translate_element::before {
    content: 'Select your language';
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2D3436;
}


/* Botón de cerrar */
.translate-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 154, 162, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #FF9AA2;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.translate-close-btn:hover {
    background: #FF9AA2;
    color: #fff;
    transform: rotate(90deg);
}


/* Responsive para el modal de idiomas en pantallas pequeñas */
@media (max-width: 600px) {
    #google_translate_element {
        min-width: 0;
        width: 95vw;
        max-width: 95vw;
        padding: 2.5rem 1rem 1.5rem;
        max-height: 95vh;
    }

    .translate-close-btn {
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    #google_translate_element::before {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }
}

/* Tabla de referencia de idiomas */
.language-reference {
    order: 2;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e0e0e0;
}

.reference-note {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 600;
}

.lang-grid-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.85rem;
}

.lang-selector {
    color: #666;
    font-weight: 500;
    font-style: italic;
    min-width: 70px;
}

.lang-arrow {
    color: #B084CC;
    font-weight: bold;
}

.lang-native {
    color: #2D3436;
    font-weight: 600;
    flex: 1;
}


/* Scrollbar para la tabla de idiomas */
.lang-grid-table::-webkit-scrollbar {
    width: 6px;
}

.lang-grid-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.lang-grid-table::-webkit-scrollbar-thumb {
    background: #B084CC;
    border-radius: 3px;
}

.lang-grid-table::-webkit-scrollbar-thumb:hover {
    background: #9370B0;
}

@keyframes rainbow-gradient-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #000 !important;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #000;
    border-radius: 25px;
    margin-top: 1rem;
    transition: all 0.2s ease;
}

.btn-read-more:hover {
    background: #000;
    color: #fff !important;
}


/* Animation Keyframes */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(-15deg);
    }

    50% {
        transform: translateY(-10px) rotate(-5deg);
    }

    100% {
        transform: translateY(0px) rotate(-15deg);
    }
}

/* Hide Google Translate Banner */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

.goog-tooltip {
    display: none !important;
}

.goog-te-gadget-icon {
    display: none !important;
}

.goog-te-gadget-simple {
    background-color: transparent !important;
    border: none !important;
    font-size: 10pt !important;
    display: inline-block;
    padding-top: 0px !important;
    padding-bottom: 0px !important;
    cursor: pointer;
}

/* Hero Accordion Styles (Re-added) */
.hero-accordion {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto 2rem;
    background: transparent;
    /* Changed to transparent as items have their own bg */
}

.accordion-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Space between items */
}

.accordion-trigger {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #4A4A4A;
    transition: all 0.3s ease;
    user-select: none;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

@media (hover: hover) {
    .accordion-trigger:hover {
        background: rgba(255, 154, 162, 0.1);
        color: var(--primary-color);
    }
}

.accordion-trigger.active {
    background: transparent !important;
    color: var(--primary-color);
}

.accordion-trigger i {
    transition: transform 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.accordion-inner {
    padding: 1.5rem;
    text-align: left;
    color: #555;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.accordion-inner p {
    margin-bottom: 1rem;
}

.accordion-inner ul,
.accordion-inner ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.accordion-inner a {
    color: var(--primary-color);
    text-decoration: underline;
}

.btn-sm {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    background: #ff808b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 154, 162, 0.3);
}

/* Language Reference and Translate Visibility */
.language-reference {
    display: block;
}

#google_translate_element {
    /* Visibility controlled by JS class .show */
    display: flex;
}

.skiptranslate {
    display: block;
}

/* ==================== */
/* COMMENTS */
/* ==================== */
:root {
    --comment-bg: #ffffff;
    --comment-border: rgba(0, 0, 0, 0.08);
}

.comment-card {
    background: var(--comment-bg);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    border: 1px solid var(--comment-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
}

/* Nav Dropdown */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(15px);
    animation: dropdown-slide-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes dropdown-slide-in {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(15px) scale(1);
    }
}

/* Bridge to prevent closing when moving mouse */
.nav-item-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown-menu li {
    width: 100%;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    color: #333;
    font-size: 0.9rem;
    border-radius: 8px;
    white-space: nowrap;
    text-align: left;
    font-weight: 500;
}

@media (min-width: 769px) {
    .dropdown-menu a {
        border-left: 3px solid transparent;
        /* Prepare for hover */
        transition: all 0.2s ease;
    }

    .dropdown-menu a:hover {
        background: rgba(0, 0, 0, 0.02);
        color: var(--primary-color) !important;
        border-left-color: var(--primary-color);
        padding-left: 1.2rem;
        box-shadow: none;
        transform: none;
        border-radius: 0 8px 8px 0;
    }
}

@media (max-width: 768px) {
    .dropdown-menu a:hover {
        background: transparent;
        color: var(--primary-color);
        padding-left: 1.5rem;
    }
}

/* Arrow rotation on hover */
.nav-item-dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* ==================== */
/* REFACTORED UTILITIES */
/* ==================== */
.gallery-img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.h-100 {
    height: 100px;
}

.h-150 {
    height: 150px;
}

.h-200 {
    height: 200px;
}

.comment-meta {
    font-size: 0.8rem;
    color: #888;
}

.comment-content {
    margin-top: 0.5rem;
    line-height: 1.6;
}

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
}

.pagination-info {
    align-self: center;
    color: #666;
    font-size: 0.9rem;
}

.btn-pagination {
    background: #f0f0f0;
    color: #333;
    padding: 5px 10px;
    font-size: 0.9rem;
}

/* ==================== */
/* INDEX PAGE STYLES */
/* ==================== */
.section-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.section-header h2 {
    margin: 0;
    font-family: var(--font-heading);
    text-align: center;
}

.view-all-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #444 !important;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

.view-all-btn:hover {
    color: #222 !important;
    transform: translateX(5px);
}

/* Cards Layout */
.container .grid:not(.carousel-crafts):not(.carousel-news) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.container .grid .card,
.carousel-item.card {
    width: 350px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.container .grid .card img {
    width: 100%;
    height: 250px !important;
    object-fit: contain;
    object-position: center;
    background: #f5f5f5;
}

.container .grid .card .card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.5rem !important;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
}

.container .grid .card .card-content p {
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.6;
    min-height: calc(1.6em * 4);
    max-height: calc(1.6em * 4);
    margin: 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    width: 100%;
    max-width: 100%;
}

.container .grid .card .card-content h3 {
    margin: 0 0 1rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    width: 100%;
    max-width: 100%;
}

.container .grid .card .card-content .btn-read-more {
    margin-top: 1.5rem;
}

/* Carousel Styles */
.carousel-crafts .carousel-item,
.carousel-news .carousel-item {
    display: none !important;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-crafts .carousel-item.active,
.carousel-news .carousel-item.active {
    display: flex !important;
}

.carousel-crafts,
.carousel-news {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #333;
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: #999;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .container .grid .card {
        width: 100%;
    }

    .container .grid .card img {
        height: 200px !important;
        object-fit: contain;
    }

    .container .grid .card .card-content p {
        -webkit-line-clamp: 3;
        min-height: calc(1.6em * 3);
        max-height: calc(1.6em * 3);
    }

    .container .grid .card .card-content {
        padding: 1rem !important;
    }

    .carousel-dots {
        gap: 0.5rem;
        margin-top: 1.5rem;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* ==================== */
/* SCROLL TO TOP BUTTON */
/* ==================== */
.scroll-to-top {
    position: fixed;
    bottom: 8rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 154, 162, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 154, 162, 0.5);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 6rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

/* Mobile padding adjustments */
@media (max-width: 900px) {

    /* Adjust top padding for non-homepage pages on mobile */
    .main-header~.container {
        padding-top: 8.5rem;
    }

    /* Ensure homepage keeps its specific mobile padding */
    .hero~.container {
        padding-top: 6rem;
    }
}