/* ============================================================
   Plan en Familia — Child-friendly Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Fredoka+One&display=swap');

:root {
    --orange:    #FF6B35;
    --yellow:    #FFD93D;
    --green:     #6BCB77;
    --blue:      #4D96FF;
    --purple:    #C77DFF;
    --pink:      #FF6B9D;
    --red:       #FF4757;
    --teal:      #26de81;

    --bg:        #f7f7f8;
    --bg-card:   #FFFFFF;
    --bg-dark:   #2D3436;

    --text:      #2D3436;
    --text-mid:  #636E72;
    --text-muted:#B2BEC3;

    --radius-sm:  8px;
    --radius:    16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
    --shadow:    0 4px 20px rgba(0,0,0,.09);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.14);

    --transition: .2s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Nunito', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 100; line-height: 1.2; }

.font-brand { font-family: 'Fredoka One', cursive; }

/* ---- Layout ---- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.plans-filter-container {
    padding-top: 0;
    max-width: 1580px;
}

/* ============================================================
   PLANS LAYOUT (sidebar + results)
   ============================================================ */
.plans-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .plans-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .filter-sidebar {
        position: sticky;
        top: 5.5rem;
        width: 280px;
        min-width: 280px;
        flex-shrink: 0;
    }

    .filter-sidebar .filter-panel {
        margin-bottom: 0;
    }

    .filter-sidebar .filter-grid {
        grid-template-columns: 1fr;
    }

    .plans-results {
        flex: 1;
        min-width: 0;
    }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: #fff;
    border-bottom: 3px solid var(--orange);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: .75rem 1.25rem;
    max-width: 1280px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.logo-text {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--orange), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-search {
    flex: 1;
    max-width: 480px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: .6rem 1rem .6rem 2.8rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-xl);
    font-size: .95rem;
    transition: border-color var(--transition);
    background: var(--bg);
}

.search-box input:focus {
    outline: none;
    border-color: var(--orange);
    background: #fff;
}

.search-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}

.nav-link {
    padding: .5rem .9rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .9rem;
    transition: all var(--transition);
    color: var(--text-mid);
}

.nav-link:hover { background: var(--bg); color: var(--orange); }

.btn-primary {
    background: linear-gradient(135deg, var(--orange), #ff8c42);
    color: #fff;
    border: none;
    padding: .55rem 1.2rem;
    border-radius: var(--radius-xl);
    font-weight: 800;
    font-size: .9rem;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    box-shadow: 0 4px 12px rgba(255,107,53,.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,53,.4);
}

.btn-secondary {
    background: #fff;
    color: var(--orange);
    border: 2px solid var(--orange);
    padding: .5rem 1.1rem;
    border-radius: var(--radius-xl);
    font-weight: 800;
    font-size: .9rem;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.btn-secondary:hover {
    background: var(--orange);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-mid);
    border: 2px solid #e0e0e0;
    padding: .5rem 1.1rem;
    border-radius: var(--radius-xl);
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, #FFF3E8 0%, #FFE8F5 50%, #E8F4FF 100%);
    padding: 4rem 1.25rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 40%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,107,53,.08) 0%, transparent 70%);
}

.hero::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -5%;
    width: 35%;
    height: 150%;
    background: radial-gradient(circle, rgba(77,150,255,.08) 0%, transparent 70%);
}

.hero-content { position: relative; z-index: 1; }

.hero-emoji {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-family: 'Fredoka One', cursive;
    background: linear-gradient(135deg, var(--orange), var(--purple), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .75rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-mid);
    max-width: 560px;
    margin: 0 auto 2rem;
    font-weight: 600;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

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

.hero-stat-number {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: var(--orange);
}

.hero-stat-label {
    font-size: .85rem;
    color: var(--text-mid);
    font-weight: 600;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.section-link {
    font-weight: 700;
    color: var(--orange);
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.section-link:hover { text-decoration: underline; }

/* ============================================================
   PLAN CARDS
   ============================================================ */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.plan-card.featured {
    border: 2px solid var(--yellow);
}

.plan-card.featured::before {
    content: '⭐ Destacado';
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: var(--yellow);
    color: #333;
    font-size: .7rem;
    font-weight: 800;
    padding: .25rem .6rem;
    border-radius: var(--radius-xl);
    z-index: 2;
}

.card-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.plan-card:hover .card-image img {
    transform: scale(1.05);
}

.card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 3rem;
    background: linear-gradient(135deg, #fff3e8, #ffe8f5);
}

.card-category-badge {
    position: absolute;
    bottom: .6rem;
    right: .6rem;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 1.2rem);
}

.card-rating-overlay {
    display: none;
    position: absolute;
    top: .5rem;
    right: .5rem;
    background: rgba(0,0,0,.7);
    color: var(--yellow);
    font-family: 'Fredoka One', cursive;
    font-size: .8rem;
    font-weight: 100;
    padding: .2rem .55rem;
    border-radius: var(--radius-xl);
    backdrop-filter: blur(4px);
}

.card-body {
    padding: 1.1rem 1.1rem .8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-badges {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .65rem;
    border-radius: var(--radius-xl);
    font-size: .75rem;
    font-weight: 700;
}

.badge-age   { background: #E8F4FF; color: #2667CC; }
.badge-free  { background: #E8F8EE; color: #1E8038; }
.badge-price { background: #FFF3E8; color: #B35000; }
.badge-province { background: #F3E8FF; color: #7B1FCC; }

.card-rating {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.rating-score {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: var(--orange);
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars .star {
    font-size: .95rem;
    color: var(--text-muted);
}

.rating-stars .star.filled { color: var(--yellow); }

.rating-count {
    font-size: .78rem;
    color: var(--text-muted);
}

.card-excerpt {
    font-size: .85rem;
    color: var(--text-mid);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer {
    padding: .75rem 1.1rem;
    border-top: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.card-location {
    font-size: .8rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-card {
    background: linear-gradient(135deg, var(--orange), #ff8c42);
    color: #fff;
    border: none;
    padding: .4rem .9rem;
    border-radius: var(--radius-xl);
    font-weight: 800;
    font-size: .82rem;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255,107,53,.4);
}

.card-footer-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.favorite-form { margin: 0; display: inline-flex; }

.favorite-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: #e74c3c;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform var(--transition);
}

.favorite-btn:hover {
    transform: scale(1.15);
}

.favorite-btn:active {
    transform: scale(.95);
}

.favorite-heart {
    font-size: 1.75rem;
    line-height: 1;
    display: inline-block;
}

.favorite-btn.is-favorite .favorite-heart {
    animation: heart-pop .35s ease;
}

@keyframes heart-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ── Photo vote buttons ── */
.photo-like-btn,
.photo-dislike-btn {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .6rem;
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: #fff;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    color: var(--text-mid);
}
.photo-like-btn:hover  { border-color: #22c55e; color: #16a34a; }
.photo-dislike-btn:hover { border-color: #ef4444; color: #dc2626; }
.photo-like-btn.active    { background: #dcfce7; border-color: #22c55e; color: #16a34a; }
.photo-dislike-btn.active { background: #fee2e2; border-color: #ef4444; color: #dc2626; }

/* ============================================================
   FILTERS (inside Live Component)
   ============================================================ */
.filter-panel {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-field label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-mid);
    margin-bottom: .3rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: .55rem .8rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: .9rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition);
    cursor: pointer;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--orange);
    background: #fff;
}

.filter-range {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.filter-range input[type="range"],
.filter-range-input {
    flex: 1;
    width: 100%;
    -webkit-appearance: none;
    height: 4px;
    background: linear-gradient(to right, var(--orange) var(--val, 50%), #e0e0e0 var(--val, 50%));
    border-radius: 2px;
    cursor: pointer;
}

.filter-range input[type="range"]::-webkit-slider-thumb,
.filter-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--orange);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(255,107,53,.4);
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

/* Categories checkbox filter (Opción B) */
.filter-field--full {
    grid-column: 1 / -1;
}

.categories-field {
    display: block;
}

.categories-field > summary {
    list-style: none;
}

.categories-field > summary::-webkit-details-marker {
    display: none;
}

.categories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    padding: 0;
    margin-bottom: .3rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-mid);
    text-align: left;
    user-select: none;
}

.categories-header-label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

.categories-count {
    color: var(--orange);
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

.categories-header-arrow {
    font-size: .75rem;
    color: var(--text-mid);
    transition: transform .2s ease;
}

.categories-header-arrow {
    transition: transform .2s ease;
}

.categories-field[open] .categories-header-arrow {
    transform: rotate(180deg);
}

.categories-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: .35rem;
    background: var(--bg);
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
}

.filter-field label.category-check {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 0;
    padding: .15rem .25rem;
    cursor: pointer;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-mid);
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
    transition: color .12s;
}

.category-check input[type="checkbox"] {
    accent-color: var(--orange);
    width: 13px;
    height: 13px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.category-check.is-checked {
    color: var(--text-dark);
}

.category-check-icon {
    font-size: .9rem;
    flex-shrink: 0;
    line-height: 1;
}

.category-check-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.categories-actions {
    display: flex;
    gap: .25rem;
    margin-top: .25rem;
    padding-top: .25rem;
    border-top: 1px dashed #e0e0e0;
}

.categories-mini-btn {
    flex: 1;
    padding: .25rem .35rem;
    background: transparent;
    border: none;
    color: var(--text-mid);
    font-family: 'Nunito', sans-serif;
    font-size: .72rem;
    font-weight: 800;
    cursor: pointer;
    border-radius: var(--radius);
    white-space: nowrap;
}

.categories-mini-btn:hover {
    background: #fff;
    color: var(--orange);
}

/* Filter field inline checkbox */
.filter-field-check {
    display: flex;
    align-items: center;
    gap: .4rem;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-mid);
    white-space: nowrap;
    text-transform: none;
    letter-spacing: normal;
}

.filter-field-check input[type="checkbox"] {
    accent-color: var(--orange);
    width: 15px;
    height: 15px;
    cursor: pointer;
    margin: 0;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.results-count {
    font-weight: 700;
    color: var(--text-mid);
    font-size: .9rem;
}

.sort-select {
    padding: .4rem .8rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-xl);
    font-size: .85rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    background: #fff;
    cursor: pointer;
}

/* ============================================================
   PLAN DETAIL
   ============================================================ */
.plan-detail {
    padding: 2rem 0 3rem;
}

.plan-hero-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.plan-hero-placeholder {
    height: 300px;
    background: linear-gradient(135deg, #fff3e8, #ffe8f5);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    margin-bottom: 2rem;
}

/* ── Plan Media Gallery ── */
.plan-gallery {
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 420px;
    background: #111;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.gallery-main-video {
    width: 100%;
    height: 100%;
}

.gallery-fullscreen-btn {
    position: absolute;
    bottom: .75rem;
    right: .75rem;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: .35rem .65rem;
    font-size: 1.1rem;
    cursor: pointer;
    line-height: 1;
    transition: background .2s;
}
.gallery-fullscreen-btn:hover { background: rgba(0,0,0,.8); }

.gallery-thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .6rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    scrollbar-width: thin;
}

.gallery-thumb {
    flex: 0 0 90px;
    height: 64px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: #222;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-thumb.active { border-color: var(--orange); }
.gallery-thumb:hover { border-color: var(--purple); }

.thumb-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,.55);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
}

.thumb-play-big {
    color: #fff;
    font-size: 1.5rem;
}

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox-img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 8px 48px rgba(0,0,0,.6);
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: .25rem;
    z-index: 10000;
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 1.75rem;
    padding: .75rem 1rem;
    cursor: pointer;
    border-radius: var(--radius);
    z-index: 10000;
    transition: background .2s;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

@media (max-width: 600px) {
    .gallery-thumb { flex: 0 0 70px; height: 50px; }
}

.plan-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .plan-layout { grid-template-columns: 1fr; }
}

.plan-title-area { margin-bottom: 1rem; }

.plan-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--text);
    margin-bottom: .75rem;
}

.plan-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.plan-description {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-mid);
    margin-bottom: 1.5rem;
}

.plan-info-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 5rem;
}

.plan-info-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: .9rem;
}

.info-row:last-child { border-bottom: none; }

.info-label {
    font-weight: 600;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: .4rem;
}

.info-value {
    font-weight: 800;
    color: var(--text);
}

.plan-url-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, var(--orange), #ff8c42);
    color: #fff;
    padding: .9rem;
    border-radius: var(--radius-xl);
    font-weight: 800;
    font-size: 1rem;
    margin-top: 1.25rem;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(255,107,53,.35);
}

.plan-url-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,107,53,.45);
}

