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

:root {
    --ubuntu-dark: #2C2C2C;
    --ubuntu-medium: #3A3A3A;
    --ubuntu-light: #4A4A4A;
    --ubuntu-orange: #E95420;
    --ubuntu-orange-hover: #C74A1A;
    --ubuntu-white: #F5F5F5;
    --ubuntu-gray: #A0A0A0;
    --border-radius: 10px;
    --transition-speed: 200ms;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.5);
    --overlay-bg: rgba(0, 0, 0, 0.6);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    min-height: 100vh;
    color: var(--ubuntu-white);
    background: 
        linear-gradient(rgba(44, 44, 44, 0.0), rgba(44, 44, 44, 0.0)),
        url('../assets/images/fondo-pagina.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body > * {
    position: relative;
    z-index: 1;
}

/* ========== HEADER ========== */
.header {
    background: transparent;
    min-height: auto;
    padding: 2rem 4rem;
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--ubuntu-orange);
    position: relative;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 2;
    padding: 0;
    background: var(--overlay-bg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
    height: 400px;
    min-height: 400px;
    background: transparent;
}

/* ========== COLUMNA IZQUIERDA ========== */
.header-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    padding-left: 3rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.site-title {
    font-size: 2.8rem;
    font-weight: 300;
    color: var(--ubuntu-white);
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--ubuntu-orange);
    margin-top: 0.5rem;
}

.description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ubuntu-gray);
    max-width: 100%;
    margin: 0.5rem 0;
}

.btn-primary {
    display: inline-block;
    background: var(--ubuntu-orange);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    width: fit-content;
    margin-top: 0.5rem;
}

.btn-primary:hover {
    background: var(--ubuntu-orange-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(233, 84, 32, 0.4);
}

/* ========== COLUMNA DERECHA ========== */
.header-right {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 3rem 1rem 0;
}

.header-right .news-section {
    flex: 1 1 200px;
    min-width: 160px;
    max-width: 280px;
    height: 280px;
    background: var(--overlay-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right .ad-section {
    flex: 1 1 200px;
    min-width: 160px;
    max-width: 280px;
    height: 280px;
    background: var(--overlay-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ========== TARJETAS ========== */
.cards-section {
    padding: 3rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    justify-items: center;
    align-items: center;
}

.card {
    background: var(--overlay-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    border: 1px solid transparent;
    width: 100%;
    max-width: 340px;
}

.card:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--ubuntu-orange);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    background: var(--ubuntu-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card:hover .card-image {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--ubuntu-white);
    margin: 0;
}

.card-description {
    font-size: 0.9rem;
    color: var(--ubuntu-gray);
    line-height: 1.5;
    max-width: 90%;
    margin: 0;
}

/* ========== PROVEEDORES ========== */
.providers-section {
    padding: 3rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.providers-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2rem;
    padding: 2rem;
    background: var(--overlay-bg);
    border-radius: var(--border-radius);
    justify-items: center;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

.provider-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--overlay-bg);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
    position: relative;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.provider-card:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--ubuntu-orange);
}

.provider-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--ubuntu-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.provider-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.provider-name {
    color: var(--ubuntu-white);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tooltip */
.provider-tooltip {
    display: none;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ubuntu-medium);
    border-radius: var(--border-radius);
    padding: 1rem;
    min-width: 250px;
    max-width: 300px;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
    text-align: left;
}

.provider-card:hover .provider-tooltip {
    display: block;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.8rem;
}

.tooltip-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: contain;
    background: var(--ubuntu-dark);
}

.tooltip-header h4 {
    color: var(--ubuntu-white);
    margin: 0;
    font-size: 1.1rem;
}

.tooltip-body p {
    color: var(--ubuntu-gray);
    font-size: 0.85rem;
    margin: 0.3rem 0;
    line-height: 1.5;
}

.tooltip-body strong {
    color: var(--ubuntu-white);
}

.tooltip-body .compatible {
    color: #4CAF50;
    font-weight: bold;
}

/* ========== BARRA DE PROVEEDORES EN HEADER ========== */
.header-providers-row {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 1rem;
    background: transparent;
    border-radius: var(--border-radius);
    border: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    max-width: 1400px;
    margin: 1rem auto 0 auto;
    scrollbar-width: thin;
}

.header-provider-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    padding: 0.3rem;
    border-radius: var(--border-radius);
    flex-shrink: 0;
    text-decoration: none;
    gap: 0.2rem;
    min-width: 60px;
}

.header-provider-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.header-provider-icon img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: contain;
    background: var(--ubuntu-dark);
    display: block;
}

