:root {
    /* Variables de color */
    --primary-color: #3b82f6;      /* Azul más claro */
    --secondary-color: #2563eb;    /* Azul medio */
    --accent-color: #60a5fa;       /* Azul muy claro */
    --background-color: #f8fafc;   /* Fondo gris claro */
    --text-color: #1f2937;         /* Texto principal */
    --text-light: #64748b;         /* Texto secundario */
    --card-background: #ffffff;     /* Fondo de tarjetas */
    --success: #10b981;            /* Verde para éxito */
    --warning: #f59e0b;            /* Amarillo para advertencias */
    --error: #ef4444;              /* Rojo para errores */
    --border: #e5e7eb;             /* Color de bordes */

    /* Variables de diseño */
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

/* Estilos generales mejorados */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.main-header {
    background-color: var(--card-background);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.quick-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.quick-filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.quick-filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Main Content Layout */
.main-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Filtros Sidebar */
.filters-sidebar {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.filter-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Hosting Cards */
.hosting-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    display: grid;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

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

.hosting-card .logo {
    width: 120px;
    height: 40px;
    object-fit: contain;
}

.hosting-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.hosting-card .features {
    display: grid;
    gap: 0.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-item i {
    color: var(--secondary-color);
}

.hosting-card .cta-button {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hosting-card .cta-button:hover {
    background: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: sticky;
        top: 1rem;
    }
}

@media (max-width: 768px) {
    .quick-filters {
        flex-wrap: wrap;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
}

/* Top Hosting Cards */
.top-hosting-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .top-hosting-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.top-hosting-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 450px; /* Altura fija para todos */
}

.top-hosting-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.top-hosting-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-hosting-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.top-hosting-price {
    font-size: 2rem;
    font-weight: 700;
    margin: 1rem 0;
}

.top-hosting-features {
    flex: 1;
    margin: 1rem 0;
    text-align: left;
}

.top-hosting-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.top-hosting-cta {
    margin-top: auto;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.top-hosting-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Añadir después de los estilos de top-hosting-card */
.featured-card {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    position: relative;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.15) !important;
    z-index: 2;
    margin-top: 0;
}

.featured-card::before {
    content: "Más Recomendado";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #4f46e5;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 3;
}

/* Actualizar la clase gradient-bg */
.gradient-bg { 
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    position: relative;
    overflow: hidden;
}

/* Mantener el overlay oscuro */
.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Asegurar que el contenido esté por encima del overlay */
.gradient-bg > * {
    position: relative;
    z-index: 2;
}

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

/* etc... */

/* Estilos del header */
.site-header {
    background-color: var(--card-background);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.site-header .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header .nav-menu {
    display: flex;
    gap: 2rem;
}

.site-header .nav-link {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.site-header .nav-link:hover {
    color: var(--primary-color);
}

/* Actualizar el margen superior del título principal */
.gradient-bg .container {
    padding-top: 3rem;  /* Agregar espacio arriba del título */
}

/* Estilos para el menú móvil */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
}

#mobileMenu {
    transition: opacity 0.3s ease-in-out;
}

#mobileMenu .bg-white {
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
}

#mobileMenu:not(.hidden) .bg-white {
    transform: translateX(0);
}

/* Ajustar el tamaño de las tarjetas en móvil */
@media (max-width: 767px) {
    .top-hosting-card {
        min-height: 400px; /* Altura más pequeña en móvil */
        margin: 0 auto;
        width: 100%;
    }

    .featured-card {
        margin-top: 0;
    }
}

/* Estilos para las vistas en desktop */
@media (min-width: 768px) {
    #tableView:not(.hidden),
    #cardView:not(.hidden) {
        display: block;
    }
    
    #cardView:not(.hidden) {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    #tableView.hidden,
    #cardView.hidden {
        display: none !important;
    }
}

/* Modificar los estilos de vista */
#tableView {
    display: block;
}

#cardView {
    display: none;
}

@media (max-width: 767px) {
    #tableView {
        display: none !important;
    }
    
    #cardView {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    #toggleView {
        display: none !important;
    }
}

@media (min-width: 768px) {
    #cardView[style*="display: grid"] {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Estilos del menú */
.nav-menu {
    display: none;
}

.mobile-menu-btn {
    display: none;
}

@media (max-width: 767px) {
    .mobile-menu-btn {
        display: block;
        padding: 0.5rem;
        font-size: 1.5rem;
        color: var(--text-color);
    }

    .nav-menu {
        display: none;
    }
}

.mobile-menu {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-container.show {
    transform: translateX(0);
}

.mobile-menu-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-link:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
    padding-left: 2rem;
}

/* Desktop styles */
@media (min-width: 768px) {
    .nav-menu {
        display: flex;
        gap: 2rem;
    }

    .mobile-menu-btn {
        display: none;
    }

    .nav-link {
        color: var(--text-color);
        transition: color 0.3s ease;
    }

    .nav-link:hover {
        color: var(--primary-color);
    }
}

/* Estilos para las vistas */
#tableView {
    display: block;
}

#cardView {
    display: none;
}

/* Vista de tarjetas */
#cardView[style*="display: grid"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Estilos móviles */
@media (max-width: 767px) {
    #tableView {
        display: none !important;
    }
    
    #cardView {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    #toggleView {
        display: none !important;
    }
}

/* Estilos desktop */
@media (min-width: 768px) {
    #toggleView {
        display: block;
    }
    
    #cardView[style*="display: grid"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Estilos del menú móvil */
.mobile-menu-btn {
    display: none;
}

@media (max-width: 767px) {
    /* Ocultar menú normal y mostrar botón hamburguesa */
    .nav-menu {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: block;
        padding: 0.5rem;
        font-size: 1.5rem;
        color: var(--text-color);
    }

    /* Orden específico para las tarjetas del top 3 */
    .top-hosting-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    .top-hosting-card {
        min-height: 400px;
        margin: 0;
        width: 100%;
    }

    /* Hostinger (featured card) */
    .top-hosting-card:nth-child(2) {
        order: 1;
    }
    
    /* DreamHost */
    .top-hosting-card:nth-child(1) {
        order: 2;
    }
    
    /* SiteGround */
    .top-hosting-card:nth-child(3) {
        order: 3;
    }
}

/* Estilos del menú móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-container.show {
    transform: translateX(0);
}

.mobile-menu-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-link:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
    padding-left: 2rem;
}

/* Desktop styles */
@media (min-width: 768px) {
    .nav-menu {
        display: flex;
        gap: 2rem;
    }

    .mobile-menu-btn,
    .mobile-menu {
        display: none !important;
    }
}

/* Ajustar el contenedor del grid para compensar el badge */
.top-hosting-grid {
    padding-top: 12px;
}

@media (max-width: 767px) {
    .featured-card {
        margin-top: 0;
    }
    
    /* Orden específico para las tarjetas */
    .top-hosting-card:nth-child(2) {
        order: 1;
    }
    .top-hosting-card:nth-child(1) {
        order: 2;
    }
    .top-hosting-card:nth-child(3) {
        order: 3;
    }
}