/* ============================================================
   RATING WIDGET
   ============================================================ */
.rating-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.rating-big-score {
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    color: var(--orange);
    line-height: 1;
}

.rating-big-score span { font-size: 1.5rem; color: var(--text-muted); }

.rating-info p { color: var(--text-muted); font-size: .9rem; font-weight: 600; }

.rating-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: .4rem;
    width: 120px;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--yellow), var(--orange));
    border-radius: 4px;
    transition: width .6s ease;
}

.vote-widget { margin-top: 1rem; }

.vote-title {
    font-weight: 800;
    font-size: .95rem;
    margin-bottom: .75rem;
    color: var(--text);
}

.vote-stars {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.vote-star {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #f9f9f9;
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-mid);
}

.vote-star.active,
.vote-star:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    color: #333;
    transform: scale(1.15);
}

.vote-label {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-mid);
    min-height: 1.2em;
    transition: color .2s;
}

.rating-updated { animation: pulse .4s ease; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-section {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.plan-section-title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.comment-form { margin-bottom: 2rem; }

.comment-textarea {
    width: 100%;
    padding: .85rem 1rem;
    border: 2px solid #e6e6ec;
    border-radius: var(--radius);
    font-family: 'Nunito', sans-serif;
    font-size: .95rem;
    resize: vertical;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: #fff;
    color: var(--text);
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(199,125,255,.15);
}

.comments-list { display: flex; flex-direction: column; gap: 1.25rem; }

.comment-thread {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.comment-item {
    display: flex;
    gap: .9rem;
    padding: 1.1rem 1.15rem;
    background: #fff;
    border: 1px solid #ececf2;
    border-radius: var(--radius);
    animation: fadeInUp .35s ease;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.comment-item:hover {
    border-color: #e0d6ff;
    box-shadow: 0 4px 14px rgba(199,125,255,.1);
}

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

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.comment-body { flex: 1; min-width: 0; }

.comment-head {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    flex-wrap: wrap;
    margin-bottom: .2rem;
}

.comment-username {
    font-weight: 800;
    font-size: .92rem;
    color: var(--text);
}

.comment-date {
    font-size: .76rem;
    color: var(--text-muted);
    font-weight: 600;
}

.comment-content {
    font-size: .92rem;
    color: var(--text);
    line-height: 1.55;
    word-wrap: break-word;
}

.comment-actions {
    margin-top: .55rem;
    display: flex;
    gap: .5rem;
}

.comment-actions,
.comment-reply-form { display: none !important; }

.comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: transparent;
    border: 1.5px solid #ececf2;
    color: var(--text-mid);
    border-radius: 999px;
    padding: .3rem .85rem;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}
.comment-reply-btn__icon {
    font-size: .95rem;
    line-height: 1;
}
.comment-reply-btn:hover {
    background: #f5edff;
    border-color: var(--purple);
    color: var(--purple);
    transform: translateY(-1px);
}

/* Reply form */
.comment-reply-form {
    margin-left: 3rem;
    background: #fafaff;
    border: 1.5px solid #e8e1ff;
    border-left: 4px solid var(--purple);
    border-radius: var(--radius);
    padding: 1rem 1.1rem 1.1rem;
    animation: slideDown .3s ease;
}
.comment-reply-form[hidden] { display: none; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.comment-reply-form__hint {
    font-size: .78rem;
    color: var(--text-mid);
    font-weight: 700;
    margin-bottom: .55rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.comment-reply-form__hint strong {
    color: var(--purple);
    font-weight: 800;
}
.comment-reply-form__hint span {
    color: var(--purple);
    font-size: 1.1rem;
    line-height: 1;
}

.comment-reply-textarea {
    border-radius: 12px;
    font-size: .9rem;
    padding: .7rem .9rem;
    background: #fff;
}

.comment-reply-actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: .65rem;
    align-items: center;
}

.btn-cancel-reply {
    background: transparent;
    border: none;
    color: var(--text-mid);
    font-weight: 800;
    font-size: .82rem;
    cursor: pointer;
    padding: .5rem .85rem;
    border-radius: 999px;
    transition: all var(--transition);
    font-family: inherit;
}
.btn-cancel-reply:hover {
    background: #ececf2;
    color: var(--text);
}

.btn-reply-submit {
    padding: .5rem 1.1rem;
    font-size: .82rem;
}

/* Replies thread */
.comment-replies {
    position: relative;
    margin-left: 3rem;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.comment-replies::before {
    content: '';
    position: absolute;
    top: .6rem;
    bottom: .6rem;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--purple), var(--pink), transparent);
    border-radius: 999px;
}

.comment-reply-wrapper { position: relative; }

.comment-item--reply {
    padding: .8rem .9rem;
    background: #fafaff;
    border-color: #ececf2;
}
.comment-item--reply .comment-avatar {
    width: 34px;
    height: 34px;
}
.comment-item--reply .comment-username {
    font-size: .85rem;
}
.comment-item--reply .comment-content {
    font-size: .87rem;
}

.comment-reply-hidden { display: none !important; }

.comment-show-more-btn {
    align-self: flex-start;
    margin-top: .25rem;
    background: #f5edff;
    border: 1.5px dashed var(--purple);
    color: var(--purple);
    font-weight: 800;
    font-size: .8rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: all var(--transition);
    font-family: inherit;
}
.comment-show-more-btn:hover {
    background: var(--purple);
    color: #fff;
    border-style: solid;
}

/* ============================================================
   PROVINCE CARDS
   ============================================================ */
.provinces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.province-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.province-card:hover {
    border-color: var(--orange);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    color: var(--orange);
}

.province-emoji { font-size: 2rem; }
.province-name { font-weight: 800; font-size: .95rem; }
.province-count { font-size: .8rem; color: var(--text-muted); font-weight: 600; }

/* ============================================================
   FEATURED CAROUSEL (horizontal scroll)
   ============================================================ */
.featured-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--orange) #f0f0f0;
    padding-bottom: .75rem;
    scroll-snap-type: x mandatory;
}

.featured-scroll .plan-card {
    min-width: 280px;
    scroll-snap-align: start;
    flex-shrink: 0;
}

/* ============================================================
   FORMS
   ============================================================ */
.auth-container {
    max-width: 440px;
    margin: 3rem auto;
    padding: 0 1.25rem;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.auth-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.form-group { margin-bottom: 1.1rem; }

.form-label {
    display: block;
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .4rem;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: .7rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: 'Nunito', sans-serif;
    transition: border-color var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--orange);
}

.form-error {
    font-size: .8rem;
    color: var(--red);
    margin-top: .3rem;
    font-weight: 600;
}

.form-error-msg {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .35rem;
    padding: .4rem .7rem;
    background: #fff0f0;
    border-left: 3px solid var(--red);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #c0392b;
    font-size: .82rem;
    font-weight: 700;
}

.form-group:has(.form-error-msg) .form-control {
    border-color: var(--red);
    background: #fffafa;
}

.form-group:has(.form-error-msg) .form-control:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(255,71,87,.15);
}

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash-container {
    max-width: 1280px;
    margin: 1rem auto 0;
    padding: 0 1.25rem;
}

