/* ===== ESTILOS ESPECÍFICOS PARA SITIOS A-Z ===== */
/* Los estilos del navbar se toman directamente de la librería de UDLAP */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

/* Header personalizado */
/*header {
    background: #fff;
    color: #333;
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #e7520f;
    font-weight: 600;
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
}*/

/* Main content personalizado */
.main-content {
    background: #fff;
    color: #333;
    padding: 2rem 1rem;
    text-align: center;
    border-bottom: 0px solid #e0e0e0;
}

.main-content h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: #000;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
}

.site-count-display {
    margin: 1rem 0;
}

.site-count-display span {
    font-size: 3.5rem;
    font-weight: 800;
    color: #e7520f;
    display: block;
    font-family: 'Poppins', sans-serif;
}

.main-content .subtitle {
    font-size: 1.9rem;
    color: #666;
    font-weight: 500;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

/* Buscador principal */
.main-search-container {
    width: 85%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-input-container {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 1;
    pointer-events: none;
}

.search-box {
    width: 100%;
    padding: 1rem 1.5rem 1rem 3rem;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #fff;
}

.search-box:focus {
    border-color: #008888;
    box-shadow: 0 2px 6px rgba(0, 136, 136, 0.3);
}

.clear-search-btn {
    background-color: #f5f5f5;
    color: #008888;
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.clear-search-btn:hover {
    background-color: #008888;
    color: white;
    border-color: #008888;
}

/* Container principal */
.container {
    width: 85%;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

/* Estadísticas */
.stats {
    background: #fff;
    color: #333;
    padding: 1rem 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.stats p {
    font-size: 2rem;
    font-weight: 700;
    color: #e7520f;
    margin: 0;
}

/* Botones de navegación */
.navigation-buttons {
    background: #fff;
    color: #333;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 0 auto 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 85%;
    max-width: 1200px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.navigation-buttons h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

.button-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 0 auto;
    overflow-x: auto;
}

.nav-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #008888;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: fit-content;
}

.nav-btn:hover {
    background: #008888;
    color: white;
    border-color: #008888;
    transform: translateY(-1px);
}

.btn-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    margin-right: 0.4rem;
    line-height: 1.2;
}

.btn-count {
    background: rgba(0, 136, 136, 0.1);
    color: #008888;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.nav-btn:hover .btn-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Contenedor de sitios */
.sites-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    align-items: stretch;
    width: 100%;
}

.sites-container .site-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Tarjetas de sitios */
.site-card {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.site-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-color: #e7520f;
}

.site-card h3 {
    color: #1b1b1b;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
}

.site-card h3 a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
    font-weight: normal;
}

.site-card h3 a:visited {
    color: #000;
}

.site-card h3 a:hover {
    color: #008888;
}

.site-card h3 a:active {
    color: #008888;
}

.site-card:hover h3 a {
    color: #008888;
}

.site-description {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: block;
}

.site-card p:not(.site-description) {
    color: #e7520f;
    font-size: 0.8rem;
    margin: 0.5rem 0 0 0;
    display: block;
    flex-shrink: 0;
    font-weight: 400;
    opacity: 0.9;
    word-break: break-all;
}

.site-url-link {
    color: #e7520f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-url-link:hover {
    color: #ee7404;
    text-decoration: underline;
}

.site-url-link:visited {
    color: #e7520f;
}

/* Secciones de audiencia */
.audience-section {
    margin-bottom: 3rem;
}

.section-header {
    margin-top: 3.125rem;
    margin-bottom: 1.875rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1b1b1b;
    margin: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e7520f;
}

.site-count {
    background: rgba(0, 136, 136, 0.1);
    color: #008888;
    padding: 0.2rem 0.5rem;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
}

.back-to-top-link {
    display: block;
    text-align: right;
    margin-top: 0.5rem;
    color: #008888;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-to-top-link:hover {
    color: #00a5a4;
    text-decoration: underline;
}

/* Sin resultados */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

.hidden {
    display: none;
}

/* Botón de ir al inicio */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #008888;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 1rem 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 136, 136, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #00a5a4;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 165, 164, 0.4);
}

.back-to-top i {
    font-size: 1.2rem;
}

/* Responsive para sitios A-Z */
@media (max-width: 1024px) {
    .sites-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .site-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .nav-right {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-right.active {
        display: flex;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .search-container {
        width: 100%;
        min-width: auto;
    }
    
    .social-cards {
        justify-content: center;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Botón "Ir al inicio" para tablet */
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.8rem;
        font-size: 0.85rem;
        border-radius: 50%;
        width: 48px;
        height: 48px;
        justify-content: center;
    }
    
    .back-to-top span {
        display: none;
    }
    
    /* Ajustes de ancho para tablet */
    .main-search-container,
    .navigation-buttons {
        width: 90%;
    }
    
    /* Botones de categoría en una columna para tablet */
    .button-grid {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    /* Botón "Limpiar búsqueda" para tablet */
    .search-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .clear-search-btn {
        align-self: center;
        width: auto;
        min-width: 150px;
    }
    
    /* Campo de búsqueda para tablet */
    .search-input-container {
        width: 100%;
    }
    
    .search-box {
        padding-left: 2.5rem;
    }
    
    /* Icono de lupa para tablet */
    .search-icon {
        left: 0.8rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .button-grid {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .nav-btn {
        padding: 0.6rem 1rem;
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .btn-text {
        font-size: 0.8rem;
    }
    
    .sites-container {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .site-card {
        height: auto;
        min-height: 100px;
    }
    
    .main-search-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
        width: 95%;
    }
    
    .navigation-buttons {
        width: 95%;
        padding: 1.5rem 0.5rem;
    }
    
    .container {
        width: 95%;
    }
    
    .section-header {
        margin-top: 2rem;
        margin-bottom: 1.5rem;
    }
    
    /* Botón "Ir al inicio" para móvil */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        padding: 0.7rem;
        font-size: 0.8rem;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        justify-content: center;
    }
    
    .back-to-top span {
        display: none;
    }
    
    .back-to-top i {
        font-size: 1rem;
    }
    
    /* Botón "Limpiar búsqueda" para móvil */
    .search-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .clear-search-btn {
        align-self: center;
        width: auto;
        min-width: 140px;
        font-size: 0.85rem;
    }
    
    /* Campo de búsqueda para móvil */
    .search-input-container {
        width: 100%;
    }
    
    .search-box {
        padding-left: 2.2rem;
    }
    
    /* Icono de lupa para móvil */
    .search-icon {
        left: 0.7rem;
    }
}

/* ===== SECCIÓN DE FILTROS ===== */
.filter-section {
    background: #fff;
    color: #333;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 0 auto 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 85%;
    max-width: 1200px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.filter-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: #333;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-type-selector {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #333;
    transition: color 0.3s ease;
}

.filter-option:hover {
    color: #008888;
}

.filter-option input[type="radio"] {
    margin: 0;
    accent-color: #008888;
}

.filter-controls {
    display: flex;
    justify-content: center;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
}

.filter-btn {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    color: #008888;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 32px;
    text-align: center;
    background: #fff;
    cursor: pointer;
}

.filter-btn-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn-text {
    flex: 1;
}

.filter-btn-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 136, 136, 0.1);
    color: #008888;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
}

.filter-btn:hover {
    background-color: #008888;
    color: white;
    border-color: #008888;
    transform: translateY(-1px);
}

.filter-btn:hover .filter-btn-count {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.filter-btn.active {
    background-color: #008888;
    color: white;
    border-color: #008888;
}

.filter-btn.active .filter-btn-count {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Responsive para filtros */
@media (max-width: 1024px) {
    .filter-section {
        width: 90%;
    }
    
    .filter-type-selector {
        gap: 1.5rem;
    }
    
    .filter-buttons {
        gap: 0.4rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
        min-width: 28px;
    }
}

@media (max-width: 768px) {
    .filter-section {
        width: 95%;
        padding: 1rem 0.5rem;
    }
    
    .filter-type-selector {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .filter-buttons {
        gap: 0.3rem;
    }
    
    .filter-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
        min-width: 24px;
    }
}