:root {
    --primary-color: #e21a4c;
    --primary-hover: #b8153d;
    --bg-color: #f8f9fa;
    --bg-card: #ffffff;
    --text-main: #1e1e1e;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;

    /* Header specific (always dark) */
    --header-bg: #121212;
    --header-text: #ffffff;
}

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

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: var(--header-bg);
    color: var(--header-text);
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 50px;
    /* Ajusta según el tamaño del logo */
    width: auto;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.btn-primary {
    background: var(--primary-color);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

/* Hero Section */
.hero {
    padding: 120px 0;
    color: #ffffff;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/fondo.jpg');
    background-size: cover;
    background-position: center;
    margin-bottom: 60px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--primary-color);
}

/* Hero Search */
.hero-search-wrapper {
    max-width: 900px;
    margin: 40px auto 30px;
}

.search-bar {
    background: #ffffff;
    border-radius: 50px;
    padding: 8px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    gap: 10px;
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-right: 1px solid #eee;
}

.search-input-group:last-of-type {
    border-right: none;
}

.search-input-group svg {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.search-bar input,
.search-bar select {
    border: none;
    outline: none;
    padding: 10px 5px;
    width: 100%;
    font-size: 0.95rem;
    color: var(--text-main);
    background: transparent;
}

.search-bar .btn-search {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-bar .btn-search:hover {
    background: var(--primary-hover);
}

.hero-category-pills {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
}

.cat-pill {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.cat-pill:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-3px);
}

.cat-pill svg {
    width: 18px;
    height: 18px;
}

/* Responsive Search */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        border-radius: 20px;
        padding: 15px;
    }

    .search-input-group {
        border-right: none;
        border-bottom: 1px solid #eee;
        width: 100%;
        padding: 5px 0;
    }

    .search-bar .btn-search {
        width: 100%;
        margin-top: 10px;
    }
}

/* Grid */
.section-title {
    font-size: 2.2rem;
    margin-bottom: 35px;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
    margin-top: -25px;
    margin-bottom: 30px;
}

.planes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Featured Slider */
.featured-slider-container {
    position: relative;
    overflow: hidden;
    margin-bottom: 60px;
    padding: 10px 0;
}

.featured-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px 20px 5px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.featured-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.slider-item {
    flex: 0 0 calc(25% - 22.5px);
    min-width: 280px;
}

@media (max-width: 1200px) {
    .slider-item {
        flex: 0 0 calc(33.333% - 20px);
    }
}

@media (max-width: 992px) {
    .slider-item {
        flex: 0 0 calc(50% - 15px);
    }
}

@media (max-width: 600px) {
    .slider-item {
        flex: 0 0 85%;
    }
}

.plan-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Permite que todas las tarjetas de la misma fila sean iguales */
}

.plan-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.plan-card--promoted {
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(226, 26, 76, 0.25);
    z-index: 1;
}

.promoted-star {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    color: var(--primary-color);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid rgba(226, 26, 76, 0.2);
}

.plan-img {
    position: relative;
    overflow: hidden;
    background: #e0e0e0;
    height: 250px;
    /* Altura fija para uniformidad */
}

.plan-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cubre todo el espacio sin deformar */
}

.plan-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.img-past {
    opacity: 0.6;
    filter: grayscale(80%);
}

.past-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 30px;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    border: 3px solid #fff;
    border-radius: 5px;
    z-index: 10;
    pointer-events: none;
    letter-spacing: 2px;
}

.plan-info {
    padding: 20px;
    flex-grow: 1;
    /* Empuja el contenido hacia abajo */
    display: flex;
    flex-direction: column;
}

