/* ===== FUENTES PERSONALIZADAS ===== */
@font-face {
    font-family: 'Roboto-Bold';
    src: url('/font/Roboto/Roboto-Bold.ttf') format('truetype'),
        url('/font/Roboto/Roboto-BoldItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto-Medium';
    src: url('/font/Roboto/Roboto-Medium.ttf') format('truetype'),
        url('/font/Roboto/Roboto-MediumItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto-Regular';
    src: url('/font/Roboto/Roboto-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto-Light';
    src: url('/font/Roboto/Roboto-Light.ttf') format('truetype'),
        url('/font/Roboto/Roboto-LightItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Aalto-Bold';
    src: url('/font/Aalto/AaltoSansPro-Bold.ttf') format('truetype'),
         url('/font/Aalto/AaltoSansPro-BoldIt.ttf') format('truetype');
    font-weight: normal; 
    font-style: normal; 
}

@font-face {
    font-family: 'Aalto-Medium';
    src: url('/font/Aalto/AaltoSansPro-Medium.ttf') format('truetype'),
         url('/font/Aalto/AaltoSansPro-MediumIt.ttf') format('truetype');
    font-weight: normal; 
    font-style: normal; 
}

@font-face {
    font-family: 'Aalto-Regular';
    src: url('/font/Aalto/AaltoSansPro-Regular.ttf') format('truetype'),
         url('/font/Aalto/AaltoSansPro-RegularIt.ttf') format('truetype');
    font-weight: normal; 
    font-style: normal; 
}

@font-face {
    font-family: 'Aalto-light';
    src: url('/font/Aalto/AaltoSansPro-Light.ttf') format('truetype'),
         url('/font/Aalto/AaltoSansPro-LightIt.ttf') format('truetype');
    font-weight: normal; 
    font-style: normal; 
}

/* ===== VARIABLES DE COLORES ===== */
:root {
  --gray-txt: #323639;
  --red-one: #E11E00;
  --red-two: #940a00;
  --red-three: #BF0909;
  --red-light: #FFE5E5;
  --red-transparent: rgba(148, 10, 0, 0.1);
  --gray-nav: #D3D3D3;
  --gray-header: #F6F9FC;
  --gray-two: #EDF0F4;
  --gray-three: #DEE3EA;
  --gray-four: #A3A3A3;
  --gray-five: #C5CDDA;
  --yellow: #FFD147;
  --pie-pagina: #E9EAEA;
  --footer: #474747;
  --green: #3C9646;
  --white: #FFFFFF;
  --black: #000000;
  --modal-overlay: rgba(0, 0, 0, 0.75);
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.12);
  --shadow-dark: rgba(0, 0, 0, 0.2);
  --transition-smooth: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
/* ===== RESET Y ESTILOS BASE ===== */
* {
    padding: 0;
    margin: 0;
    text-decoration: none;
    font-family: 'Roboto', sans-serif !important;
    box-sizing: border-box;
}
body {
    background: var(--gray-header);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}
/* ===== CLASES DE FUENTES ===== */
.ff-medium, .ff-m {
    font-family: 'Roboto-Medium' !important;
}
.ff-bold, .ff-b {
    font-family: 'Roboto-Bold' !important;
}
.ff-regular, .ff-r {
    font-family: 'Roboto-Regular' !important;
}
.ff-a-r {
    font-family: 'Aalto-Regular' !important;
}
.ff-a-m {
    font-family: 'Aalto-Medium' !important;
}
.ff-a-b {
    font-family: 'Aalto-Bold' !important;
}
/* ===== CLASES UTILITARIAS ===== */
.derechos-a {
    position: relative;
    height: auto;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    text-align: center;
    background: #414142;
    color: white;
    font-family: 'Roboto-Medium';
    font-size: 12px;
}
.forzar {
    word-break: break-all;
    overflow-wrap: break-word;
}
/* ===== FIN DE LOS ESTILOS GENERALES ===== */



/* ===== ESTILOS DE LA LÍNEA DE TIEMPO ===== */
.container {
    min-height: 65vh;
    position: relative;
    overflow: hidden;
    padding: 10px 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.timeline-wrapper {
    width: 100%;
    height: auto;
    padding: 10px 0;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    overflow: visible;
}
.timeline-scroll {
    width: calc(100% - 120px);
    margin: 0 60px;
    overflow-x: hidden;
    overflow-y: hidden;
    padding: 8px 0 8px;
    cursor: grab;
    position: relative;
    user-select: none;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.timeline-scroll::-webkit-scrollbar {
    display: none;
}
.timeline-scroll:active {
    cursor: grabbing;
}
.timeline-content {
    display: flex;
    flex-direction: column;
    width: max-content;
    min-width: 100%;
    padding: 0 20px;
    position: relative;
}
.timeline-cards {
    display: flex;
    align-items: flex-end;
    gap: 40px;
    position: relative;
    z-index: 2;
    padding: 12px 0;
}
/* Timeline card */
.timeline-card {
    flex-shrink: 0;
    width: 280px;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: var(--transition-smooth);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    border: 1px solid rgba(222, 227, 234, 0.8);
    position: relative;
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.98);
}
.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--red-two), var(--red-one), var(--red-three));
    z-index: 2;
}
.timeline-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 30%, rgba(148, 10, 0, 0.02) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.timeline-card:hover::after {
    opacity: 1;
}
.timeline-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.timeline-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 10px 25px rgba(148, 10, 0, 0.12);
    border-color: var(--red-light);
}
.card-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--red-two);
    opacity: 0.2;
    transition: opacity 0.3s ease;
}
.card-corner-tl {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}
.card-corner-tr {
    top: 8px;
    right: 8px;
    border-left: none;
    border-bottom: none;
}
.card-corner-bl {
    bottom: 8px;
    left: 8px;
    border-right: none;
    border-top: none;
}
.card-corner-br {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}
.timeline-card:hover .card-corner {
    opacity: 0.6;
}
.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.97);
    position: relative;
    z-index: 1;
}
.timeline-card:hover .card-image {
    transform: scale(1.05);
    filter: brightness(1);
}
.card-content {
    padding: 20px;
    background: var(--white);
    position: relative;
    z-index: 1;
}
.card-title {
    color: var(--red-two);
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    font-family: 'Roboto-Bold', sans-serif;
    line-height: 1.3;
    position: relative;
    padding-bottom: 8px;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--red-two), var(--red-one));
    border-radius: 2px;
}

