
:root { --primary: #364143; --secondary: #FB4727; --tertiary: #E4E4E6; --text: #333; --bg: #fff; }
* { box-sizing: border-box; }
body { font-family: 'Roboto', sans-serif; background-color: var(--bg); color: var(--primary); margin: 0; padding: 0; display: flex; flex-direction: column; min-height: 100vh; }

/* NAVBAR */
.navbar { background-color: #fff; border-bottom: 1px solid #eee; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; width: 100%; }
.navbar-brand { font-size: 24px; font-weight: 900; color: var(--primary); text-decoration: none; text-transform: uppercase; display: flex; align-items: center; }
.navbar-brand img { height: 40px; margin-right: 10px; }
.navbar-brand span { color: var(--secondary); }
.navbar-menu { display: flex; gap: 20px; }
.navbar-menu a { text-decoration: none; color: var(--primary); font-weight: 700; font-size: 14px; transition: color 0.2s; text-transform: uppercase; }
.navbar-menu a:hover { color: var(--secondary); }

/* MAIN CONTENT WRAPPER */
.main-content { flex: 1; padding: 20px; max-width: 1200px; margin: 0 auto; width: 100%; }

h1 { text-align: center; font-weight: 900; text-transform: none; margin: 20px 0 15px 0; font-size: 24px; color: var(--primary); line-height: 1.2; }
.intro-text { text-align: center; max-width: 800px; margin: 0 auto 25px auto; line-height: 1.5; font-size: 16px; color: var(--text); }

/* BREADCRUMBS */
.breadcrumbs { font-size: 13px; color: #666; margin-bottom: 20px; }
.breadcrumbs ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.breadcrumbs li { display: flex; align-items: center; }
.breadcrumbs li:not(:last-child)::after { content: "›"; margin: 0 8px; color: #ccc; }
.breadcrumbs a { text-decoration: none; color: #666; transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--secondary); text-decoration: underline; }
.breadcrumbs li:last-child { color: var(--primary); font-weight: 700; }

/* CONTROLES Y YEAR SWITCHER */
.year-switcher { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.year-link { padding: 8px 16px; background: var(--tertiary); color: var(--primary); text-decoration: none; font-weight: 700; border-radius: 4px; font-size: 14px; }
.year-link:hover, .year-link.active { background: var(--secondary); color: #fff; }

.controls-container { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 30px; background-color: var(--tertiary); padding: 15px; border-radius: 8px; max-width: 800px; margin-left: auto; margin-right: auto; }
select, button, .btn-year { padding: 10px 20px; font-size: 14px; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; background: #fff; color: var(--primary); white-space: nowrap; text-decoration: none; font-weight: 700; display: inline-block; }
button:hover, .btn-year:hover { color: var(--secondary); border-color: var(--secondary); background-color: #fff; }

/* HUB PAIS */
.years-wrapper { text-align: center; margin: 30px 0; display: flex; justify-content: center; gap: 20px; }
.btn-year { font-size: 18px; padding: 15px 30px; border: 2px solid var(--tertiary); }

/* HOME PAGE ESTILOS */
.home-buttons { display: flex; justify-content: center; gap: 20px; margin: 40px 0; flex-wrap: wrap; }
.btn-country { 
    display: inline-block; padding: 15px 40px; font-size: 18px; font-weight: 900; color: #fff; background-color: var(--primary); text-decoration: none; border-radius: 4px; transition: background 0.3s; text-transform: uppercase;
    font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Roboto", sans-serif; 
}
.btn-country:hover { background-color: var(--secondary); }

.country-section { margin: 50px 0; text-align: center; border-top: 1px solid #eee; padding-top: 30px; }
.country-section h2 { color: var(--primary); margin-bottom: 20px; font-size: 20px; text-transform: uppercase; font-weight: 900; }
.quick-links { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.quick-link { background: #f9f9f9; padding: 10px 20px; border-radius: 4px; text-decoration: none; color: var(--text); font-weight: bold; border: 1px solid #eee; transition: all 0.2s; }
.quick-link:hover { border-color: var(--secondary); color: var(--secondary); background: #fff; }

.creator-section { background-color: #f4f4f4; padding: 40px 20px; margin-top: 60px; border-radius: 8px; text-align: center; }
.creator-section h2 { margin-top: 0; color: var(--secondary); }
.creator-link { color: var(--secondary); text-decoration: none; font-weight: 900; }
.creator-link:hover { text-decoration: underline; }

.contact-section { max-width: 600px; margin: 60px auto 20px; text-align: center; }

/* CALENDARIO */
.calendar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1200px; margin: 0 auto; }
.month-table { width: 100%; }
.month-name { text-align: center; font-weight: 900; font-size: 16px; margin-bottom: 5px; color: #000; border-bottom: 2px solid var(--tertiary); }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { font-size: 11px; font-weight: 900; text-transform: uppercase; color: #000; height: 20px; }
td { text-align: center; font-size: 12px; height: 24px; padding: 0; vertical-align: middle; white-space: nowrap; }
.week-number { font-size: 9px; color: #999; width: 10%; background-color: #f9f9f9; }
.weekend span { color: var(--secondary); font-weight: 700; }
.is-holiday { background-color: var(--tertiary); cursor: help; }
.is-holiday span { color: var(--secondary); font-weight: 700; }

/* LISTAS */
.holidays-wrapper { max-width: 1000px; margin: 40px auto 0 auto; }
.holidays-wrapper h2 { text-align: center; font-weight: 900; text-transform: uppercase; font-size: 18px; color: var(--primary); margin-bottom: 25px; }
.holidays-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 40px; }
.holidays-list li { background: transparent; padding: 6px 0; font-size: 14px; color: var(--primary); border-bottom: 1px solid #f0f0f0; display: flex; align-items: baseline; }
.holidays-list li strong { color: var(--secondary); font-weight: 900; min-width: 60px; display: inline-block; }

/* OTROS CALENDARIOS */
.other-calendars { max-width: 1000px; margin: 50px auto 0; padding-top: 20px; border-top: 1px solid #eee; }
.other-calendars h3 { text-align: center; font-weight: 900; font-size: 18px; margin-bottom: 25px; color: var(--primary); text-transform: uppercase; }
.states-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
.state-link { display: block; text-align: center; padding: 10px; background-color: #f9f9f9; border: 1px solid #e0e0e0; border-radius: 4px; text-decoration: none; color: var(--primary); font-size: 14px; font-weight: 700; transition: all 0.2s ease; }
.state-link:hover { border-color: var(--secondary); color: var(--secondary); background-color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* FOOTER */
.footer { background-color: var(--primary); color: #fff; padding: 40px 20px 30px; margin-top: 50px; text-align: center; font-size: 13px; display: flex; flex-direction: column; align-items: center; }
.footer-logo-link { display: inline-block; margin-bottom: 20px; }
.footer-logo-link img { height: 35px; width: auto; }
.footer a { color: #ccc; text-decoration: none; margin: 0 10px; transition: color 0.2s; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-links { margin-bottom: 15px; }

/* LEGAL PAGES */
.legal-content { max-width: 800px; margin: 0 auto; line-height: 1.6; color: var(--primary); }
.legal-content h2 { text-align: left; margin-top: 30px; font-size: 20px; color: var(--primary); border-bottom: 1px solid var(--tertiary); padding-bottom: 10px; }
.legal-content p { margin-bottom: 15px; }
.legal-content strong { color: var(--primary); }
.legal-content a { color: var(--secondary); text-decoration: none; }
.legal-content a:hover { text-decoration: underline; }

/* RESPONSIVE */
@media screen and (max-width: 768px) { 
    .calendar-grid { grid-template-columns: 1fr; max-width: 400px; } 
    .controls-container { gap: 10px; padding: 10px; overflow-x: auto; } 
    .navbar { flex-direction: column; gap: 15px; }
    .navbar-menu { gap: 15px; font-size: 13px; }
    .home-buttons { flex-direction: column; align-items: center; width: 100%; }
    .btn-country { width: 100%; text-align: center; }
}

/* IMPRESIÓN */
@media print { 
    @page { size: A4 portrait; margin: 5mm; } 
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; } 
    body { margin: 0 !important; padding: 0 !important; background: white !important; width: 100%; display: block; } 
    .navbar, .footer, .controls-container, .intro-text, .other-calendars, .years-wrapper, .breadcrumbs, .home-buttons, .country-section, .creator-section, .contact-section, .year-switcher { display: none !important; } 
    .main-content { padding: 0; margin: 0; width: 100%; max-width: none; }
    h1 { display: block !important; font-size: 18pt !important; margin-top: 10px !important; margin-bottom: 30px !important; text-align: center; } 
    .calendar-grid { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; grid-template-rows: repeat(4, auto) !important; gap: 10px 8px !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; margin-bottom: 30px !important; } 
    .month-table { width: 100% !important; page-break-inside: avoid; break-inside: avoid; } 
    .month-name { font-size: 9pt !important; margin-bottom: 2px !important; } 
    table { font-size: 7pt !important; width: 100% !important; } 
    th { font-size: 6pt !important; height: 12px !important; } 
    td { font-size: 7pt !important; height: 12px !important; padding: 0 !important; } 
    .week-number { font-size: 5pt !important; background-color: #f5f5f5 !important; } 
    .is-holiday { background-color: #E4E4E6 !important; } 
    .weekend span, .is-holiday span { color: #FB4727 !important; } 
    .holidays-wrapper { display: block !important; margin-top: 10px !important; page-break-inside: avoid; } 
    .holidays-wrapper h2 { font-size: 12pt !important; margin-bottom: 10px !important; text-align: left !important; border-bottom: 1px solid #ccc; } 
    .holidays-list { display: grid !important; grid-template-columns: repeat(4, 1fr) !important; gap: 2px 10px !important; } 
    .holidays-list li { font-size: 8pt !important; border: none !important; padding: 2px 0 !important; } 
}
