/* CONMEBOL Magazine - Fonts */
@font-face {
    font-family: 'Branding Black';
    src: url('../fonts/Branding Black.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Branding Bold';
    src: url('../fonts/Branding Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Branding Medium';
    src: url('../fonts/Branding Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Branding';
    src: url('../fonts/Branding Medium.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Milestone';
    src: url('../fonts/Milestone.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'MinionPro';
    src: url('../fonts/MinionPro-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'De Rotterdam Demo';
    src: url('../fonts/DeRotterdamDemo-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* CONMEBOL Magazine - Global Styles */
:root {
    --cm-blue: #1B3A6B;
    --cm-blue-light: #2563EB;
    --cm-blue-dark: #0C2711;
    --cm-pink: #E91E8C;
    --cm-green: #2D7A3A;
    --cm-orange: #F5A623;
    --cm-gray-light: #F0EEEB;
    --cm-gray: #D9D9D9;
    --cm-white: #FFFFFF;
    --cm-black: #1A1A1A;
    --cm-font: 'Branding Medium', 'Branding', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --cm-width: 402px;
}

.conmebol-magazine {
    font-family: var(--cm-font);
    max-width: var(--cm-width);
    margin: 0 auto;
    overflow: hidden;
    background: var(--cm-white);
    color: var(--cm-black);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.conmebol-magazine *,
.conmebol-magazine *::before,
.conmebol-magazine *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.conmebol-magazine img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Contain all elements within magazine width */
.conmebol-magazine .cm-section {
    max-width: 402px;
    overflow: hidden;
}

.conmebol-magazine .cm-section img {
    max-width: 100%;
}

/* Section base */
.cm-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Portada */
.cm-portada {
    height: 800px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cm-portada::before,
.cm-portada::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 247px;
    pointer-events: none;
}

.cm-portada::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(12,39,17,0.2) 52%, transparent);
}

.cm-portada::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(12,39,17,0.2) 52%, transparent);
}

.cm-portada__logo {
    position: relative;
    z-index: 2;
    width: 372px;
    height: auto;
}

/* Indice (Table of Contents) */
.cm-indice {
    height: 800px;
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 54px 29px;
}

.cm-indice__titulo {
    width: 176px;
    margin: 0 auto 30px;
}

.cm-indice__grid {
    position: relative;
    width: 100%;
    height: 600px;
}

.cm-indice__grid img {
    position: absolute;
}

/* Person card */
.cm-person {
    position: relative;
}

.cm-person__photo {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.cm-person__name {
    font-size: 18px;
    font-weight: 700;
    color: var(--cm-blue);
}

.cm-person__role {
    font-size: 12px;
    color: var(--cm-blue);
    opacity: 0.8;
}

/* Text sections */
.cm-text-section {
    padding: 40px;
}

.cm-text-section p {
    font-size: 13px;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 16px;
    color: var(--cm-black);
}

.cm-text-section p:last-child {
    margin-bottom: 0;
}

/* Quote */
.cm-quote {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--cm-blue-dark);
}

/* Slider */
.cm-slider {
    position: relative;
    overflow: hidden;
}

.cm-slider__track {
    display: flex;
    transition: transform 0.4s ease;
}

.cm-slider__slide {
    flex: 0 0 100%;
    min-width: 0;
}

.cm-slider__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0;
}

.cm-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cm-gray);
    border: none;
    cursor: pointer;
    padding: 0;
}

.cm-slider__dot--active {
    background: var(--cm-blue-light);
}

/* Cards - Ejes */
.cm-ejes {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.cm-ejes::-webkit-scrollbar {
    display: none;
}

.cm-eje-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.cm-eje-card--juega { background: #3B82F6; }
.cm-eje-card--construye { background: #EC4899; }
.cm-eje-card--educa { background: #8B5CF6; }
.cm-eje-card--gestiona { background: #F59E0B; }

.cm-eje-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--cm-white);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-style: italic;
}

.cm-eje-card p {
    font-size: 11px;
    color: var(--cm-white);
    line-height: 1.4;
}

/* Objectives numbered */
.cm-objective {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cm-objective__number {
    flex: 0 0 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cm-blue-light);
    color: var(--cm-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
}

.cm-objective__text {
    flex: 1;
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--cm-white);
    font-weight: 600;
}

/* Photo gallery */
.cm-gallery {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 20px;
}

.cm-gallery::-webkit-scrollbar {
    display: none;
}

.cm-gallery__item {
    flex: 0 0 200px;
    scroll-snap-align: start;
    border-radius: 8px;
    overflow: hidden;
}

.cm-gallery__item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Tables */
.cm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.cm-table th {
    background: var(--cm-blue);
    color: var(--cm-white);
    padding: 6px 8px;
    text-align: left;
    font-weight: 600;
}

.cm-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--cm-gray);
}

.cm-table tr:nth-child(even) {
    background: var(--cm-gray-light);
}

/* Dark section */
.cm-dark {
    background: var(--cm-black);
    color: var(--cm-white);
}

.cm-dark p {
    color: var(--cm-white);
}

/* Blue section */
.cm-blue-bg {
    background: var(--cm-blue);
    color: var(--cm-white);
}

.cm-blue-bg p {
    color: var(--cm-white);
}

/* Pink section */
.cm-pink-bg {
    background: var(--cm-pink);
    color: var(--cm-white);
}

/* Gray section */
.cm-gray-bg {
    background: var(--cm-gray-light);
}

/* Responsive - scale up on larger screens */
@media (min-width: 768px) {
    .conmebol-magazine {
        max-width: 500px;
    }
}