.card-description {
    color: var(--gray-txt);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    font-family: 'Roboto-Regular', sans-serif;
    margin-top: 10px;
    opacity: 0.85;
}

/* Contenedor de línea y marcadores */
.timeline-line-container {
    position: relative;
    width: 100%;
    height: 60px;
    margin-top: 5px;
    padding: 0 10px;
}
.timeline-line {
    position: absolute;
    top: 0;
    left: 10px;
    width: calc(100% - 20px);
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--red-two) 10%,
        var(--red-one) 50%,
        var(--red-three) 90%,
        transparent 100%);
    border-radius: 3px;
    z-index: 1;
    box-shadow: 0 0 15px rgba(225, 30, 0, 0.15);
}
.timeline-markers {
    position: absolute;
    top: -10px;
    left: 10px;
    width: calc(100% - 20px);
    display: flex;
    gap: 40px;
    z-index: 2;
}
.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    width: 280px;
}
.marker-dot {
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(148, 10, 0, 0.2);
    border: 4px solid var(--red-two);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 3;
    position: relative;
}
.marker-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--red-two);
    border-radius: 50%;
    transition: var(--transition-smooth);
}
.marker-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(148, 10, 0, 0.08);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.marker-dot:hover {
    transform: scale(1.3);
    border-color: var(--red-three);
    box-shadow: 0 6px 18px rgba(148, 10, 0, 0.25);
}
.marker-dot:hover::before {
    background: var(--red-three);
    transform: translate(-50%, -50%) scale(1.2);
}
.marker-dot:hover::after {
    opacity: 1;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}
.marker-year {
    color: var(--red-two);
    font-size: 15px;
    margin-top: 12px;
    white-space: nowrap;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Roboto-Bold', sans-serif;
    padding: 3px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    opacity: 0.9;
}
.marker-year:hover {
    color: var(--red-three);
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(148, 10, 0, 0.1);
}
/* Logo del aniversario en modal */
.modal-logo {
    text-align: left;
    margin-bottom: 15px;
    padding: 0 10px;
}
.modal-logo img {
    height: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}
