: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;
}

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: 2rem;
    margin-bottom: 40px;
}

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

.plan-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.plan-img {
    height: 250px;
    background: #e0e0e0;
    position: relative;
    overflow: hidden;
}

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

.plan-info {
    padding: 20px;
}

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

.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(auto-fill, minmax(300px, 1fr));
    }
}

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

    header .container {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero {
        padding: 60px 20px;
    }

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

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

    .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;
}

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

    .plan-detail-img {
        height: 300px !important;
    }

    .plan-sidebar {
        position: static !important;
        margin-top: 20px;
    }

    .plan-detail-header-meta {
        flex-direction: column;
        gap: 10px !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: 12px; background: #ffffff; padding: 12px 20px; border-radius: 12px; 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.4rem; }
.info-pill .label { font-size: 0.75rem; color: var(--text-muted); display: block; text-transform: uppercase; font-weight: 700; }
.info-pill .value { font-weight: 600; color: var(--text-main); }
.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); }
.plan-sidebar { background: #ffffff !important; box-shadow: 0 10px 40px rgba(0,0,0,0.08); }