.flash {
    padding: .8rem 1.2rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    animation: slideDown .3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success { background: #E8F8EE; color: #1E8038; border-left: 4px solid #6BCB77; }
.flash-error   { background: #FFE8E8; color: #C0392B; border-left: 4px solid #FF4757; }
.flash-info    { background: #E8F4FF; color: #2667CC; border-left: 4px solid #4D96FF; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span,
.pagination .pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .75rem;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: .9rem;
    font-family: inherit;
    transition: all var(--transition);
    border: 2px solid #e0e0e0;
    background: #fff;
    color: var(--text-mid);
    text-decoration: none;
    cursor: pointer;
}

.pagination a:hover,
.pagination .pag-btn:hover:not(:disabled):not(.is-current) {
    border-color: var(--orange);
    color: var(--orange);
    transform: translateY(-1px);
}

.pagination .current,
.pagination .pag-btn.is-current {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    cursor: default;
}

.pagination .pag-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.pagination .pag-arrow {
    padding: 0 1rem;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
    padding: .75rem 0;
    font-size: .85rem;
    color: #111111;
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

.breadcrumbs a { color: var(--orange); font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--bg-dark);
    color: #b2bec3;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .logo-text { color: #fff; -webkit-text-fill-color: #fff; }
.footer-brand p { margin-top: .75rem; font-size: .9rem; line-height: 1.7; }

.footer-heading {
    color: #fff;
    font-weight: 800;
    font-size: .95rem;
    margin-bottom: .75rem;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a {
    font-size: .9rem;
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--orange); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 1.5rem;
    text-align: center;
    font-size: .83rem;
}

/* ============================================================
   LOADING SPINNER (for Live Component)
   ============================================================ */
[data-live-component] [data-loading] { display: none; }
[data-live-component].loading [data-loading] { display: flex; }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin .8s linear infinite;
    margin: 2rem auto;
}

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

/* ============================================================
   HAMBURGER / MOBILE NAV
   ============================================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: .45rem .5rem;
    background: none;
    border: 1.5px solid #e0e0e0;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all .25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    border-bottom: 3px solid var(--orange);
    padding: .6rem 1.25rem 1rem;
    gap: .3rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    position: sticky;
    top: 56px;
    z-index: 999;
}
.mobile-nav.open { display: flex; }

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem .75rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .95rem;
    color: var(--text);
    text-decoration: none;
    transition: background var(--transition);
}
.mobile-nav-link:hover { background: var(--bg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    /* Container padding mobile */
    .container { padding: 0 1rem; }

    /* Header */
    .header-inner {
        flex-wrap: nowrap;
        gap: .5rem;
        padding: .6rem 1rem;
    }
    .header-search { flex: 1; max-width: none; }
    .header-nav { display: none; }
    .hamburger { display: flex; }

    /* Hero */
    .hero { padding: 2rem 1rem 1.75rem; }
    .hero-title { font-size: clamp(1.75rem, 7vw, 3rem); }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 1.25rem; margin-top: 1.25rem; }
    .hero-stat-number { font-size: 1.5rem; }

    /* Sections */
    .section { padding: 1.75rem 0; }
    .section-title { font-size: 1.4rem; }

    /* Plan detail */
    .plan-detail { padding: .75rem 0 1.5rem; }
    .plan-layout { grid-template-columns: 1fr; gap: 1.25rem; }
    .plan-info-card { position: static; padding: 1.1rem; }
    .plan-info-title { font-size: 1.1rem; margin-bottom: .75rem; }
    .plan-hero-img { height: 220px; border-radius: var(--radius); margin-bottom: 1rem; }
    .plan-hero-placeholder { height: 140px; font-size: 3rem; margin-bottom: 1rem; }
    .plan-gallery { margin-bottom: 1rem; padding: 0 .5rem; }
    .gallery-main { height: 220px; }
    .plan-title { font-size: 1.4rem; margin-bottom: .5rem; }
    .plan-title-area { margin-bottom: .75rem; padding: 0 .5rem; }
    .plan-meta-badges { gap: .35rem; }
    .plan-meta-badges .badge { font-size: .75rem; padding: .2rem .55rem; }
    .plan-description { font-size: .92rem; line-height: 1.65; margin-bottom: 1rem; padding: 0 .5rem; }
    .breadcrumbs { font-size: .78rem; padding: .5rem .5rem; gap: .3rem; }
    .plan-url-btn { padding: .7rem; font-size: .9rem; margin-top: 1rem; }
    .info-row { padding: .5rem 0; font-size: .84rem; }
    .info-value { max-width: none !important; text-align: right; }

    /* Section titles mobile */
    .plan-section-title { font-size: 1.15rem; margin-bottom: .75rem; }

    /* Comments mobile */
    .comment-item { padding: .85rem .9rem; gap: .65rem; }
    .comment-avatar { width: 38px; height: 38px; }
    .comment-textarea { font-size: .9rem; padding: .7rem .85rem; }
    .comment-reply-form { margin-left: 1.25rem; padding: .85rem .9rem 1rem; }
    .comment-replies { margin-left: 1.25rem; padding-left: .85rem; }
    .comment-item--reply .comment-avatar { width: 30px; height: 30px; }

    /* Community photos mobile */
    .plan-community-photos { margin-bottom: 1.25rem !important; padding: 0 .5rem; }
    .user-photos-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important; gap: .5rem !important; }

    /* Related plans mobile */
    .plan-related { margin-top: 1.5rem !important; padding: 1.25rem .5rem 0 !important; }

    /* Photo upload form mobile */
    .photo-upload-form { padding: .9rem !important; }
    .photo-upload-form p { font-size: .85rem !important; }

    /* Sidebar map iframe mobile */
    .plan-detail aside iframe { height: 180px !important; }

    /* Rating */
    .rating-display { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .rating-big-score { font-size: 3rem; }

    /* Provinces grid */
    .provinces-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
    .province-card { padding: 1.1rem .75rem; }
    .province-emoji { font-size: 1.5rem; }

    /* Auth */
    .auth-container { margin: 1.5rem auto; }
    .auth-card { padding: 1.5rem 1.25rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .site-footer { padding: 2rem 0 1.25rem; margin-top: 2rem; }

    /* Featured scroll */
    .featured-scroll .plan-card { min-width: 240px; }

    /* Plans filter container: no top padding on mobile */
    .plans-filter-container { padding-top: 0; }

    /* Filters */
    .filter-panel { padding: .9rem; }
    .filter-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
    .filter-field label { font-size: .75rem; }
    .filter-select, .filter-input { padding: .5rem .7rem; font-size: .85rem; }
}

@media (max-width: 480px) {
    /* Plans */
    .plans-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .plans-grid .card-body { padding: .7rem .7rem .5rem; gap: .4rem; }
    .plans-grid .card-title { font-size: .85rem; }
    .plans-grid .card-excerpt { display: none; }
    .plans-grid .card-badges { gap: .25rem; }
    .plans-grid .badge { font-size: .65rem; padding: .15rem .4rem; }
    .plans-grid .card-footer { padding: .5rem .7rem; }
    .plans-grid .card-location { font-size: .7rem; }
    .plans-grid .btn-card { padding: .3rem .6rem; font-size: .72rem; }
    .plans-grid .card-rating { display: none; }
    .plans-grid .btn-card { display: none; }
    .plans-grid .card-rating-overlay { display: block; }
    .filter-grid { grid-template-columns: 1fr; gap: .6rem; }

    /* Logo text hide on very small */
    .logo-text { font-size: 1.2rem; }

    /* Province hero */
    .province-card { padding: .9rem .5rem; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }

    /* Search */
    .search-box input { font-size: .88rem; padding: .5rem .8rem .5rem 2.4rem; }

    /* Plan detail extra small */
    .plan-detail { padding: .75rem 0 1.25rem; }
    .gallery-main { height: 180px; }
    .plan-title { font-size: 1.25rem; }
    .plan-description { font-size: .88rem; }
    .rating-big-score { font-size: 2.5rem; }
    .user-photos-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .comment-item { gap: .55rem; }
    .comment-avatar { width: 34px; height: 34px; }
    .comment-reply-form { margin-left: .75rem; }
    .comment-replies { margin-left: .75rem; padding-left: .65rem; }
}

/* ============================================================
   UTILS
   ============================================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: .5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-results-emoji { font-size: 4rem; display: block; margin-bottom: 1rem; }
.no-results h3 { font-size: 1.4rem; color: var(--text-mid); margin-bottom: .5rem; }

@media (max-width: 640px) {
    .no-results { padding: 1.25rem 1rem !important; }
    .no-results-emoji { font-size: 2.2rem; margin-bottom: .4rem; }
    .no-results h3 { font-size: 1.05rem; margin-bottom: .25rem; }
    .no-results p { font-size: .88rem; margin: 0; }
}

/* ============================================================
   FILTER TOGGLE (mobile collapsible)
   ============================================================ */
.filter-toggle {
    display: none;
    width: 100%;
    background: none;
    border: none;
    padding: 0 0 .75rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .95rem;
    color: var(--text);
    cursor: pointer;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: .75rem;
}
.filter-toggle-arrow { font-size: .7rem; transition: transform .2s; }
.filter-toggle[aria-expanded="false"] .filter-toggle-arrow { transform: rotate(180deg); }

@media (max-width: 768px) {
    .filter-toggle {
        display: flex;
        padding: .6rem .75rem;
        background: var(--bg);
        border: 2px solid #e8e8e8;
        border-radius: var(--radius);
        margin-bottom: .75rem;
        font-size: .9rem;
    }
    .filter-grid.collapsed { display: none; }
    .filter-actions { margin-top: .5rem; }
    .filter-actions .btn-ghost { width: 100%; justify-content: center; font-size: .85rem; padding: .5rem; }
    .btn-proximity { width: 100%; justify-content: center; }
    .proximity-controls { width: 100%; justify-content: space-between; }
}

/* ============================================================
   PROXIMITY FILTER
   ============================================================ */
.proximity-bar {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.btn-proximity {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    background: linear-gradient(135deg, #4D96FF, #2667CC);
    color: #fff;
    border: none;
    border-radius: var(--radius-xl);
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: .88rem;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 3px 10px rgba(77,150,255,.35);
    white-space: nowrap;
}
.btn-proximity:hover { transform: translateY(-2px); box-shadow: 0 5px 16px rgba(77,150,255,.45); }
.btn-proximity:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.proximity-controls {
    display: flex;
    align-items: center;
    gap: .4rem;
    background: #EBF3FF;
    border: 1.5px solid #4D96FF;
    border-radius: var(--radius-xl);
    padding: .25rem .25rem .25rem .75rem;
}

.proximity-select {
    background: transparent !important;
    border: none !important;
    font-weight: 800;
    color: #2667CC;
    font-size: .88rem;
    padding: .2rem .4rem !important;
    cursor: pointer;
}
.proximity-select:focus { outline: none; }

.btn-proximity-clear {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #4D96FF;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
    flex-shrink: 0;
}
.btn-proximity-clear:hover { background: #C0392B; }

/* ============================================================
   HERO PROVINCES (chips inside hero)
   ============================================================ */
.hero-provinces {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-top: 1.75rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero-province-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .85rem;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(6px);
    border: 1.5px solid rgba(255,255,255,0.9);
    border-radius: var(--radius-xl);
    font-size: .82rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.hero-province-chip:hover {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,53,.3);
}

@media (max-width: 480px) {
    .hero-provinces { gap: .4rem; margin-top: 1.25rem; }
    .hero-province-chip { font-size: .78rem; padding: .3rem .7rem; }
}

/* ── Email Verification Banner ── */
.verification-banner {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border-bottom: 2px solid var(--orange);
    padding: .75rem 1rem;
}

.verification-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.verification-banner-text {
    color: #5D4037;
    font-size: .9rem;
    font-weight: 600;
}

.verification-banner-btn {
    background: var(--orange);
    color: #fff;
    border: none;
    padding: .45rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}

.verification-banner-btn:hover {
    background: #e55a2b;
}

@media (max-width: 600px) {
    .verification-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: .5rem;
    }
    .verification-banner-text { font-size: .82rem; }
}

/* ---- PWA Install Banner ---- */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card);
    border-top: 2px solid var(--orange);
    box-shadow: 0 -4px 20px rgba(0,0,0,.12);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: pwa-slide-up .3s ease;
}

.pwa-install-banner[hidden] { display: none; }

@keyframes pwa-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.pwa-install-banner__content {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex: 1;
    min-width: 0;
}

.pwa-install-banner__icon { font-size: 1.5rem; flex-shrink: 0; }

.pwa-install-banner__text {
    font-size: .95rem;
    line-height: 1.3;
    color: var(--text);
}

.pwa-install-banner__actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.pwa-install-banner__btn {
    border: none;
    border-radius: var(--radius-sm);
    padding: .5rem 1rem;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.pwa-install-banner__btn--install {
    background: var(--orange);
    color: #fff;
}

.pwa-install-banner__btn--install:hover {
    background: #e55a28;
    transform: translateY(-1px);
}

.pwa-install-banner__btn--dismiss {
    background: transparent;
    color: var(--text-mid);
}

.pwa-install-banner__btn--dismiss:hover {
    color: var(--text);
}

@media (max-width: 480px) {
    .pwa-install-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .pwa-install-banner__content { justify-content: center; }
    .pwa-install-banner__actions { justify-content: center; }
}

/* ---- Offline indicator ---- */
.offline-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: var(--red);
    color: #fff;
    text-align: center;
    font-size: .8rem;
    font-weight: 700;
    padding: .35rem;
}

body.is-offline .offline-bar {
    display: block;
}

body.is-offline .site-header {
    margin-top: 30px;
}

/* ───────── Share bar (plan detail) ───────── */
.share-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 1rem 0 1.5rem;
}

@media (max-width: 640px) {
    .share-bar {
        justify-content: center;
    }
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    filter: brightness(1.08);
}

.share-btn:active {
    transform: translateY(0);
}

.share-btn svg {
    display: block;
}

.share-btn--whatsapp  { background: #25D366; }
.share-btn--facebook  { background: #1877F2; }
.share-btn--twitter   { background: #000000; }
.share-btn--telegram  { background: #0088CC; }
.share-btn--copy      { background: var(--orange, #ff7043); }
.share-btn--native    { background: #6B7280; }

.share-btn--copied {
    background: #1E8038 !important;
}

.share-native.hidden {
    display: none;
}

/* ============================================================
   USER MENU (dropdown de usuario en el header)
   ============================================================ */
.user-menu {
    position: relative;
    margin-left: .35rem;
}

.user-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .3rem .7rem .3rem .3rem;
    background: var(--bg);
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    color: var(--text);
    font: inherit;
    font-weight: 600;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
    position: relative;
}
.user-menu-btn:hover,
.user-menu.is-open .user-menu-btn {
    background: #fff;
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.user-menu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-menu-name {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .92rem;
}

.user-menu-caret {
    color: var(--text-mid);
    transition: transform var(--transition);
    flex-shrink: 0;
}
.user-menu.is-open .user-menu-caret {
    transform: rotate(180deg);
}

.user-menu-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, .4);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + .6rem);
    right: 0;
    min-width: 280px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);
    z-index: 100;
    overflow: hidden;
    animation: user-menu-in .16s ease-out;
}

@keyframes user-menu-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.user-menu-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(255, 125, 64, .08), rgba(255, 125, 64, .02));
    border-bottom: 1px solid var(--border);
}

.user-menu-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.user-menu-header-info {
    min-width: 0;
    flex: 1;
}

.user-menu-header-name {
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-header-email {
    font-size: .8rem;
    color: var(--text-mid);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-items {
    padding: .4rem 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1.1rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    transition: background var(--transition), color var(--transition);
}
.user-menu-item:hover {
    background: var(--bg);
    color: var(--orange);
}

.user-menu-item-icon {
    font-size: 1.05rem;
    width: 1.3rem;
    text-align: center;
    flex-shrink: 0;
}

.user-menu-item-label {
    flex: 1;
}

.user-menu-item-badge {
    background: #ef4444;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 .4rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.user-menu-item-badge[hidden] { display: none; }

.user-menu-badge-pulse {
    animation: user-menu-pulse .6s ease-out 2;
}
@keyframes user-menu-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.user-menu-separator {
    height: 1px;
    background: var(--border);
    margin: .2rem 0;
}

.user-menu-item--logout {
    color: var(--text-mid);
}
.user-menu-item--logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

@media (max-width: 560px) {
    .user-menu-name { display: none; }
    .user-menu-dropdown {
        min-width: 260px;
        right: -.25rem;
    }
}

/* ============================================================
   Achievements page (/logros)
   ============================================================ */

.achievements-page {
    padding-bottom: 4rem;
}

/* ---- Hero ---- */
.achievements-hero {
    position: relative;
    background: linear-gradient(135deg, #ffb347 0%, var(--pink) 35%, var(--purple) 70%, var(--blue) 100%);
    color: #fff;
    overflow: hidden;
    padding: 3.5rem 1.25rem 4rem;
    text-align: center;
}

.achievements-hero::before,
.achievements-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .35;
    pointer-events: none;
}
.achievements-hero::before {
    width: 320px; height: 320px;
    background: var(--yellow);
    top: -120px; left: -80px;
}
.achievements-hero::after {
    width: 360px; height: 360px;
    background: #fff;
    bottom: -160px; right: -100px;
}

.achievements-hero__inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    z-index: 1;
}

.achievements-hero__sparkles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    font-size: 1.5rem;
}
.achievements-hero__sparkles span {
    position: absolute;
    opacity: .9;
    animation: floatSparkle 6s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.2));
}
.achievements-hero__sparkles span:nth-child(1) { top: 5%;  left: 8%;  animation-delay: 0s;   font-size: 1.8rem; }
.achievements-hero__sparkles span:nth-child(2) { top: 12%; right: 10%; animation-delay: 1s;   font-size: 2.2rem; }
.achievements-hero__sparkles span:nth-child(3) { bottom: 18%; left: 5%; animation-delay: 2s;  font-size: 1.6rem; }
.achievements-hero__sparkles span:nth-child(4) { bottom: 8%; right: 12%; animation-delay: 1.5s; font-size: 2rem; }
.achievements-hero__sparkles span:nth-child(5) { top: 38%; left: 2%; animation-delay: 2.5s; font-size: 1.4rem; }
.achievements-hero__sparkles span:nth-child(6) { top: 30%; right: 4%; animation-delay: 3s; font-size: 1.7rem; }

@keyframes floatSparkle {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-12px) rotate(8deg); }
}