.header-provider-icon .provider-name {
    font-size: 0.8rem;
    color: #ffffff;
    text-align: center;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== NAVEGACIÓN POR PÁGINAS ========== */
.page-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem 0;
    margin-top: 0.5rem;
}

.page-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    padding: 0;
}

.page-dot:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.2);
}

.page-dot.active {
    background: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.page-dot.active:hover {
    background: #f0f0f0;
    transform: scale(1.15);
}

/* ========== FOOTER ========== */
.footer {
    text-align: center;
    padding: 2rem 4rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ubuntu-gray);
    font-size: 0.9rem;
    background: var(--overlay-bg);
}

.footer p {
    margin: 0;
}

/* ========== CONTENIDO DOCUMENTS ========== */
.content-section {
    padding: 3rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.content-container {
    background: var(--ubuntu-medium);
    border-radius: var(--border-radius);
    padding: 3rem;
}

.content-container h2 {
    color: var(--ubuntu-orange);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.content-container h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content-container p {
    color: #cccccc;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-container ul {
    color: #cccccc;
    line-height: 2;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-container ul li {
    list-style-type: disc;
}

.content-container strong {
    color: #ffffff;
}

/* ========== MEDIA QUERIES ========== */

/* Pantallas grandes - 3 columnas a 2 */
@media (max-width: 1024px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr);
        justify-items: center;
    }

    .providers-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablets */
@media (max-width: 992px) {
    .header {
        padding: 2rem;
    }

    .header-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        height: auto;
        min-height: auto;
    }

    .header-right {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .header-right .news-section,
    .header-right .ad-section {
        flex: 1 1 180px;
        height: 200px;
        max-width: 220px;
    }

    .description {
        max-width: 100%;
    }

    .providers-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem;
    }

    .site-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .header-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        height: auto;
        min-height: auto;
    }

    .header-left {
        gap: 0.5rem;
    }

    .header-right {
        display: flex;
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        padding: 0.5rem 0;
    }

    .header-right .news-section,
    .header-right .ad-section {
        flex: 1 1 140px;
        height: 140px;
        max-width: 180px;
        min-width: 120px;
    }

    .cards-section {
        padding: 2rem 1.5rem;
    }

    .cards-container {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        justify-items: center;
    }

    .card {
        max-width: 280px;
    }

    .card-image {
        aspect-ratio: 16 / 9;
    }

    .providers-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    .header-providers-row {
        gap: 0.5rem;
        padding: 0.3rem 0.8rem;
    }

    .header-provider-icon {
        min-width: 48px;
    }

    .header-provider-icon img {
        width: 36px;
        height: 36px;
    }

    .header-provider-icon .provider-name {
        font-size: 0.45rem;
        max-width: 40px;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    .cards-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        justify-items: center;
    }

    .card {
        max-width: 320px;
    }

    .card-image {
        aspect-ratio: 16 / 9;
    }

    .logo {
        width: 40px;
        height: 40px;
    }

    .site-title {
        font-size: 1.6rem;
    }

    .btn-primary {
        width: 100%;
        text-align: center;
    }

    .providers-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .provider-icon {
        width: 72px;
        height: 72px;
    }

    .header-right .news-section,
    .header-right .ad-section {
        flex: 1 1 120px;
        height: 120px;
        max-width: 160px;
        min-width: 100px;
    }

    .header-provider-icon img {
        width: 32px;
        height: 32px;
    }
}

/* Barra de navegación */
.nav-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--ubuntu-gray);
    text-decoration: none;
    font-size: 0.8rem;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
    position: relative;
}

.nav-btn .material-symbols-outlined {
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--ubuntu-orange);
    color: #ffffff;
    border-color: var(--ubuntu-orange);
}

.nav-btn.active:hover {
    background: var(--ubuntu-orange-hover);
}

/* Tooltip para los botones */
.nav-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--ubuntu-medium);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    pointer-events: none;
}

.nav-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--ubuntu-medium);
    z-index: 10;
    pointer-events: none;
}