/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    background: var(--modal-overlay);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}
.modal-content {
    background: var(--white);
    border-radius: 10px;
    max-width: 85%;
    width: 100%;
    max-height: 100vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1001;
    animation: modalSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--gray-three);
    transform: translateY(15px) scale(0.97);
    opacity: 0;
}
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-track {
    background: var(--gray-header);
    border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--red-two);
    border-radius: 4px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--red-three);
}
.modal.active .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red-two), var(--red-one), var(--red-three));
    border-radius: 10px 10px 0 0;
}
/* Modal header */
.modal-header {
    background: linear-gradient(135deg, var(--red-two) 0%, var(--red-three) 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}
.modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.modal-year {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    font-family: 'Roboto-Bold', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
/* Botón de cerrar */
.modal-close {
    color: var(--white);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 1;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
}
.modal-close:hover {
    background: var(--white);
    color: var(--red-two);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: var(--white);
}
.close-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}
.modal-body {
    padding: 20px;
}
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: start;
}
.modal-image-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}
.modal-image-wrapper {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-three);
    position: relative;
    background: var(--gray-header);
    height: 350px;
    min-height: 280px;
}
.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}
.modal-image-wrapper:hover .modal-image {
    transform: scale(1.05);
    filter: brightness(1);
}

/* Modal info section */
.modal-info-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}
.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-txt);
    margin-bottom: 10px;
    line-height: 1.3;
    font-family: 'Aalto-Bold', sans-serif;
    position: relative;
    padding-bottom: 10px;
}
.modal-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--red-two), var(--red-one));
    border-radius: 2px;
}
.modal-description {
    color: var(--gray-txt);
    line-height: 1.6;
    font-size: 16px;
    font-family: 'Roboto-Regular', sans-serif;
    flex-grow: 1;
}
.modal-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-three);
    position: relative;
    flex-shrink: 0;
    gap: 350px;
    padding-left: 20px;
    padding-right: 20px;
}
.nav-counter {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--red-one);
    font-weight: 700;
    font-size: 15px;
    font-family: 'Roboto-Bold', sans-serif;
    padding: 8px 16px;
    background: var(--gray-header);
    border-radius: 20px;
    border: 1px solid var(--gray-three);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    z-index: 2;
    pointer-events: none;
    min-width: 70px;
    text-align: center;
}
.modal-navigation::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(var(--red-one));
    border-radius: 2px;
}
.nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--red-one); 
    background: var(--white); 
    border: 1.5px solid var(--red-one); 
    border-radius: 30px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
    font-family: 'Roboto-Medium', sans-serif;
    min-width: 160px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(148, 10, 0, 0.1);
    position: relative;
    overflow: hidden;
    font-size: 14px;
    flex: 0 1 auto;
    max-width: 220px;
}
.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--red-one);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}
.nav-button span {
    position: relative;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 5px;
}
.nav-button .nav-icon {
    position: relative;
    z-index: 2;
    stroke: currentColor;
    flex-shrink: 0;
}
.nav-button:hover:not(:disabled) {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(148, 10, 0, 0.3);
}
.nav-button:hover:not(:disabled)::before {
    opacity: 1;
}
.nav-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(148, 10, 0, 0.25);
}
.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: var(--gray-four);
    background: var(--gray-header);
    border-color: var(--gray-three);
}
.nav-button:disabled:hover {
    background: var(--gray-header);
    color: var(--gray-four);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.nav-icon {
    width: 18px;
    height: 18px;
}
/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white; 
    border: 2px solid var(--red-one);
    color: var(--red-one);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: bold;
    opacity: 0.9; 
    pointer-events: auto; 
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 0;
}
.timeline-wrapper:hover .scroll-indicator {
    opacity: 1;
}
.scroll-indicator-left {
    left: 10px;
}
.scroll-indicator-right {
    right: 10px;
}
.scroll-indicator:hover {
    background: var(--white);
    color: var(--red-three);
    border-color: var(--red-three);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(148, 10, 0, 0.3);
}
@media (max-width: 1400px) {
    .container {
        min-height: 60vh;
    }
    .timeline-content {
        padding: 0 10px;
    }
    .timeline-card {
        width: 260px;
    }
    .timeline-marker {
        width: 260px;
    }
    .modal-content {
        max-width: 85%;
    }
    .timeline-cards {
        gap: 35px;
    }
    .timeline-markers {
        gap: 35px;
    }
    .timeline-scroll {
        width: calc(100% - 100px);
        margin: 0 50px;
    }
    .scroll-indicator {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
    .scroll-indicator-left {
        left: 5px;
    }
    .scroll-indicator-right {
        right: 5px;
    }
    .modal-navigation {
        gap: 350px; 
    }
}
@media (max-width: 1200px) {
    .container {
        padding: 12px 0 35px;
        min-height: 55vh;
    }
    .timeline-wrapper {
        padding: 12px 0;
    }
    .timeline-content {
        padding: 0 10px;
    }
    .timeline-card {
        width: 240px;
    }
    .timeline-marker {
        width: 240px;
    }
    .timeline-scroll {
        width: calc(100% - 90px);
        margin: 0 45px;
    }
    .timeline-line {
        left: 8px;
        width: calc(100% - 16px);
    }
    .timeline-markers {
        left: 8px;
        width: calc(100% - 16px);
    }
    .modal-grid {
        gap: 20px;
    }
    .modal-header {
        padding: 14px 18px;
    }
    .modal-body {
        padding: 18px;
    }
    .modal-title {
        font-size: 20px;
    }
    .nav-button {
        min-width: 150px;
        padding: 8px 16px;
    }
    .modal-navigation {
        gap: 350px;
    }
}
@media (max-width: 992px) {
    .container {
        min-height: 50vh;
        padding: 10px 0 30px; 
    } 
    .timeline-content {
        padding: 0 10px;
    }
    .timeline-cards {
        gap: 30px;
    }
    .timeline-card {
        width: 220px;
    }
    .timeline-marker {
        width: 220px;
    }
    .timeline-markers {
        gap: 30px;
    }
    .timeline-scroll {
        width: calc(100% - 80px);
        margin: 0 40px;
    }
    .scroll-indicator {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    .scroll-indicator-left {
        left: 5px;
    }
    .scroll-indicator-right {
        right: 5px;
    }
    .timeline-line {
        left: 5px;
        width: calc(100% - 10px);
    }
    .timeline-markers {
        left: 5px;
        width: calc(100% - 10px);
    } 
    .card-title {
        font-size: 18px;
    }
    .modal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .modal-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .modal-year {
        font-size: 18px;
    }
    .modal-navigation {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        padding-left: 10px;
        padding-right: 10px;
    }
    .nav-button {
        width: 100%;
        max-width: none;
        max-width: 300px;
        margin: 0 auto;
    }
    .nav-counter {
        position: static;
        transform: none;
        order: -1;
        margin-bottom: 10px;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
        display: inline-block;
    }
}
@media (max-width: 768px) {
    .container {
        min-height: 45vh; 
        padding: 8px 0 25px; 
    }
    .timeline-wrapper {
        padding: 10px 0 20px;
        overflow: visible;
    }
    .timeline-vertical-line {
        display: none;
    }
    .timeline-cards {
        gap: 25px;
    }
    .timeline-card {
        width: 200px;
    }
    .timeline-marker {
        width: 200px;
    }
    .timeline-markers {
        gap: 25px;
    }
    .timeline-line-container {
        height: 50px;
    }
    .timeline-scroll {
        width: calc(100% - 70px);
        margin: 0 35px;
    }
    .scroll-indicator {
        width: 40px;
        height: 40px;
        font-size: 20px;
        opacity: 0.8;
    }
    .scroll-indicator-left {
        left: 5px;
    }
    .scroll-indicator-right {
        right: 5px;
    }
    .timeline-line-container {
        padding: 0 5px;
    }
    .timeline-line {
        left: 5px;
        width: calc(100% - 10px);
    }
    .timeline-markers {
        left: 5px;
        width: calc(100% - 10px);
    }
    .card-image {
        height: 160px;
    }
    .card-content {
        padding: 18px;
    }
    .card-title {
        font-size: 16px;
    }
    .card-description {
        font-size: 13px;
    }
    .modal-content {
        padding: 0;
        border-radius: 8px;
        max-width: 92%;
        margin: 8px;
        max-height: 90vh;
    }
    .modal-header {
        padding: 14px 16px;
        gap: 10px;
        align-items: flex-start;
    }
    .modal-body {
        padding: 16px;
    }
    .modal-title {
        font-size: 18px;
    }
    .modal-description {
        font-size: 14px;
    }
    .modal-navigation {
        gap: 12px;
    }
    .modal-logo {
        margin-bottom: 12px;
    }
}
@media (max-width: 576px) {
    .container {
        min-height: 40vh; 
        padding: 6px 0 20px; 
    }
    .timeline-card {
        width: 180px;
    }
    .timeline-marker {
        width: 180px;
    }
    .timeline-cards {
        gap: 20px;
    }
    .timeline-markers {
        gap: 20px;
    }
    .timeline-scroll {
        width: calc(100% - 60px);
        margin: 0 30px;
    }
    .scroll-indicator {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    .scroll-indicator-left {
        left: 3px;
    }
    .scroll-indicator-right {
        right: 3px;
    }
    .timeline-line {
        left: 3px;
        width: calc(100% - 6px);
    }
    .timeline-markers {
        left: 3px;
        width: calc(100% - 6px);
    }
    .card-image {
        height: 140px;
    }
    .modal-header {
        padding: 12px 14px;
    }
    .modal-body {
        padding: 14px;
    }
    .modal-title {
        font-size: 17px;
    }
    .modal-description {
        font-size: 13px;
    }
    .nav-button {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 140px;
    }
    .nav-counter {
        font-size: 14px;
        padding: 6px 14px;
    }
    .marker-dot {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }
    .marker-year {
        font-size: 13px;
        padding: 2px 8px;
    }
    .timeline-content {
        padding: 0 10px;
    }
}
@media (max-width: 480px) {
    .container {
        min-height: 35vh; 
        padding: 4px 0 15px;
    }
    .timeline-content {
        padding: 0 5px;
    }
    .timeline-card {
        width: 160px;
    }
    .timeline-marker {
        width: 160px;
    }
    .timeline-cards {
        gap: 15px;
    }
    .timeline-markers {
        gap: 15px;
    }
    .timeline-scroll {
        width: calc(100% - 50px);
        margin: 0 25px;
    }
    .scroll-indicator {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    .scroll-indicator-left {
        left: 2px;
    }
    .scroll-indicator-right {
        right: 2px;
    }
    .card-content {
        padding: 16px;
    }
    .year-badge {
        left: 16px;
        padding: 3px 10px;
        font-size: 12px;
    }
    .modal-content {
        max-width: 95%;
        border-radius: 6px;
        margin: 5px;
        max-height: 95vh;
    }
    .modal-header {
        padding: 10px 12px;
    }
    .modal-body {
        padding: 12px;
    }
    .modal-title {
        font-size: 16px;
    }
    .marker-dot {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }
    .modal-close {
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    .close-icon {
        width: 18px;
        height: 18px;
    }
    .modal-navigation {
        gap: 10px;
        padding-left: 5px;
        padding-right: 5px;
    }
    .modal-logo {
        margin-bottom: 10px;
    }
}
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        padding: 10px 0 20px;
        min-height: 50vh;
    }
    .timeline-card {
        width: 200px;
    }
    .timeline-marker {
        width: 200px;
    }
    .card-image {
        height: 120px;
    }
    .modal-content {
        max-height: 85vh;
    }
}
@media (hover: none) and (pointer: coarse) {
    .timeline-card:hover {
        transform: translateY(0) scale(1);
    }
    .timeline-card:active {
        transform: translateY(-3px) scale(1.01);
    }
    .nav-button:hover:not(:disabled) {
        transform: none;
    }
    .nav-button:active:not(:disabled) {
        transform: translateY(-2px);
    }
    .modal-close:hover {
        transform: none;
    }
    .modal-close:active {
        transform: rotate(90deg) scale(1.1);
    }
    .scroll-indicator:hover {
        transform: translateY(-50%) scale(1);
    }
    .scroll-indicator:active {
        transform: translateY(-50%) scale(1.1);
    }
}