.achievements-hero__title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: .5rem;
    text-shadow: 0 4px 20px rgba(0,0,0,.2);
    display: inline-flex;
    align-items: center;
    gap: .75rem;
}
.achievements-hero__trophy {
    display: inline-block;
    animation: bounceTrophy 2.4s ease-in-out infinite;
    font-size: 1.1em;
}
@keyframes bounceTrophy {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-8px) rotate(4deg); }
}

.achievements-hero__subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    opacity: .95;
    margin-bottom: 2rem;
}

.achievements-hero__progress {
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem 1.25rem;
    max-width: 460px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}

.achievements-hero__counter {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: .35rem;
    margin-bottom: 1rem;
    font-family: 'Fredoka One', cursive;
}
.achievements-hero__big {
    font-size: 3.5rem;
    line-height: 1;
    text-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.achievements-hero__sep {
    font-size: 2rem;
    opacity: .6;
}
.achievements-hero__total {
    font-size: 2rem;
    opacity: .85;
}

.achievements-progress {
    position: relative;
    height: 22px;
    background: rgba(0,0,0,.18);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,.2);
}
.achievements-progress__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--yellow), var(--orange), var(--pink));
    border-radius: 999px;
    transition: width 1.2s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 0 18px rgba(255,217,61,.7);
    position: relative;
    overflow: hidden;
}
.achievements-progress__fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
    animation: progressShine 2.4s linear infinite;
}
@keyframes progressShine {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.achievements-progress__label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .8rem;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.4);
}