.plan-info h3 {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.plan-description-limit {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plan-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.plan-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.1rem;
}

/* --- Responsive Adjustments --- */

@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .planes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .plan-card {
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        height: auto;
        padding: 15px 0;
    }

    .header-container {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative;
        padding-top: 15px;
        padding-bottom: 10px;
    }

    .logo {
        margin-bottom: 15px !important;
    }

    header nav {
        display: block !important;
        width: 100%;
    }

    header nav ul {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 8px 12px !important;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    header nav ul li a {
        font-size: 0.95rem;
        font-weight: 600;
        white-space: nowrap;
        color: white !important;
    }

    #sidebar-toggle {
        position: absolute !important;
        right: 15px !important;
        top: 25px !important; /* Adjust to align with logo vertically */
        transform: translateY(-50%) !important;
    }

    .logo img {
        height: 35px !important;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .planes-grid {
        grid-template-columns: 1fr;
    }

    .plan-card {
        width: 100%;
        /* 1 columna */
    }

    .popular-categories h2 {
        justify-content: center;
    }

    .categories-grid {
        justify-content: center;
    }

    .category-pill {
        flex: 1 1 calc(50% - 10px);
        min-width: 140px;
    }

    /* Responsive Admin Tables */
    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table th,
    .admin-table td,
    .admin-table tr {
        display: block;
    }

    .admin-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .admin-table tr {
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        padding: 10px;
    }

    .admin-table td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        text-align: right;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .admin-table td:before {
        position: absolute;
        left: 15px;
        width: 45%;
        text-align: left;
        font-weight: bold;
        color: var(--text-muted);
        content: attr(data-label);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .category-pill {
        flex: 1 1 100%;
    }

    .logo img {
        height: 40px;
    }
}

/* Plan Detail Specific */
.plan-detail-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* Mobile Sidebar Drawer Reset for Desktop */
.plan-sidebar-container {
    display: contents;
}

@media (max-width: 992px) {
    .plan-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Mobile Sidebar Drawer */
    .plan-sidebar-container {
        display: block !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 400px;
        max-width: 90%;
        height: 100vh;
        background: var(--bg-card);
        z-index: 2001;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: -5px 0 25px rgba(0,0,0,0.1);
        padding: 60px 20px 40px;
    }

    .plan-sidebar-container.active {
        right: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(4px);
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .sidebar-close-btn {
        position: absolute;
        top: 15px;
        right: 15px;
        cursor: pointer;
        padding: 8px;
        color: var(--text-muted);
        transition: color 0.2s;
    }

    .sidebar-close-btn:hover {
        color: var(--primary-color);
    }

    .plan-sidebar {
        position: static !important;
        top: auto !important;
        margin-top: 0;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .plan-detail-img,
    .plan-main-image-container {
        height: 380px !important;
    }

    .plan-detail-header-meta {
        flex-direction: column;
        gap: 10px !important;
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }
}

.mobile-only {
    display: none;
}

@media (max-width: 600px) {

    .plan-detail-img,
    .plan-main-image-container {
        height: 260px !important;
        border-radius: 12px !important;
    }
}

/* Header Links Persistence */
header nav ul li a {
    color: #ffffff !important;
    font-weight: 500;
}

header nav ul li a:hover {
    color: var(--primary-color) !important;
}

/* Visual Components (Light Theme) */
.info-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-pill span:first-child {
    font-size: 1.1rem;
}

.info-pill .label {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
    text-transform: uppercase;
    font-weight: 700;
}

.info-pill .value {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.85rem;
}

.primary-pill {
    background: rgba(226, 26, 76, 0.03) !important;
    border-color: rgba(226, 26, 76, 0.2) !important;
}

.primary-pill .value {
    color: var(--primary-color);
}

/* Rich Text Content (Quill) */
.ql-content {
    line-height: 1.8;
    color: var(--text-main);
}

.ql-content p {
    margin-bottom: 0.5rem;
}

.ql-content ul,
.ql-content ol {
    margin-bottom: 1.5rem;
    padding-left: 25px;
}

.ql-content li {
    margin-bottom: 8px;
    position: relative;
}

.ql-content h1,
.ql-content h2,
.ql-content h3,
.ql-content h4 {
    margin: 2rem 0 1rem;
    color: var(--text-main);
    line-height: 1.3;
}

.ql-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.ql-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.plan-sidebar {
    background: #ffffff !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Category Box (Grid view for Categories page) */

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.category-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    /* Set explicitly to 4 items per row on desktop */
    flex: 0 0 calc(25% - 15px);
    max-width: calc(25% - 15px);
}

.category-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 15px rgba(226, 26, 76, 0.1);
}

.category-icon {
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(226, 26, 76, 0.05);
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.category-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .categories-grid {
        justify-content: center;
        gap: 15px !important;
    }

    .category-box {
        flex: 1 1 calc(50% - 15px);
        max-width: calc(50% - 15px);
        min-width: 130px;
        padding: 20px 10px;
    }
}

@media (max-width: 480px) {
    .category-box {
        flex: 1 1 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

/* Drag and drop gallery styles */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.drop-zone:hover {
    border-color: var(--primary-color);
    background: rgba(226, 26, 76, 0.02);
}

.drop-zone.active {
    border-color: var(--primary-color);
    background: rgba(226, 26, 76, 0.05);
}

.drop-zone-icon {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.drop-zone-icon svg {
    width: 40px;
    height: 40px;
}

.drop-zone-text {
    font-weight: 500;
    color: var(--text-main);
}

.drop-zone-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.gallery-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.preview-img-container {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.preview-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(226, 26, 76, 0.9);
    color: white;
    font-size: 0.7rem;
    text-align: center;
    padding: 3px 0;
    font-weight: 600;
}

/* Plan Detail Gallery Styles */
.plan-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* =========================================================================
   PLANES LIST PAGE (/planes) (Civitatis Style)
   ========================================================================= */

/* Hero Section */
.planes-hero {
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
}

/* Layout */
.planes-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar */
.planes-sidebar {
    width: 25%;
    flex-shrink: 0;
}

.sidebar-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    position: sticky;
    top: 90px;
}

.sidebar-title {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Modern Pill Radio Buttons */
.modern-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.modern-radio {
    cursor: pointer;
    position: relative;
    user-select: none;
    display: inline-block;
    /* Ensure label has dimensions */
}

.modern-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Put input on top of the text */
}

.modern-radio .checkmark {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f0f2f5;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
    text-align: center;
    white-space: nowrap;
}

.modern-radio:hover .checkmark {
    background-color: #e8eaed;
    border-color: #ccc;
}

.modern-radio input:checked~.checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(226, 26, 76, 0.2);
}

/* Specific style for category checkboxes (modern style) */
.modern-checkbox .checkmark::before {
    content: '+ ';
    font-weight: bold;
}

.modern-checkbox input:checked~.checkmark::before {
    content: '✓ ';
}

/* Mobile Filter Toggles */
.filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.toggle-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    display: none;
    /* Hidden by default on desktop */
}

/* Hide toggle features on desktop */
.filter-content {
    display: flex;
}

/* Responsive sidebar filters */
@media (max-width: 900px) {
    .sidebar-title.filter-toggle {
        cursor: pointer;
    }

    .toggle-icon {
        display: block;
        /* Show on mobile */
    }

    .filter-content {
        display: none;
        /* Hidden by default on mobile */
    }

    .filter-content.active {
        display: flex;
        /* Show when active */
    }

    .toggle-icon.active {
        transform: rotate(180deg);
    }
}

/* Main Feed */
.planes-feed {
    width: 75%;
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.feed-header h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-color);
}

.feed-sort select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-color);
}