.achievements-hero__hint,
.achievements-hero__complete {
    margin-top: 1rem;
    font-size: .9rem;
    font-weight: 600;
    opacity: .95;
}
.achievements-hero__complete {
    font-size: 1rem;
    font-weight: 800;
}

.achievements-hero__cta {
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 360px;
    margin: 0 auto;
}
.achievements-hero__cta p {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* ---- Content ---- */
.achievements-content {
    max-width: 1080px;
    margin: -2rem auto 0;
    padding: 0 1.25rem;
    position: relative;
    z-index: 2;
}

.achievements-category {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.achievements-category__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px dashed #f0f0f0;
}
.achievements-category__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--cat-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.achievements-category__text {
    flex: 1;
    min-width: 0;
}
.achievements-category__title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.35rem;
    color: var(--text);
    margin-bottom: .15rem;
}
.achievements-category__tagline {
    font-size: .85rem;
    color: var(--text-mid);
    font-weight: 500;
}
.achievements-category__count {
    font-family: 'Fredoka One', cursive;
    font-size: 1.6rem;
    color: var(--cat-color);
    flex-shrink: 0;
}
.achievements-category__count span {
    font-size: 1rem;
    color: var(--text-muted);
}

/* ---- Grid + cards ---- */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.achievement-card {
    position: relative;
    background: #fff;
    border: 2px solid #f0f0f0;
    border-radius: var(--radius);
    padding: 1.25rem 1rem 1.1rem;
    text-align: center;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.achievement-card.is-unlocked {
    border-color: var(--cat-color);
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.92) 100%);
    box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
.achievement-card.is-unlocked::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--cat-color);
    opacity: .08;
    pointer-events: none;
}
.achievement-card.is-unlocked:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
}

.achievement-card.is-locked {
    background: #fafafa;
    filter: grayscale(.8);
    opacity: .7;
}
.achievement-card.is-locked:hover {
    opacity: .85;
    transform: translateY(-2px);
}

.achievement-card__shine {
    position: absolute;
    top: -50%;
    left: -60%;
    width: 60%;
    height: 200%;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
    transform: rotate(8deg);
    opacity: 0;
    transition: opacity .4s ease, left .8s ease;
    pointer-events: none;
}
.achievement-card.is-unlocked:hover .achievement-card__shine {
    opacity: 1;
    left: 130%;
}

.achievement-card__icon {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto .85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: #fff;
    z-index: 1;
}
.achievement-card.is-unlocked .achievement-card__icon {
    background: radial-gradient(circle at 30% 30%, #fff, #fff 50%, var(--cat-color) 200%);
    box-shadow: 0 0 0 4px rgba(255,255,255,.6), 0 8px 22px rgba(0,0,0,.15);
    animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}
.achievement-card__lock {
    font-size: 1.5rem;
    opacity: .6;
}

.achievement-card__name {
    position: relative;
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: .35rem;
    z-index: 1;
}
.achievement-card__desc {
    position: relative;
    font-size: .8rem;
    color: var(--text-mid);
    line-height: 1.4;
    font-weight: 500;
    z-index: 1;
}
.achievement-card__badge {
    position: relative;
    display: inline-block;
    margin-top: .85rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: var(--cat-color);
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0,0,0,.15);
    z-index: 1;
}

/* ---- Comunidad ---- */
.achievements-community {
    max-width: 1080px;
    margin: 3rem auto 0;
    padding: 0 1.25rem;
}

.achievements-community__inner {
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #fff8f2 50%, #fff0f5 100%);
    border-radius: var(--radius-xl);
    padding: 3rem 1.75rem 2.5rem;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    text-align: center;
}
.achievements-community__inner::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(199,125,255,.22), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.achievements-community__inner::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 240px; height: 240px;
    background: radial-gradient(circle, rgba(255,107,157,.2), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.achievements-community__emojis {
    display: flex;
    justify-content: center;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    font-size: 2rem;
    position: relative;
}
.achievements-community__emojis span {
    display: inline-block;
    animation: floatFamily 4s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.1));
}
.achievements-community__emojis span:nth-child(2) { animation-delay: .4s; }
.achievements-community__emojis span:nth-child(3) { animation-delay: .8s; }
.achievements-community__emojis span:nth-child(4) { animation-delay: 1.2s; }
.achievements-community__emojis span:nth-child(5) { animation-delay: 1.6s; }
.achievements-community__emojis span:nth-child(6) { animation-delay: 2s; }
@keyframes floatFamily {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.achievements-community__title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    background: linear-gradient(135deg, var(--orange), var(--pink), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.15;
    position: relative;
}

.achievements-community__lead {
    max-width: 640px;
    margin: 0 auto 2.5rem;
    color: var(--text-mid);
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 500;
    position: relative;
}
.achievements-community__lead strong {
    color: var(--text);
    font-weight: 800;
}

.achievements-community__pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    position: relative;
    text-align: left;
}

.community-pillar {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.25rem 1.1rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid #f3f3f3;
}
.community-pillar:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.community-pillar__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: .75rem;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.community-pillar h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    margin-bottom: .35rem;
    color: var(--text);
}
.community-pillar p {
    font-size: .85rem;
    color: var(--text-mid);
    line-height: 1.5;
    font-weight: 500;
}

.achievements-community__closing {
    max-width: 620px;
    margin: 0 auto 1.75rem;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 600;
    position: relative;
}
.achievements-community__closing strong {
    color: var(--orange);
}

.achievements-community__actions {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

@media (max-width: 600px) {
    .achievements-hero { padding: 2.75rem 1rem 3.25rem; }
    .achievements-hero__big { font-size: 2.75rem; }
    .achievements-category { padding: 1.25rem 1rem 1.5rem; }
    .achievements-category__head { gap: .75rem; }
    .achievements-category__icon { width: 48px; height: 48px; font-size: 1.5rem; }
    .achievements-category__title { font-size: 1.1rem; }
    .achievements-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
    .achievement-card { padding: 1rem .75rem .9rem; }
    .achievement-card__icon { width: 54px; height: 54px; font-size: 1.65rem; }
    .achievement-card__name { font-size: .92rem; }
    .achievements-community__inner { padding: 2.25rem 1.25rem 2rem; }
}

/* ============================================================
   Profile page (/perfil)
   ============================================================ */

.profile-page { padding-bottom: 4rem; }

/* ---- Hero ---- */
.profile-hero {
    position: relative;
    background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 50%, var(--orange) 100%);
    padding: 3rem 1rem 6rem;
    overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute;
    top: -120px; left: -120px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(255,255,255,.35), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.profile-hero::after {
    content: '';
    position: absolute;
    bottom: -160px; right: -120px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(255,217,61,.35), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.profile-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    font-size: 1.5rem;
}
.profile-hero__bg span {
    position: absolute;
    opacity: .8;
    animation: floatSparkle 6s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.15));
}
.profile-hero__bg span:nth-child(1) { top: 12%; left: 10%; font-size: 1.8rem; }
.profile-hero__bg span:nth-child(2) { top: 22%; right: 12%; font-size: 1.6rem; animation-delay: 1s; }
.profile-hero__bg span:nth-child(3) { bottom: 35%; left: 6%; font-size: 1.4rem; animation-delay: 2s; }
.profile-hero__bg span:nth-child(4) { bottom: 28%; right: 8%; font-size: 1.7rem; animation-delay: 1.5s; }

.profile-hero__inner {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    z-index: 1;
}
.profile-hero__flash {
    margin-bottom: 1rem;
}

.profile-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 4rem 1.75rem 1.75rem;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    position: relative;
    margin-top: 60px;
}

.profile-card__avatar-wrap {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
}
.profile-card__avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    background: var(--bg);
}
.profile-card__level {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--yellow), var(--orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    animation: bounceTrophy 2.4s ease-in-out infinite;
}

.profile-card__name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.85rem;
    color: var(--text);
    margin-bottom: .5rem;
    line-height: 1.1;
}

.profile-card__level-info {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .85rem;
}
.profile-card__level-name {
    font-weight: 800;
    font-size: .95rem;
    color: var(--text-mid);
}