/* Horizontal Plan Card */
.listado-horizontal {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.plan-card-horizontal {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    height: 220px;
}

.plan-card-horizontal.plan-card--promoted {
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(226, 26, 76, 0.25);
}


.plan-card-horizontal:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

/* Image Wrapper */
.card-img-wrapper {
    width: 35%;
    position: relative;
    flex-shrink: 0;
    background: #e0e0e0;
}

.card-img-wrapper img,
.img-placeholder-attenuated {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-placeholder-attenuated {
    opacity: 0.15;
    filter: grayscale(100%);
    padding: 40px;
    object-fit: contain !important;
}

.badge-puntuacion {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.85rem;
}

/* Content Wrapper */
.card-content-wrapper {
    width: 65%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-header-info h3 {
    font-size: 1.35rem;
    margin: 0 0 8px 0;
}

.card-header-info h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s;
}

.card-header-info h3 a:hover {
    color: var(--primary-color);
}

.card-meta-line {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.fake-reviews {
    color: #008234;
    /* Civitatis green */
    font-weight: 500;
}

.cat-pill-small {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.plan-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.card-attributes {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0;
}

.card-attributes span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.attr-free {
    color: #008234;
    font-weight: 500;
}

/* Actions Wrapper */
.card-action-box {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.price-block {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.price-val {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
}

.price-free {
    font-size: 1.2rem;
    font-weight: bold;
    color: #008234;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .planes-layout {
        flex-direction: column;
    }

    .planes-sidebar {
        display: none !important;
    }
    .plan-sidebar-container.active .planes-sidebar {
        display: block !important;
        width: 100% !important;
    }

    .plan-sidebar-container.active .planes-sidebar .sidebar-box {
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        position: static !important;
        box-shadow: none !important;
    }

    .planes-feed {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .plan-card-horizontal {
        flex-direction: column;
        height: auto;
    }

    .card-img-wrapper {
        width: 100%;
        height: 200px;
    }

    .card-content-wrapper {
        width: 100%;
    }

    .card-action-box {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .price-block {
        text-align: center;
        margin-bottom: 10px;
    }
}

/* ==========================================================================
   ADMIN SIDEBAR LAYOUT
   ========================================================================== */

.admin-body {
    background-color: #f0f2f5 !important;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background-color: #1a1a1a;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-header img {
    height: 40px;
    width: auto;
}

.admin-sidebar-nav {
    flex-grow: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.admin-nav-group {
    margin-bottom: 25px;
}

.admin-nav-label {
    padding: 0 25px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    display: block;
}

.admin-sidebar-nav ul {
    list-style: none !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.admin-sidebar-nav ul li {
    display: block !important;
    width: 100% !important;
}

.admin-sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar-nav ul li a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
}

.admin-sidebar-nav ul li a.active {
    background: rgba(226, 26, 76, 0.1);
    color: var(--primary-color) !important;
    border-left-color: var(--primary-color);
}

.admin-sidebar-nav ul li a svg {
    width: 18px;
    height: 18px;
}

.admin-sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-content {
    flex-grow: 1;
    padding: 40px;
    background-color: #f0f2f5;
    max-width: calc(100% - 260px);
}

/* Mobile Admin Toggle */
.admin-mobile-header {
    display: none;
    background: #1a1a1a;
    padding: 15px 20px;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1001;
}

@media (max-width: 992px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1002;
    }

    .admin-sidebar.active {
        left: 0;
    }

    .admin-content {
        max-width: 100%;
        padding: 20px;
        width: 100%;
    }

    .admin-mobile-header {
        display: flex;
        width: 100%;
    }

    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
    }

    .admin-sidebar-overlay.active {
        display: block;
    }

}

/* ==========================================================================
   SCHEDULE UI (HORARIO SEMANAL)
   ========================================================================== */
.schedule-day-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.schedule-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 15px;
}

.schedule-day-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Custom Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2e3b4e;
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.btn-add-shift {
    background: #e8f5e9;
    color: #2e7d32;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.5px;
}

.btn-add-shift:hover {
    background: #c8e6c9;
}

.shifts-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.shift-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shift-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
    background: #fff;
    overflow: hidden;
    width: 130px;
}

.shift-input-group input {
    border: none;
    padding: 8px;
    flex: 1;
    font-family: inherit;
    outline: none;
    font-size: 0.95rem;
    width: 100%;
}

.shift-input-group .time-icon {
    padding: 0 8px;
    color: #666;
    background: #fff;
    display: flex;
    align-items: center;
}

.shift-separator {
    color: #999;
    font-size: 0.9rem;
}

.btn-remove-shift {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-shift:hover {
    background: #ffcdd2;
}

.schedule-shifts-container {
    transition: opacity 0.3s;
}

.schedule-shifts-container.closed {
    opacity: 0.3;
    pointer-events: none;
}

/* --- Rating System --- */
.rating-widget {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.rating-stars {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
}

.rating-stars input {
    display: none;
}

.rating-stars label {
    cursor: pointer;
    width: 28px;
    height: 28px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23cbd5e1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>');
    background-size: cover;
    transition: transform 0.2s;
}

.rating-stars label:hover,
.rating-stars label:hover~label,
.rating-stars input:checked~label {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23f59e0b" stroke="%23f59e0b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>');
}

.rating-stars label:hover {
    transform: scale(1.1);
}

.rating-info {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
}

.rating-info .rating-score {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--text-main);
    line-height: 1;
}

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

/* --- Plan Card Overlay (Used in "Planes hoy") --- */
.plan-card-overlay {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    min-height: 280px;
    background: #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plan-card-overlay:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.plan-card-overlay.ad-card {
    background: transparent;
    box-shadow: none;
}

.ad-html-container {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.plan-card-overlay-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 5;
}

.ad-info-link {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.ad-info-link:hover {
    color: white;
    background: var(--primary-color);
    transform: scale(1.1);
}

.ad-info-link::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(10px);
}

.ad-info-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ad-info-link svg {
    width: 18px;
    height: 18px;
}

.plan-card-overlay-img-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.plan-card-overlay:hover img {
    transform: scale(1.1);
}

.plan-card-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 20px;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.6) 50%,
            transparent 100%);
    color: white;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.plan-card-overlay-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    background: #000000;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    display: inline-block;
    width: fit-content;
}

.plan-card-overlay-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.plan-card-overlay--ongoing {
    border: 3px solid #00c853;
    box-shadow: 0 0 15px rgba(0, 200, 83, 0.3);
}

.ongoing-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #00c853;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 10;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .plan-card-overlay {
        min-height: 220px;
    }
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 20px 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    z-index: 2000;
}