.level-badge {
    display: inline-block;
    padding: .3rem .75rem;
    border-radius: 999px;
    font-family: 'Fredoka One', cursive;
    font-size: .8rem;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 3px 10px rgba(199,125,255,.4);
    text-shadow: 0 1px 2px rgba(0,0,0,.15);
    letter-spacing: .02em;
}
.level-badge.level-1 { background: linear-gradient(135deg, #a4d7a4, var(--green)); box-shadow: 0 3px 10px rgba(107,203,119,.4); }
.level-badge.level-2 { background: linear-gradient(135deg, var(--teal), var(--blue)); box-shadow: 0 3px 10px rgba(38,222,129,.4); }
.level-badge.level-3 { background: linear-gradient(135deg, var(--blue), var(--purple)); box-shadow: 0 3px 10px rgba(77,150,255,.4); }
.level-badge.level-4 { background: linear-gradient(135deg, var(--purple), var(--pink)); box-shadow: 0 3px 10px rgba(199,125,255,.4); }
.level-badge.level-5 { background: linear-gradient(135deg, var(--pink), var(--orange)); box-shadow: 0 3px 10px rgba(255,107,157,.4); }
.level-badge.level-6 { background: linear-gradient(135deg, var(--orange), var(--yellow)); box-shadow: 0 3px 10px rgba(255,107,53,.4); }
.level-badge.level-7 { background: linear-gradient(135deg, var(--yellow), var(--orange), var(--pink)); box-shadow: 0 3px 14px rgba(255,217,61,.6); }

.profile-card__city {
    color: var(--text-mid);
    font-size: .92rem;
    font-weight: 700;
    margin-bottom: .5rem;
}
.profile-card__bio {
    color: var(--text-mid);
    font-size: .92rem;
    max-width: 380px;
    margin: .5rem auto 1.25rem;
    line-height: 1.55;
}

.profile-card__actions {
    display: flex;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- Content ---- */
.profile-content {
    max-width: 720px;
    margin: -3rem auto 0;
    padding: 0 1.25rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.profile-block {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: var(--shadow);
}

.profile-block__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed #f0f0f0;
}
.profile-block__head h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.profile-block__head h2 span {
    font-size: 1.35rem;
}
.profile-block__sub {
    font-size: .8rem;
    color: var(--text-mid);
    font-weight: 600;
}
.profile-block__link {
    color: var(--purple);
    font-weight: 800;
    font-size: .85rem;
    transition: color var(--transition);
}
.profile-block__link:hover { color: var(--pink); }

/* ---- XP block ---- */
.profile-xp__row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.profile-xp__current {
    text-align: center;
    flex-shrink: 0;
}
.profile-xp__big {
    font-family: 'Fredoka One', cursive;
    font-size: 2.4rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--orange), var(--pink), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.profile-xp__label {
    font-size: .75rem;
    color: var(--text-mid);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: .25rem;
}

.profile-xp__bar-wrap {
    flex: 1;
    min-width: 0;
}
.profile-xp__bar {
    position: relative;
    height: 22px;
    background: #f3f3f5;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,.08);
}
.profile-xp__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--yellow), var(--orange), var(--pink), var(--purple));
    border-radius: 999px;
    transition: width 1.2s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 0 16px rgba(255,107,157,.45);
    position: relative;
    overflow: hidden;
}
.profile-xp__fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
    animation: progressShine 2.4s linear infinite;
}
.profile-xp__pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .78rem;
    color: var(--text);
    text-shadow: 0 1px 2px rgba(255,255,255,.6);
}
.profile-xp__milestones {
    display: flex;
    justify-content: space-between;
    margin-top: .5rem;
    font-size: .78rem;
    color: var(--text-mid);
    font-weight: 700;
}

/* xp bar legacy styles (used elsewhere) */
.xp-bar-container {
    position: relative;
    height: 14px;
    background: #f3f3f5;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,.08);
}
.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--yellow), var(--orange), var(--pink));
    border-radius: 999px;
    transition: width .8s ease;
    box-shadow: 0 0 12px rgba(255,107,157,.4);
}

/* ---- Stats grid ---- */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}
.profile-stat {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    position: relative;
    overflow: hidden;
}
.profile-stat::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .08;
    pointer-events: none;
}
.profile-stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}
.profile-stat--purple { border-color: var(--purple); }
.profile-stat--purple::before { background: var(--purple); }
.profile-stat--orange { border-color: var(--orange); }
.profile-stat--orange::before { background: var(--orange); }
.profile-stat--pink { border-color: var(--pink); }
.profile-stat--pink::before { background: var(--pink); }
.profile-stat--blue { border-color: var(--blue); }
.profile-stat--blue::before { background: var(--blue); }

.profile-stat__icon {
    font-size: 1.85rem;
    margin-bottom: .35rem;
    position: relative;
}
.profile-stat__num {
    font-family: 'Fredoka One', cursive;
    font-size: 1.85rem;
    line-height: 1;
    color: var(--text);
    position: relative;
}
.profile-stat__num--small {
    font-size: 1rem;
    line-height: 1.2;
}
.profile-stat__label {
    font-size: .78rem;
    color: var(--text-mid);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: .35rem;
    position: relative;
}

/* ---- Achievements list ---- */
.profile-achievements__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .85rem;
}
.profile-achievement {
    background: linear-gradient(180deg, #fff, #fffaf3);
    border: 2px solid #f0e6d6;
    border-radius: var(--radius);
    padding: 1rem .65rem .85rem;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: default;
}
.profile-achievement:hover {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: 0 10px 24px rgba(255,170,80,.25);
    border-color: var(--orange);
}
.profile-achievement__icon {
    font-size: 2rem;
    margin-bottom: .35rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.1));
}
.profile-achievement__name {
    font-family: 'Fredoka One', cursive;
    font-size: .82rem;
    color: var(--text);
    line-height: 1.2;
}

.profile-achievements__more {
    margin-top: 1rem;
    text-align: center;
    font-size: .85rem;
    color: var(--text-mid);
    font-weight: 600;
}
.profile-achievements__more a {
    color: var(--purple);
    font-weight: 800;
}

.profile-achievements__empty {
    text-align: center;
    padding: 1.5rem .5rem .5rem;
}
.profile-achievements__empty-icon {
    font-size: 3rem;
    margin-bottom: .5rem;
    animation: bounceTrophy 2.4s ease-in-out infinite;
}
.profile-achievements__empty p {
    color: var(--text-mid);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ---- Quick links ---- */
.profile-quicklinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.profile-quicklink {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f3f3f3;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    text-align: left;
}
.profile-quicklink:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--purple);
}
.profile-quicklink__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.profile-quicklink h3 {
    font-family: 'Fredoka One', cursive;
    font-size: .98rem;
    color: var(--text);
    margin-bottom: .15rem;
}
.profile-quicklink p {
    font-size: .8rem;
    color: var(--text-mid);
    line-height: 1.4;
    font-weight: 500;
}

@media (max-width: 600px) {
    .profile-hero { padding: 2.25rem .75rem 5rem; }
    .profile-card { padding: 3.5rem 1.25rem 1.5rem; }
    .profile-card__avatar-wrap,
    .profile-card__avatar { width: 100px; height: 100px; }
    .profile-card__avatar-wrap { top: -50px; }
    .profile-card__name { font-size: 1.55rem; }
    .profile-content { padding: 0 1rem; gap: 1rem; }
    .profile-block { padding: 1.25rem 1.1rem 1.4rem; }
    .profile-xp__row { flex-direction: column; gap: 1rem; align-items: stretch; }
    .profile-xp__current { display: flex; align-items: baseline; justify-content: center; gap: .5rem; }
    .profile-xp__big { font-size: 1.85rem; }
    .profile-stats { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
    .profile-stat { padding: 1rem .75rem; }
    .profile-stat__icon { font-size: 1.55rem; }
    .profile-stat__num { font-size: 1.55rem; }
    .profile-achievements__grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .65rem; }
    .profile-block__head { flex-direction: column; align-items: flex-start; gap: .35rem; }
}

/* ============================================================
   ADMIN — FORMULARIOS
   ============================================================ */
.admin-hero {
    background: linear-gradient(135deg, #1e1b4b, #312e81);
    padding: 1.75rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.admin-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(255,107,53,.18), transparent 65%);
    pointer-events: none;
}
.admin-hero__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-hero__title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.65rem;
    color: #fff;
    margin-bottom: .15rem;
    display: flex;
    align-items: center;
    gap: .55rem;
}
.admin-hero__subtitle {
    color: #a5b4fc;
    font-size: .9rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 520px;
}
.admin-hero__actions {
    display: flex;
    gap: .6rem;
    align-items: center;
    flex-wrap: wrap;
}
.admin-hero__link {
    color: #c7d2fe;
    text-decoration: none;
    font-weight: 700;
    font-size: .85rem;
    padding: .55rem 1rem;
    border-radius: var(--radius-xl);
    border: 1.5px solid rgba(165,180,252,.35);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.admin-hero__link:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
    border-color: rgba(255,255,255,.55);
    transform: translateY(-1px);
}

.admin-form-wrap {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 1.25rem 5rem;
}

.admin-form {
    display: grid;
    gap: 1.25rem;
}

.admin-form-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid #eef0f3;
    box-shadow: var(--shadow-sm);
    padding: 1.5rem 1.6rem;
    transition: box-shadow var(--transition);
}
.admin-form-card:hover { box-shadow: var(--shadow); }

.admin-form-card__title {
    font-family: 'Fredoka One', cursive;
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding-bottom: .7rem;
    border-bottom: 1px dashed #eef0f3;
}
.admin-form-card__title .icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--orange), #ff8c42);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    box-shadow: 0 4px 12px rgba(255,107,53,.3);
}

.admin-form-grid {
    display: grid;
    gap: 1rem;
}
.admin-form-grid--2 { grid-template-columns: 1fr 1fr; }
.admin-form-grid + .admin-form-grid { margin-top: 1rem; }

@media (max-width: 640px) {
    .admin-form-grid--2 { grid-template-columns: 1fr; }
    .admin-form-card { padding: 1.25rem 1.1rem; }
}

.admin-form-field { display: flex; flex-direction: column; min-width: 0; }
.admin-form-field__label {
    display: block;
    font-weight: 800;
    font-size: .82rem;
    color: var(--text);
    margin-bottom: .4rem;
    letter-spacing: .01em;
    text-transform: uppercase;
}
.admin-form-field__label .required { color: var(--orange); margin-left: .15rem; }
.admin-form-field__hint {
    color: var(--text-mid);
    font-weight: 500;
    font-size: .75rem;
    margin-top: .35rem;
    text-transform: none;
    letter-spacing: 0;
}

.form-input,
.form-select,
.admin-form-input,
.admin-form-select,
.admin-form-textarea {
    width: 100%;
    padding: .65rem .9rem;
    border: 1.5px solid #e4e6ec;
    border-radius: var(--radius);
    font-size: .92rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input::placeholder,
.admin-form-input::placeholder,
.admin-form-textarea::placeholder {
    color: #9aa0a6;
}
.form-input:focus,
.form-select:focus,
.admin-form-input:focus,
.admin-form-select:focus,
.admin-form-textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255,107,53,.15);
}
.admin-form-textarea { resize: vertical; line-height: 1.55; min-height: 90px; }

.form-select,
.admin-form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23636E72'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    background-size: 20px;
    padding-right: 2.3rem;
    cursor: pointer;
}

/* Toggle switch */
.admin-form-switch {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    color: var(--text);
    font-size: .9rem;
}
.admin-form-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.admin-form-switch__ui {
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    transition: background var(--transition);
    flex-shrink: 0;
}
.admin-form-switch__ui::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.25);
    transition: transform var(--transition);
}
.admin-form-switch input:checked + .admin-form-switch__ui { background: var(--orange); }
.admin-form-switch input:checked + .admin-form-switch__ui::after { transform: translateX(20px); }
.admin-form-switch input:focus-visible + .admin-form-switch__ui {
    box-shadow: 0 0 0 3px rgba(255,107,53,.25);
}

.admin-form-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
}

/* Precio */
.admin-price-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    align-items: center;
}
@media (max-width: 520px) {
    .admin-price-row { grid-template-columns: 1fr; gap: .75rem; }
}
.admin-price-row__input {
    transition: opacity var(--transition);
}
.admin-price-row__input[data-free="1"] {
    opacity: .4;
    pointer-events: none;
}
.admin-price-row__input .input-prefix {
    position: relative;
}
.admin-price-row__input .input-prefix::before {
    content: '€';
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-mid);
    font-weight: 800;
    pointer-events: none;
}
.admin-price-row__input .input-prefix input { padding-left: 1.9rem; }

/* Preview imagen */
.admin-image-preview {
    margin-top: .7rem;
    max-height: 140px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid #eef0f3;
    box-shadow: var(--shadow-sm);
}

/* Media link card */
.admin-media-link {
    border: 2px dashed #d9dde4;
    border-radius: var(--radius);
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .85rem;
    background: #fafbfc;
    text-decoration: none;
    color: inherit;
    transition: all var(--transition);
}
.admin-media-link:hover {
    border-color: var(--orange);
    background: #fff7f2;
    transform: translateY(-1px);
}
.admin-media-link__title {
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .15rem;
    font-size: .98rem;
}
.admin-media-link__meta {
    font-size: .8rem;
    color: var(--text-mid);
    font-weight: 600;
}

/* Acciones sticky */
.admin-form-actions {
    position: sticky;
    bottom: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #eef0f3;
    padding: 1rem 0;
    margin: .5rem -1.25rem 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    display: flex;
    gap: .75rem;
    align-items: center;
    z-index: 10;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.admin-form-actions__spacer { flex: 1; }
.admin-form-actions .btn-primary,
.admin-form-actions .btn-secondary { padding: .65rem 1.75rem; }

/* ============================================================
   Legal pages (privacy, cookies)
   ============================================================ */
.legal-page { padding-bottom: 3rem; }

.legal-header {
    background: linear-gradient(135deg, #f0f4ff 0%, #fef3f0 100%);
    padding: 2rem 0 2.5rem;
    margin-bottom: 2rem;
}
.legal-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2rem;
    margin: .5rem 0 .25rem;
    background: linear-gradient(135deg, var(--orange), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.legal-subtitle {
    color: var(--text-mid);
    font-size: .9rem;
    font-weight: 600;
}

.legal-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.legal-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #eef0f3;
    position: relative;
}

.legal-icon {
    font-size: 1.6rem;
    margin-bottom: .5rem;
}

.legal-card h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.25rem;
    color: var(--text);
    margin: 0 0 .75rem;
}

.legal-card p {
    color: var(--text-mid);
    line-height: 1.7;
    margin: 0 0 .75rem;
    font-size: .95rem;
}
.legal-card p:last-child { margin-bottom: 0; }

.legal-card ul {
    color: var(--text-mid);
    line-height: 1.7;
    padding-left: 1.25rem;
    margin: .5rem 0 .75rem;
    font-size: .95rem;
}
.legal-card li { margin-bottom: .4rem; }
.legal-card li strong { color: var(--text); }

/* Rights grid (privacy page) */
.legal-rights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin: 1rem 0;
}
.legal-right {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.legal-right strong {
    color: var(--orange);
    font-size: .95rem;
}
.legal-right span {
    color: var(--text-mid);
    font-size: .85rem;
    line-height: 1.5;
}

/* Cookie table (cookies page) */
.legal-cookie-table {
    margin: 1rem 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #eef0f3;
}
.legal-cookie-row {
    display: grid;
    grid-template-columns: 140px 1fr 90px;
    padding: .75rem 1rem;
    gap: 1rem;
    align-items: center;
    font-size: .9rem;
    color: var(--text-mid);
    border-bottom: 1px solid #eef0f3;
}
.legal-cookie-row:last-child { border-bottom: none; }
.legal-cookie-header {
    background: var(--bg);
    font-weight: 700;
    color: var(--text);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.legal-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
}
.legal-badge--required { background: #e8f5e9; color: #2e7d32; }
.legal-badge--pref { background: #fff3e0; color: #e65100; }
.legal-badge--analytics { background: #e3f2fd; color: #1565c0; }

@media (max-width: 640px) {
    .legal-title { font-size: 1.6rem; }
    .legal-card { padding: 1.25rem 1.25rem; }
    .legal-rights-grid { grid-template-columns: 1fr; }
    .legal-cookie-row { grid-template-columns: 1fr; gap: .25rem; padding: .6rem .75rem; }
    .legal-cookie-header { display: none; }
    .legal-cookie-row div:last-child { font-size: .8rem; color: #999; }
    .legal-cookie-row div:last-child::before { content: "Duración: "; font-weight: 600; }
}