.cookie-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

.cookie-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 15px;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 0.9rem;
}

.btn-cookie.accept {
    background: var(--primary-color);
    color: white;
}

.btn-cookie.accept:hover {
    background: var(--primary-hover);
}

.btn-cookie.reject {
    background: #f0f0f0;
    color: var(--text-main);
}

.btn-cookie.reject:hover {
    background: #e0e0e0;
}

@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }

    .btn-cookie {
        flex: 1;
    }
}

/* PWA Install Bubble */
.pwa-install-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: none;
    /* Hidden by default, shown via JS */
    align-items: center;
    gap: 12px;
    z-index: 10000;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.pwa-install-bubble:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.pwa-install-icon {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-install-text {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
}

.pwa-install-close {
    color: var(--text-muted);
    font-size: 1rem;
    padding: 5px;
    cursor: pointer;
    display: flex;
}

@media (max-width: 768px) {
    .pwa-install-bubble {
        bottom: 80px;
        right: 20px;
        left: auto;
        margin: 0;
        width: fit-content;
    }
}

/* Notification Bell Prompt */
.notif-bell-container {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif-bell-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(226, 26, 76, 0.4);
    position: relative;
    animation: bell-shake 5s cubic-bezier(.36, .07, .19, .97) infinite;
}

.notif-bell-icon svg {
    width: 24px;
    height: 24px;
}

.notif-bell-dot {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.notif-bell-tooltip {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #1a1a1a;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.notif-bell-container:hover .notif-bell-tooltip {
    opacity: 1;
    visibility: visible;
    left: 80px;
}

.notif-bell-container:hover .notif-bell-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(226, 26, 76, 0.5);
}

@keyframes bell-shake {

    0%,
    90% {
        transform: rotate(0);
    }

    91% {
        transform: rotate(15deg);
    }

    92% {
        transform: rotate(-15deg);
    }

    93% {
        transform: rotate(15deg);
    }

    94% {
        transform: rotate(-15deg);
    }

    95% {
        transform: rotate(10deg);
    }

    96% {
        transform: rotate(-10deg);
    }

    97% {
        transform: rotate(5deg);
    }

    98% {
        transform: rotate(-5deg);
    }

    99%,
    100% {
        transform: rotate(0);
    }
}

@media (max-width: 768px) {
    .notif-bell-container {
        bottom: 85px;
        left: 20px;
    }

    .notif-bell-tooltip {
        display: none;
    }
}

/* Comments Section Responsiveness */
.comments-section-container {
    margin-top: 60px;
    border-top: 2px solid var(--border-color);
    padding-top: 40px;
}

.comment-form-box {
    background: rgba(226, 26, 76, 0.03);
    padding: 30px;
    border-radius: 15px;
    border: 1px dashed var(--primary-color);
}

.comment-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .comments-section-container {
        padding-top: 30px;
        margin-top: 40px;
    }

    .comment-form-box {
        padding: 20px;
    }

    .comment-inputs-grid {
        grid-template-columns: 1fr;
    }

    .comment-item {
        padding: 15px !important;
    }
}