:root{--th-primary:#1a1a1a;--th-primary-rgb:26,26,26;--th-accent:#E85D04;--th-accent-rgb:232,93,4;--th-accent-dark:#DC2F02;--th-white:#FFF;--th-light:#FAFAFA;--th-gray-200:#E5E7EB;--th-gray-500:#6B7280;--th-gray-700:#374151;--th-gray-800:#1F2937;--th-font-display:'Bebas Neue',Impact,sans-serif;--th-font-body:'Source Sans 3',-apple-system,sans-serif;--th-radius-sm:6px;--th-radius-md:10px;--th-radius-lg:16px;--th-radius-xl:24px;--th-radius-full:9999px;--th-shadow-sm:0 1px 2px rgba(0,0,0,.05);--th-shadow-md:0 4px 6px -1px rgba(0,0,0,.1);--th-shadow-lg:0 10px 15px -3px rgba(0,0,0,.1);--th-shadow-2xl:0 25px 50px -12px rgba(0,0,0,.25);--th-transition:200ms ease;--th-container-max:1400px;--th-header-height:70px}
*,*::before,*::after{box-sizing:border-box}*{margin:0;padding:0}html{scroll-behavior:smooth}body{font-family:var(--th-font-body);font-size:16px;line-height:1.6;color:var(--th-primary);background:var(--th-light);-webkit-font-smoothing:antialiased}img,svg{display:block;max-width:100%;height:auto}a{color:inherit;text-decoration:none}ul,ol{list-style:none}button{font:inherit;cursor:pointer}
h1,h2,h3,h4,h5,h6{font-family:var(--th-font-display);font-weight:400;line-height:1.1;letter-spacing:1px}h1{font-size:clamp(2.5rem,5vw,4rem)}h2{font-size:clamp(2rem,4vw,3rem)}h3{font-size:clamp(1.5rem,3vw,2rem)}
.th-container{width:100%;max-width:var(--th-container-max);margin:0 auto;padding:0 2rem}.th-section{padding:5rem 0}.th-section-light{background:var(--th-light)}.th-section-white{background:var(--th-white)}.th-section-header{display:flex;justify-content:space-between;align-items:flex-end;flex-wrap:wrap;gap:1.5rem;margin-bottom:2.5rem}.th-section-title{font-size:clamp(2rem,4vw,2.5rem);letter-spacing:2px;margin:0}.th-section-subtitle{color:var(--th-gray-500);margin-top:.5rem}
.th-header{position:fixed;top:0;left:0;right:0;z-index:1000;background:rgba(var(--th-primary-rgb),.95);backdrop-filter:blur(12px);height:var(--th-header-height);transition:box-shadow var(--th-transition)}.th-header.is-scrolled{box-shadow:0 4px 30px rgba(0,0,0,.15)}.th-header-inner{display:flex;justify-content:space-between;align-items:flex-start;height:100%}.th-logo{display:flex;align-items:center;gap:.75rem;padding-top:15px;margin-left:0;margin-right:auto;order:1}.th-logo-icon{width:45px;height:45px;background:var(--th-accent);border-radius:var(--th-radius-sm);display:flex;align-items:center;justify-content:center;font-family:var(--th-font-display);font-size:1.4rem;color:var(--th-white)}.th-logo-text{font-family:var(--th-font-display);font-size:1.5rem;letter-spacing:2px;color:var(--th-white)}.th-logo img{height:50px;width:auto;object-fit:contain}
.th-nav{display:flex;align-items:center;gap:.25rem;padding-top:15px;order:2}.th-nav .menu{display:flex;align-items:center;gap:.25rem}.th-nav .menu-item{position:relative}.th-nav .menu-item a{color:rgba(255,255,255,.8);font-size:.9rem;font-weight:500;padding:.5rem 1rem;border-radius:var(--th-radius-sm);transition:all var(--th-transition);display:block}.th-nav .menu-item a:hover,.th-nav .current-menu-item>a{color:var(--th-white);background:rgba(255,255,255,.1)}.th-nav .menu-item.th-menu-cta a{background:var(--th-accent);color:var(--th-white)}.th-nav .menu-item.th-menu-cta a:hover{background:var(--th-accent-dark)}.th-nav .sub-menu{position:absolute;top:100%;left:0;background:var(--th-white);border-radius:var(--th-radius-md);box-shadow:0 20px 25px -5px rgba(0,0,0,.1);padding:.5rem;min-width:200px;opacity:0;visibility:hidden;transform:translateY(10px);transition:all var(--th-transition)}.th-nav .menu-item:hover>.sub-menu{opacity:1;visibility:visible;transform:translateY(0)}.th-nav .sub-menu a{color:var(--th-primary)!important}.th-nav .sub-menu a:hover{background:var(--th-light)!important;color:var(--th-accent)!important}
.th-menu-toggle{display:none;background:0;border:0;color:var(--th-white);font-size:1.5rem;padding:.5rem;margin-top:15px;order:3}.th-mobile-menu{display:none;position:fixed;top:var(--th-header-height);left:0;right:0;bottom:0;background:rgba(var(--th-primary-rgb),.98);padding:1rem;flex-direction:column;overflow-y:auto;z-index:999;align-items:flex-end}.th-mobile-menu.is-active{display:flex}.th-mobile-menu a{color:var(--th-white);padding:1.2rem 1rem;border-radius:var(--th-radius-sm);font-size:1.25rem;text-align:right;line-height:1.4}.th-mobile-menu a:hover{background:rgba(255,255,255,.1)}.th-mobile-menu .sub-menu{padding-left:0;padding-right:1.5rem;text-align:right}.th-mobile-menu .sub-menu a{font-size:1.1rem;color:rgba(255,255,255,.7);padding:0.8rem 1rem}
.th-hero{min-height:100vh;background:linear-gradient(135deg,var(--th-primary) 0%,#2d2d2d 100%);position:relative;display:flex;align-items:center;overflow:hidden;padding-top:var(--th-header-height)}.th-hero::before{content:'';position:absolute;inset:0;opacity:.03;pointer-events:none}.th-hero-shape{position:absolute;background:var(--th-accent);border-radius:50%;filter:blur(100px);pointer-events:none}.th-hero-shape-1{width:600px;height:600px;top:-200px;right:-100px;opacity:.1}.th-hero-shape-2{width:400px;height:400px;bottom:-100px;left:-100px;opacity:.06}.th-hero-content{position:relative;z-index:1;display:grid;grid-template-columns:1fr 1fr;gap:4rem;align-items:center;padding:4rem 0}.th-hero-title{font-size:clamp(3rem,7vw,5.5rem);line-height:.95;color:var(--th-white);margin-bottom:1.5rem;letter-spacing:2px}.th-hero-title span{color:var(--th-accent)}.th-hero-subtitle{color:rgba(255,255,255,.7);font-size:1.15rem;max-width:500px;margin-bottom:2rem}.th-hero-stats{display:flex;gap:3rem;margin-top:3rem}.th-stat-value{font-family:var(--th-font-display);font-size:2.8rem;color:var(--th-accent);line-height:1}.th-stat-label{color:rgba(255,255,255,.5);font-size:.8rem;text-transform:uppercase;letter-spacing:1px;margin-top:.25rem}
.th-next-event{background:var(--th-white);border-radius:var(--th-radius-xl);padding:2rem;box-shadow:var(--th-shadow-2xl);animation:slideUp .8s ease .2s both}@keyframes slideUp{from{opacity:0;transform:translateY(40px)}to{opacity:1;transform:translateY(0)}}.th-event-badge{display:inline-block;background:var(--th-accent);color:var(--th-white);padding:.4rem 1rem;border-radius:var(--th-radius-full);font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:1px;margin-bottom:1rem}.th-next-event-title{font-family:var(--th-font-display);font-size:1.8rem;margin-bottom:.5rem;letter-spacing:1px;color:var(--th-primary)}.th-next-event-location{color:var(--th-gray-500);display:flex;align-items:center;gap:.5rem;margin-bottom:1.5rem}.th-countdown{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin-bottom:1.5rem}.th-countdown-item{background:var(--th-light);border-radius:var(--th-radius-md);padding:1rem .5rem;text-align:center}.th-countdown-value{font-family:var(--th-font-display);font-size:2rem;color:var(--th-primary);line-height:1}.th-countdown-label{font-size:.7rem;color:var(--th-gray-500);text-transform:uppercase;letter-spacing:.5px;margin-top:.25rem}.th-event-meta{display:flex;gap:.5rem;margin-bottom:1.5rem;flex-wrap:wrap}.th-event-meta-item{display:flex;align-items:center;gap:.5rem;background:var(--th-light);padding:.5rem 1rem;border-radius:var(--th-radius-sm);font-size:.85rem;color:var(--th-gray-700)}.th-event-meta-item svg{width:16px;height:16px;color:var(--th-accent);flex-shrink:0}
.th-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:1rem 2rem;font-family:var(--th-font-body);font-size:1rem;font-weight:600;border-radius:var(--th-radius-md);border:0;transition:all var(--th-transition)}.th-btn-block{width:100%}.th-btn-primary{background:var(--th-accent);color:var(--th-white)}.th-btn-primary:hover{background:var(--th-accent-dark);transform:translateY(-2px);box-shadow:0 10px 30px rgba(var(--th-accent-rgb),.3)}.th-btn-secondary{background:var(--th-primary);color:var(--th-white)}.th-btn-secondary:hover{background:var(--th-gray-800)}.th-btn-outline{background:0;border:2px solid var(--th-gray-200);color:var(--th-primary)}.th-btn-outline:hover{border-color:var(--th-accent);color:var(--th-accent)}
.th-quick-access{background:var(--th-white);padding:4rem 0;border-bottom:1px solid var(--th-gray-200)}.th-quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.5rem}.th-quick-card{background:var(--th-light);border-radius:var(--th-radius-lg);padding:2rem;display:flex;flex-direction:column;gap:1rem;transition:all var(--th-transition)}.th-quick-card:hover{transform:translateY(-5px);box-shadow:var(--th-shadow-lg)}.th-quick-card-icon{width:50px;height:50px;background:var(--th-white);border-radius:var(--th-radius-md);display:flex;align-items:center;justify-content:center;font-size:1.5rem;box-shadow:var(--th-shadow-sm)}.th-quick-card-title{font-family:var(--th-font-display);font-size:1.3rem;letter-spacing:1px;margin:0}.th-quick-card-desc{color:var(--th-gray-500);font-size:.9rem;line-height:1.5}.th-quick-card-arrow{color:var(--th-accent);margin-top:auto;font-size:1.2rem;transition:transform var(--th-transition)}.th-quick-card:hover .th-quick-card-arrow{transform:translateX(5px)}
.th-events-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:1.5rem}.th-event-card{background:var(--th-white);border-radius:var(--th-radius-lg);padding:1.5rem;display:flex;gap:1.5rem;align-items:center;transition:all var(--th-transition)}.th-event-card:hover{box-shadow:var(--th-shadow-lg);transform:translateY(-2px)}.th-event-date{background:var(--th-primary);color:var(--th-white);border-radius:var(--th-radius-md);padding:1rem;text-align:center;min-width:70px;flex-shrink:0}.th-event-date-day{font-family:var(--th-font-display);font-size:2rem;line-height:1}.th-event-date-month{font-size:.7rem;text-transform:uppercase;letter-spacing:1px;opacity:.8}.th-event-info{flex:1;min-width:0}.th-event-info h3{font-family:var(--th-font-body);font-weight:600;font-size:1rem;margin:0 0 .25rem;letter-spacing:0}.th-event-info p{color:var(--th-gray-500);font-size:.85rem;margin:0}
.th-tag{padding:.35rem .75rem;border-radius:var(--th-radius-full);font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.5px;flex-shrink:0}.th-tag-liga{background:#DBEAFE;color:#1E40AF}.th-tag-copa{background:#D1FAE5;color:#065F46}.th-tag-campeonato{background:#FEE2E2;color:#991B1B}.th-tag-larga,.th-tag-larga-distancia{background:#FEF3C7;color:#92400E}.th-tag-verano,.th-tag-liga-verano{background:#E0E7FF;color:#3730A3}.th-tag-promocional{background:#F3E8FF;color:#6B21A8}
.th-rankings-tabs{display:flex;gap:.5rem;flex-wrap:wrap;margin-bottom:2rem}.th-rankings-tab{padding:.75rem 1.5rem;border:2px solid var(--th-gray-200);border-radius:var(--th-radius-full);background:0;font-size:.9rem;font-weight:500;transition:all var(--th-transition);color:var(--th-gray-700)}.th-rankings-tab:hover{border-color:var(--th-accent);color:var(--th-accent)}.th-rankings-tab.is-active{background:var(--th-accent);border-color:var(--th-accent);color:var(--th-white)}.th-rankings-content{display:none}.th-rankings-content.is-active{display:block}.th-rankings-table{background:var(--th-light);border-radius:var(--th-radius-lg);overflow:hidden}.th-rankings-header{display:grid;grid-template-columns:60px 1fr 100px 100px 100px;padding:1rem 1.5rem;background:var(--th-primary);color:var(--th-white);font-size:.75rem;text-transform:uppercase;letter-spacing:1px;font-weight:600}.th-rankings-row{display:grid;grid-template-columns:60px 1fr 100px 100px 100px;padding:1rem 1.5rem;border-bottom:1px solid var(--th-gray-200);align-items:center;transition:background var(--th-transition)}.th-rankings-row:hover{background:var(--th-white)}.th-rankings-row:last-child{border-bottom:0}.th-rankings-pos{font-family:var(--th-font-display);font-size:1.3rem}.th-rankings-pos.is-gold{color:#F59E0B}.th-rankings-pos.is-silver{color:#9CA3AF}.th-rankings-pos.is-bronze{color:#B45309}.th-rankings-name{font-weight:600}.th-rankings-club{color:var(--th-gray-500);font-size:.85rem}.th-rankings-points{font-family:var(--th-font-display);font-size:1.3rem;color:var(--th-accent)}
.th-news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2rem}.th-news-card{background:var(--th-white);border-radius:var(--th-radius-lg);overflow:hidden;transition:all var(--th-transition)}.th-news-card:hover{transform:translateY(-5px);box-shadow:var(--th-shadow-lg)}.th-news-card-image{width:100%;height:200px;object-fit:cover}.th-news-card-placeholder{width:100%;height:200px;background:linear-gradient(135deg,var(--th-accent) 0%,var(--th-accent-dark) 100%);display:flex;align-items:center;justify-content:center;color:var(--th-white);font-size:3rem}.th-news-card-content{padding:1.5rem}.th-news-card-date{color:var(--th-accent);font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:1px}.th-news-card-title{font-family:var(--th-font-body);font-weight:600;font-size:1.1rem;margin:.5rem 0;line-height:1.4;color:var(--th-primary);letter-spacing:0}.th-news-card-excerpt{color:var(--th-gray-500);font-size:.9rem;margin:0}
.th-page-header{background:var(--th-primary);color:var(--th-white);padding:calc(var(--th-header-height) + 4rem) 0 4rem}.th-page-header-grid{display:grid;grid-template-columns:1fr 400px;gap:4rem;align-items:start}.th-page-title{font-size:clamp(2rem,5vw,3.5rem);margin-bottom:1rem}.th-event-single-meta{display:flex;flex-wrap:wrap;gap:1.5rem;margin-top:2rem}.th-event-single-meta-item{display:flex;align-items:center;gap:.5rem;color:rgba(255,255,255,.8)}.th-event-single-meta-item svg{color:var(--th-accent);width:20px;height:20px}.th-event-sidebar{background:var(--th-white);border-radius:var(--th-radius-lg);padding:2rem;color:var(--th-primary)}.th-event-content{padding:4rem 0}.th-event-content-grid{display:grid;grid-template-columns:1fr 350px;gap:4rem}.th-event-description{font-size:1.05rem;line-height:1.8}.th-event-description h2,.th-event-description h3{margin-top:2rem;margin-bottom:1rem;font-family:var(--th-font-body);font-weight:700;letter-spacing:0}.th-event-description ul,.th-event-description ol{margin:1rem 0;padding-left:2rem}.th-event-description li{margin-bottom:.5rem;list-style:disc}.th-event-description ol li{list-style:decimal}.th-sticky-sidebar{position:sticky;top:calc(var(--th-header-height) + 2rem)}.th-sidebar-card{background:var(--th-white);border-radius:var(--th-radius-lg);padding:2rem;margin-bottom:1.5rem;box-shadow:var(--th-shadow-md)}.th-sidebar-card-title{font-family:var(--th-font-display);font-size:1.2rem;margin-bottom:1rem;letter-spacing:1px}
.th-archive-header{background:var(--th-primary);color:var(--th-white);padding:calc(var(--th-header-height) + 3rem) 0 3rem}.th-archive-title{font-size:clamp(2rem,4vw,3rem);margin:0}.th-archive-desc{color:rgba(255,255,255,.7);margin-top:.5rem}.th-posts-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(350px,1fr));gap:2rem}
.th-footer{background:var(--th-primary);color:var(--th-white);padding:4rem 0 2rem}.th-footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:3rem}.th-footer-brand p{color:rgba(255,255,255,.6);margin-top:1rem;max-width:300px;font-size:.95rem}.th-footer-title{font-family:var(--th-font-display);font-size:1.1rem;letter-spacing:1px;margin-bottom:1rem}.th-footer-links a,.th-footer-widget a{color:rgba(255,255,255,.6);font-size:.9rem;display:block;padding:.25rem 0;transition:color var(--th-transition)}.th-footer-links a:hover,.th-footer-widget a:hover{color:var(--th-accent)}.th-footer-sponsors{display:flex;gap:1rem;flex-wrap:wrap;margin-top:1rem}.th-footer-sponsor{width:55px;height:55px;background:rgba(255,255,255,.1);border-radius:var(--th-radius-sm);display:flex;align-items:center;justify-content:center;font-size:.7rem;color:rgba(255,255,255,.5)}.th-footer-bottom{margin-top:3rem;padding-top:2rem;border-top:1px solid rgba(255,255,255,.1);display:flex;justify-content:space-between;align-items:center;color:rgba(255,255,255,.4);font-size:.85rem}.th-footer-social{display:flex;gap:.5rem}.th-footer-social a{width:40px;height:40px;background:rgba(255,255,255,.1);border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--th-white);transition:background var(--th-transition)}.th-footer-social a:hover{background:var(--th-accent)}
.th-pagination{display:flex;justify-content:center;gap:.5rem;margin-top:4rem}.th-pagination a,.th-pagination span,.nav-links a,.nav-links span{display:flex;align-items:center;justify-content:center;min-width:45px;height:45px;padding:0 1rem;background:var(--th-white);border-radius:var(--th-radius-md);font-weight:500;transition:all var(--th-transition)}.th-pagination a:hover,.nav-links a:hover{background:var(--th-primary);color:var(--th-white)}.th-pagination .current,.nav-links .current{background:var(--th-accent);color:var(--th-white)}
.th-no-events{text-align:center;padding:4rem 2rem;background:var(--th-white);border-radius:var(--th-radius-lg)}.th-no-events-icon{font-size:4rem;margin-bottom:1rem}.th-no-events h3{margin-bottom:.5rem}.th-no-events p{color:var(--th-gray-500)}
@media(max-width:1200px){.th-hero-content{grid-template-columns:1fr;text-align:center;gap:3rem}.th-hero-subtitle{margin-left:auto;margin-right:auto}.th-hero-stats{justify-content:center}.th-next-event{max-width:450px;margin:0 auto}.th-quick-grid{grid-template-columns:repeat(2,1fr)}.th-footer-grid{grid-template-columns:1fr 1fr}.th-page-header-grid{grid-template-columns:1fr}.th-event-content-grid{grid-template-columns:1fr}.th-sticky-sidebar{position:static}}
@media(max-width:768px){:root{--th-header-height:60px}.th-nav{display:none}.th-menu-toggle{display:block}.th-logo{margin-right:0!important}.th-logo img{height:35px!important}.th-logo-icon{width:35px!important;height:35px!important;font-size:1.1rem!important}.th-logo-text{font-size:1.2rem!important}.th-mobile-menu{text-align:right}.th-mobile-menu a{padding:1.2rem 1rem!important;font-size:1.25rem!important;letter-spacing:0.5px;line-height:1.4}.th-mobile-menu .sub-menu a{padding:0.8rem 1rem!important}.th-hero{min-height:auto;padding-top:calc(var(--th-header-height) + 3rem)!important}.th-hero-content{padding:2rem 0}.th-hero-title{font-size:2.5rem}.th-hero-stats{flex-direction:column;gap:1.5rem}.th-event-hero{padding-top:calc(var(--th-header-height) + 6rem)!important}.th-quick-grid,.th-events-grid,.th-news-grid,.th-posts-grid{grid-template-columns:1fr}.th-footer-grid{grid-template-columns:1fr;text-align:center}.th-footer-brand p{margin-left:auto;margin-right:auto}.th-footer-sponsors{justify-content:center}.th-footer-bottom{flex-direction:column;gap:1rem}.th-rankings-header,.th-rankings-row{grid-template-columns:50px 1fr 70px}.th-rankings-header>*:nth-child(3),.th-rankings-header>*:nth-child(4),.th-rankings-row>*:nth-child(3),.th-rankings-row>*:nth-child(4){display:none}.th-section{padding:3rem 0}.th-container{padding:0 1rem}}
body.admin-bar .th-header{top:32px}@media(max-width:782px){body.admin-bar .th-header{top:46px}}

/* EVENT HERO WITH BACKGROUND */
.th-event-hero{background:var(--th-primary);color:var(--th-white);padding:calc(var(--th-header-height) + 3rem) 0 3rem;background-size:cover;background-position:center}
.th-event-hero-grid{display:grid;grid-template-columns:1fr 400px;gap:3rem;align-items:start}
.th-event-hero-info{padding-right:2rem}
.th-event-distances{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.5rem}
.th-distance-badge{background:rgba(255,255,255,.15);backdrop-filter:blur(10px);padding:.75rem 1.25rem;border-radius:var(--th-radius-md);text-align:center}
.th-distance-badge strong{display:block;font-size:1rem;margin-bottom:.25rem}
.th-distance-badge span{font-size:.85rem;opacity:.8}

/* EVENT POSTER */
.th-event-poster{margin-bottom:2rem;position:relative;display:inline-block;max-width:100%;text-align:left}
.th-event-poster-img{width:auto;max-width:100%;height:auto;max-height:600px;border-radius:var(--th-radius-lg);box-shadow:var(--th-shadow-lg);display:block}
.th-poster-zoom{position:absolute;bottom:1rem;right:1rem;background:rgba(0,0,0,.7);color:white;padding:.5rem 1rem;border-radius:var(--th-radius-sm);font-size:.85rem;opacity:0;transition:opacity .2s;pointer-events:none}
.th-lightbox-trigger{display:inline-block;position:relative}
.th-lightbox-trigger:hover .th-poster-zoom{opacity:1}
/* Centrar el poster en su contenedor */
.th-event-main{text-align:center}
.th-event-description{text-align:left}

/* LIGHTBOX */
.th-lightbox{position:fixed;inset:0;background:rgba(0,0,0,.95);z-index:9999;display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:all .3s}
.th-lightbox.is-active{opacity:1;visibility:visible}
.th-lightbox img{max-width:90%;max-height:90%;object-fit:contain;border-radius:var(--th-radius-md)}
.th-lightbox-close{position:absolute;top:1rem;right:1rem;background:var(--th-accent);color:white;border:none;width:50px;height:50px;border-radius:50%;font-size:2rem;cursor:pointer}

/* EVENT BUTTONS */
.th-event-buttons{margin-top:3rem;padding-top:2rem;border-top:1px solid var(--th-gray-200)}
.th-event-buttons h3{margin-bottom:1rem}
.th-buttons-grid{display:flex;flex-wrap:wrap;gap:.75rem}
.th-doc-btn{display:inline-flex;align-items:center;gap:.5rem;padding:.75rem 1.5rem;background:var(--th-light);border:2px solid var(--th-gray-200);border-radius:var(--th-radius-md);font-weight:500;transition:all .2s}
.th-doc-btn:hover{border-color:var(--th-accent);color:var(--th-accent)}
.th-doc-btn-icon{font-size:1.25rem}

/* DATA TABLE */
.th-data-table{width:100%;border-collapse:collapse}
.th-data-table th,.th-data-table td{padding:.5rem;text-align:left;border-bottom:1px solid var(--th-gray-200);font-size:.9rem}
.th-data-table th{font-weight:600;color:var(--th-gray-500);text-transform:uppercase;font-size:.75rem;letter-spacing:.5px}

/* WEATHER WIDGET */
.th-weather-widget{background:var(--th-white);border-radius:var(--th-radius-lg);padding:1.5rem;margin-bottom:1.5rem;box-shadow:var(--th-shadow-md)}
.th-weather-title{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1rem;letter-spacing:1px}
.th-weather-days{display:grid;grid-template-columns:repeat(3,1fr);gap:.75rem}
.th-weather-day{background:var(--th-light);border-radius:var(--th-radius-md);padding:1rem;text-align:center}
.th-weather-day-main{background:linear-gradient(135deg,var(--th-accent),var(--th-accent-dark));color:white}
.th-weather-label{display:block;font-size:.7rem;text-transform:uppercase;letter-spacing:.5px;opacity:.7;margin-bottom:.5rem}
.th-weather-icon{display:block;font-size:2rem;margin-bottom:.25rem}
.th-weather-temp{display:block;font-weight:600;margin-bottom:.25rem}
.th-weather-desc{display:block;font-size:.75rem;opacity:.8}
.th-weather-precip,.th-weather-wind{display:block;font-size:.7rem;margin-top:.25rem;opacity:.7}

/* EVENT RESULTS */
.th-event-results{margin-top:2rem;padding:2rem;background:var(--th-light);border-radius:var(--th-radius-lg)}
.th-event-results h3{margin-bottom:1rem}

/* GALLERY */
.th-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:1rem;margin-top:2rem}
.th-gallery-item{aspect-ratio:1;overflow:hidden;border-radius:var(--th-radius-md)}
.th-gallery-item img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.th-gallery-item:hover img{transform:scale(1.05)}

/* RESPONSIVE UPDATES */
@media(max-width:1200px){.th-event-hero-grid{grid-template-columns:1fr}.th-event-hero-sidebar{max-width:400px}}
@media(max-width:768px){.th-weather-days{grid-template-columns:1fr}.th-event-distances{flex-direction:column}}

/* CLASIFICACIONES FADONLINE */
.th-clasificacion-fadonline{background:var(--th-white);border-radius:var(--th-radius-lg);padding:1.5rem;box-shadow:var(--th-shadow-md)}
.th-clasif-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap;gap:1rem}
.th-clasif-header h3{font-family:var(--th-font-display);font-size:1.25rem;margin:0}
.th-clasif-tabs{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.5rem;border-bottom:2px solid var(--th-gray-200);padding-bottom:1rem}
.th-clasif-tab{padding:.5rem 1rem;background:transparent;border:none;font-size:.85rem;font-weight:600;color:var(--th-gray-500);cursor:pointer;border-radius:var(--th-radius-sm);transition:all .2s}
.th-clasif-tab:hover{background:var(--th-light);color:var(--th-dark)}
.th-clasif-tab.is-active{background:var(--th-accent);color:white}
.th-clasif-panel{display:none}
.th-clasif-panel.is-active{display:block}
.th-clasif-table{border:1px solid var(--th-gray-200);border-radius:var(--th-radius-md);overflow:hidden}
.th-clasif-row{display:grid;grid-template-columns:60px 1fr 80px;align-items:center;padding:.75rem 1rem;border-bottom:1px solid var(--th-gray-100)}
.th-clasif-row:last-child{border-bottom:0}
.th-clasif-header-row{background:var(--th-light);font-weight:600;font-size:.8rem;text-transform:uppercase;letter-spacing:.5px;color:var(--th-gray-500)}
.th-clasif-pos{font-weight:700;font-size:1.1rem;text-align:center}
.th-clasif-nombre strong{display:block;font-size:.95rem}
.th-clasif-nombre small{color:var(--th-gray-500);font-size:.8rem}
.th-clasif-puntos{font-weight:700;font-size:1.1rem;color:var(--th-accent);text-align:right}
.th-clasif-footer{margin-top:1.5rem;text-align:center;font-size:.85rem}
.th-clasif-footer a{color:var(--th-accent)}

/* FOOTER STYLES */
.th-footer{background:var(--th-dark);color:var(--th-gray-300);padding:4rem 0 2rem}
.th-footer-grid{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr;gap:3rem;margin-bottom:3rem}
.th-footer-brand .th-logo{margin-bottom:1rem}
.th-footer-brand p{font-size:.9rem;line-height:1.7;opacity:.8}
.th-footer-title{font-family:var(--th-font-display);font-size:.9rem;letter-spacing:1px;margin-bottom:1rem;color:var(--th-white)}
.th-footer-links{list-style:none;padding:0;margin:0}
.th-footer-links li{margin-bottom:.5rem}
.th-footer-links a{color:var(--th-gray-400);font-size:.9rem;transition:color .2s}
.th-footer-links a:hover{color:var(--th-accent)}
.th-footer-sponsors{display:flex;gap:1rem;flex-wrap:wrap;margin-top:1.5rem}
.th-footer-sponsor-link img{height:40px;width:auto;filter:grayscale(100%) brightness(2);opacity:.6;transition:all .2s}
.th-footer-sponsor-link:hover img{filter:none;opacity:1}
.th-footer-bottom{display:flex;justify-content:space-between;align-items:center;padding-top:2rem;border-top:1px solid rgba(255,255,255,.1);font-size:.85rem}
.th-footer-social{display:flex;gap:1rem}
.th-footer-social a{color:var(--th-gray-400);transition:color .2s}
.th-footer-social a:hover{color:var(--th-accent)}

@media(max-width:992px){.th-footer-grid{grid-template-columns:1fr 1fr}}
@media(max-width:576px){.th-footer-grid{grid-template-columns:1fr}.th-footer-bottom{flex-direction:column;gap:1rem;text-align:center}}

/* ORGANIZADORES */
.th-event-organizadores{margin-top:2rem}
.th-event-organizadores h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1.5rem}
.th-organizadores-grid{display:flex;flex-wrap:wrap;gap:1.5rem;align-items:center}
.th-organizador-item{background:var(--th-light);border-radius:var(--th-radius-md);padding:1.5rem;transition:transform .2s}
.th-organizador-item:hover{transform:scale(1.05)}
.th-organizador-item img{max-height:80px;max-width:180px;width:auto;height:auto;object-fit:contain}
/* Centrar organizadores en taller y senda */
.th-organizadores-centered{justify-content:center}

/* GALERIA */
.th-event-galeria h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1.5rem}
.th-galeria-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));gap:1rem}
.th-galeria-item{border-radius:var(--th-radius-md);overflow:hidden;aspect-ratio:4/3}
.th-galeria-item img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.th-galeria-item:hover img{transform:scale(1.1)}

/* DORSALES TABLE */
.th-dorsales-table{margin-top:1rem}
.th-event-dorsales h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1rem}

/* DISTANCIAS HERO */
.th-event-distances{display:flex;flex-wrap:wrap;gap:1rem;margin-top:1.5rem}
.th-distance-badge{background:rgba(255,255,255,0.1);border:1px solid rgba(255,255,255,0.2);border-radius:var(--th-radius-md);padding:0.75rem 1rem;text-align:center}
.th-distance-badge strong{display:block;font-size:1rem;margin-bottom:0.25rem}
.th-distance-badge span{display:block;font-size:0.85rem;opacity:0.8}
.th-distance-hora{color:var(--th-accent)!important;font-weight:600;opacity:1!important;margin-top:0.25rem}

/* HERO EVENT GRID */
.th-event-hero-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:3rem;align-items:center}
.th-event-hero-info{}
.th-event-hero-sidebar{}
@media(max-width:992px){.th-event-hero-grid{grid-template-columns:1fr}}

/* EVENT CONTENT GRID */
.th-event-content{padding:3rem 0}
.th-event-content-grid{display:grid;grid-template-columns:1fr 350px;gap:3rem}
.th-event-main{}
.th-sticky-sidebar{position:sticky;top:2rem;align-self:start}
@media(max-width:992px){.th-event-content-grid{grid-template-columns:1fr}.th-sticky-sidebar{position:static}}

/* POSTER */
.th-event-poster{margin-bottom:2rem;position:relative}
.th-event-poster-img{width:100%;border-radius:var(--th-radius-lg);box-shadow:var(--th-shadow-lg)}
.th-poster-zoom{position:absolute;bottom:1rem;right:1rem;background:rgba(0,0,0,0.7);color:white;padding:0.5rem 1rem;border-radius:var(--th-radius-sm);font-size:0.85rem;opacity:0;transition:opacity .3s}
.th-event-poster:hover .th-poster-zoom{opacity:1}

/* BUTTONS GRID */
.th-event-buttons{margin-top:2rem}
.th-event-buttons h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1rem}
.th-buttons-grid{display:flex;flex-wrap:wrap;gap:0.75rem}
.th-doc-btn{display:inline-flex;align-items:center;gap:0.5rem;padding:0.75rem 1.25rem;background:var(--th-light);border-radius:var(--th-radius-md);color:var(--th-dark);font-weight:500;transition:all .2s}
.th-doc-btn:hover{background:var(--th-accent);color:white}
.th-doc-btn-icon{font-size:1.2rem}

/* RESULTS */
.th-event-results{margin-top:2rem}
.th-event-results h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1rem}

/* SIDEBAR CARD */
.th-sidebar-card{background:var(--th-white);border-radius:var(--th-radius-lg);padding:1.5rem;box-shadow:var(--th-shadow-md);margin-bottom:1.5rem}
.th-sidebar-card-title{font-family:var(--th-font-display);font-size:0.9rem;margin-bottom:1rem;color:var(--th-gray-500)}

/* DATA TABLE */
.th-data-table{width:100%;border-collapse:collapse;font-size:0.9rem}
.th-data-table th,.th-data-table td{padding:0.75rem;text-align:left;border-bottom:1px solid var(--th-gray-200)}
.th-data-table th{font-weight:600;color:var(--th-gray-500);font-size:0.8rem;text-transform:uppercase}
.th-data-table tbody tr:last-child td{border-bottom:0}

/* BTN LG */
.th-btn-lg{padding:1rem 2rem;font-size:1.1rem}

/* LIGHTBOX */
.th-lightbox{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.95);z-index:9999;justify-content:center;align-items:center}
.th-lightbox.is-active{display:flex}
.th-lightbox-close{position:absolute;top:1rem;right:1rem;background:transparent;border:none;color:white;font-size:2rem;cursor:pointer;width:50px;height:50px}
#th-lightbox-img{max-width:90%;max-height:90%;object-fit:contain}

/* RANKINGS TABS */
.th-rankings-tabs{display:flex;flex-wrap:wrap;gap:0.5rem;border-bottom:2px solid var(--th-gray-200);padding-bottom:1rem}
.th-rankings-tab{padding:0.75rem 1.5rem;background:transparent;border:none;font-size:0.9rem;font-weight:600;color:var(--th-gray-500);cursor:pointer;border-radius:var(--th-radius-sm);transition:all .2s}
.th-rankings-tab:hover{background:var(--th-light);color:var(--th-dark)}
.th-rankings-tab.is-active{background:var(--th-accent);color:white}
.th-rankings-content{display:none}
.th-rankings-content.is-active{display:block}

/* TAGS PARA TIPOS DE EVENTO */
.th-tag-taller{background:#6366f1;color:#fff}
.th-tag-senda{background:#059669;color:#fff}

/* COLORES FECHA POR TIPO */
.th-date-evento{background:var(--th-primary)}
.th-date-taller{background:#6366f1}
.th-date-senda{background:#059669}

/* FOOTER LOGOS */
.th-footer-logos{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2rem;padding-bottom:3rem;margin-bottom:3rem;border-bottom:1px solid rgba(255,255,255,.1)}
.th-footer-logo-item{background:rgba(255,255,255,.95);border-radius:var(--th-radius-md);padding:1rem;transition:all .2s}
.th-footer-logo-item:hover{background:rgba(255,255,255,1);transform:scale(1.05)}
.th-footer-logo-item img{max-height:50px;max-width:120px;width:auto;height:auto;object-fit:contain;transition:opacity .2s}
.th-footer-logo-item:hover img{opacity:1}

/* MINI DISTANCIAS EN CONTADOR */
.th-next-event-distances{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 1.5rem;padding-top:1rem;border-top:1px solid var(--th-gray-200)}
.th-mini-distance{background:var(--th-light);padding:.5rem .75rem;border-radius:var(--th-radius-sm);font-size:.8rem;text-align:center}
.th-mini-distance strong{display:block;color:var(--th-primary);font-size:.9rem}
.th-mini-distance span{color:var(--th-gray-500)}
.th-mini-hora{color:var(--th-accent)!important;font-weight:600}

/* FOOTER FORZAR NEGRO */
footer.th-footer,
.th-footer{
    background:#1a1a1a!important;
    background-color:#1a1a1a!important;
    color:#fff!important;
}
.th-footer *{color:inherit}
.th-footer a{color:rgba(255,255,255,.7)}
.th-footer a:hover{color:var(--th-accent)}
.th-footer-title{color:#fff}
.th-footer-bottom{color:rgba(255,255,255,.5)}

/* MATERIAL OBLIGATORIO */
.th-event-material{margin:2rem 0}
.th-event-material h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1rem}
.th-material-list{display:flex;flex-wrap:wrap;gap:.75rem}
.th-material-badge{display:flex;align-items:center;gap:.5rem;background:var(--th-light);padding:.75rem 1rem;border-radius:var(--th-radius-md);font-size:.9rem}
.th-material-badge-icon{font-size:1.3rem}

/* IMÁGENES ADAPTADAS AL FORMATO */
.th-news-card-image,.th-img-cover{width:100%;height:200px;object-fit:cover}
.th-news-card-placeholder{width:100%;height:200px;display:flex;align-items:center;justify-content:center;font-size:3rem}

/* CARDS PASADAS */
.th-card-past{opacity:.75}
.th-card-past:hover{opacity:1}

/* FOOTER LOGOS A COLOR (sin filtro) */
.th-footer-logos{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2rem;padding-bottom:3rem;margin-bottom:3rem;border-top:none;border-bottom:1px solid rgba(255,255,255,.15)}
.th-footer-logo-item{background:rgba(255,255,255,.95);border-radius:var(--th-radius-md);padding:.75rem 1rem;transition:transform .2s}
.th-footer-logo-item:hover{transform:scale(1.05)}
.th-footer-logo-item img{max-height:50px;max-width:130px;width:auto;height:auto;object-fit:contain}

/* WEATHER WIDGET */
.th-weather-widget{text-align:center;padding:1rem}
.th-weather-icon{font-size:3rem;margin-bottom:.5rem}
.th-weather-temp{font-family:var(--th-font-display);font-size:2.5rem;color:var(--th-accent)}
.th-weather-desc{color:var(--th-gray-500);text-transform:capitalize}
.th-weather-details{display:flex;justify-content:center;gap:1.5rem;margin-top:1rem;font-size:.85rem;color:var(--th-gray-500)}

/* FOOTER FORZAR NEGRO */
footer.th-footer,.th-footer{background:#1a1a1a!important;color:#fff}
.th-footer a{color:rgba(255,255,255,.7)}
.th-footer a:hover{color:var(--th-accent)}
.th-footer-title{color:#fff!important}
.th-footer-bottom{color:rgba(255,255,255,.5)}
.th-footer-social a{background:rgba(255,255,255,.15);color:#fff}
.th-footer-social a:hover{background:var(--th-accent)}

/* FOOTER LOGOS A COLOR (sin filtro) */
.th-footer-logos{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2rem;padding-bottom:3rem;margin-bottom:3rem;border-bottom:1px solid rgba(255,255,255,.1)}
.th-footer-logo-item{background:rgba(255,255,255,.95);border-radius:var(--th-radius-md);padding:1rem;transition:all .2s}
.th-footer-logo-item:hover{transform:scale(1.05)}
.th-footer-logo-item img{max-height:50px;max-width:120px;width:auto;height:auto;object-fit:contain}

/* MATERIAL OBLIGATORIO */
.th-event-material{margin-top:2rem}
.th-event-material h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1rem}
.th-material-list{display:flex;flex-wrap:wrap;gap:.75rem}
.th-material-badge{display:flex;align-items:center;gap:.5rem;background:var(--th-light);padding:.75rem 1rem;border-radius:var(--th-radius-md);font-size:.9rem}
.th-material-badge-icon{font-size:1.3rem}

/* IMAGENES ADAPTABLES */
.th-news-card-image.th-img-cover{width:100%;height:200px;object-fit:cover}
.th-card-past{opacity:.75}
.th-card-past:hover{opacity:1}

/* WEATHER WIDGET */
.th-weather-widget{text-align:center;padding:1rem 0}
.th-weather-icon{font-size:3rem;margin-bottom:.5rem}
.th-weather-temp{font-family:var(--th-font-display);font-size:2rem}
.th-weather-desc{color:var(--th-gray-500);font-size:.9rem;text-transform:capitalize}
.th-weather-details{display:flex;justify-content:center;gap:1.5rem;margin-top:1rem;font-size:.85rem;color:var(--th-gray-500)}
.th-weather-loading{color:var(--th-gray-500);padding:2rem;text-align:center}

/* MATERIAL OBLIGATORIO */
.th-event-material{margin-top:2rem}
.th-event-material h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1rem}
.th-material-list{display:flex;flex-wrap:wrap;gap:.75rem}
.th-material-badge{display:flex;align-items:center;gap:.5rem;background:var(--th-light);padding:.6rem 1rem;border-radius:var(--th-radius-full);font-size:.9rem}
.th-material-badge-icon{font-size:1.2rem}

/* FOOTER LOGOS A COLOR (sin filtro) */
.th-footer-logos{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2rem;padding-bottom:3rem;margin-bottom:3rem;border-bottom:1px solid rgba(255,255,255,.1)}
.th-footer-logo-item{background:rgba(255,255,255,.95);border-radius:var(--th-radius-md);padding:1rem;transition:all .2s}
.th-footer-logo-item:hover{transform:scale(1.05)}
.th-footer-logo-item img{max-height:50px;max-width:120px;width:auto;height:auto;object-fit:contain}

/* IMÁGENES ADAPTABLES */
.th-news-card-image.th-img-cover{width:100%;height:200px;object-fit:cover}
.th-img-contain{object-fit:contain!important;background:var(--th-light)}
.th-card-past{opacity:.75}
.th-card-past:hover{opacity:1}

/* FOOTER FONDO NEGRO FORZADO */
.th-footer{background:#1a1a1a!important;color:#fff}
.th-footer-title{color:#fff}
.th-footer-links a{color:rgba(255,255,255,.7)}
.th-footer-links a:hover{color:var(--th-accent)}
.th-footer-brand p{color:rgba(255,255,255,.6)}
.th-footer-bottom{color:rgba(255,255,255,.5)}
.th-footer-social a{background:rgba(255,255,255,.1);color:#fff}
.th-footer-social a:hover{background:var(--th-accent)}

/* MATERIAL OBLIGATORIO */
.th-event-material{margin-top:2rem}
.th-event-material h3{font-family:var(--th-font-display);font-size:1.1rem;margin-bottom:1rem}
.th-material-list{display:flex;flex-wrap:wrap;gap:.75rem}
.th-material-badge{background:var(--th-light);border:1px solid var(--th-gray-200);border-radius:var(--th-radius-md);padding:.75rem 1rem;display:flex;align-items:center;gap:.5rem;font-size:.9rem}
.th-material-badge-icon{font-size:1.3rem}

/* WEATHER WIDGET */
.th-weather-widget{margin-top:1rem}
.th-weather-days{display:flex;flex-direction:column;gap:.75rem}
.th-weather-day{background:var(--th-light);border-radius:var(--th-radius-md);padding:1rem;display:grid;grid-template-columns:auto 1fr auto;gap:.5rem;align-items:center}
.th-weather-day-main{background:linear-gradient(135deg,#e0f2fe,#bae6fd);border:2px solid #0ea5e9}
.th-weather-label{font-weight:600;font-size:.8rem;color:var(--th-gray-500);grid-column:span 3}
.th-weather-icon{font-size:2rem}
.th-weather-temp{font-family:var(--th-font-display);font-size:1.3rem}
.th-weather-desc{grid-column:span 3;font-size:.85rem;color:var(--th-gray-500)}
.th-weather-precip,.th-weather-wind{font-size:.8rem;color:var(--th-gray-500)}
.th-weather-unavailable{font-size:.9rem;color:var(--th-gray-500);font-style:italic}

/* INCIDENCIAS */
.th-incidencias-wrapper{margin-top:1.5rem;display:flex;align-items:center;gap:1rem;flex-wrap:wrap}
.th-btn-warning{background:#f59e0b;color:#fff}
.th-btn-warning:hover{background:#d97706}
.th-incidencias-timer{font-size:.85rem;color:rgba(255,255,255,.7);background:rgba(255,255,255,.1);padding:.5rem 1rem;border-radius:var(--th-radius-full)}

/* Modal Incidencias */
.th-incidencias-modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.7);z-index:9999;justify-content:center;align-items:center;padding:1rem}
.th-incidencias-modal.is-active{display:flex}
.th-incidencias-modal-content{background:var(--th-white);border-radius:var(--th-radius-lg);padding:2rem;max-width:550px;width:100%;max-height:90vh;overflow-y:auto;position:relative}
.th-incidencias-modal-close{position:absolute;top:1rem;right:1rem;background:transparent;border:none;font-size:1.5rem;cursor:pointer;color:var(--th-gray-500);width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:50%}
.th-incidencias-modal-close:hover{background:var(--th-light)}
.th-incidencias-modal h3{font-family:var(--th-font-display);font-size:1.5rem;margin-bottom:.5rem}
.th-incidencias-desc{color:var(--th-gray-500);margin-bottom:1.5rem}

/* Formulario */
.th-incidencias-form .th-form-group{margin-bottom:1rem}
.th-incidencias-form label{display:block;font-weight:600;margin-bottom:.5rem;font-size:.9rem}
.th-incidencias-form input,.th-incidencias-form textarea{width:100%;padding:.75rem;border:2px solid var(--th-gray-200);border-radius:var(--th-radius-md);font-size:1rem;transition:border-color .2s}
.th-incidencias-form input:focus,.th-incidencias-form textarea:focus{outline:none;border-color:var(--th-accent)}
.th-form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.th-form-actions{display:flex;gap:1rem;margin-top:1.5rem}
.th-form-actions .th-btn{flex:1}

/* Mensajes */
.th-form-message{margin-top:1rem;padding:1rem;border-radius:var(--th-radius-md);text-align:center}
.th-form-success{background:#d1fae5;color:#065f46}
.th-form-error{background:#fee2e2;color:#991b1b}

@media(max-width:600px){
    .th-form-row{grid-template-columns:1fr}
    .th-form-actions{flex-direction:column}
}

/* ==============================================
   PARTE 3 - LIGHTBOX Y GALERÍA
   ============================================== */

/* LIGHTBOX */
.th-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.th-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.th-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.th-lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.th-lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.th-lightbox-close,
.th-lightbox-prev,
.th-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    border-radius: 50%;
}

.th-lightbox-close:hover,
.th-lightbox-prev:hover,
.th-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.th-lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
}

.th-lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.th-lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.th-lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: var(--th-font-display);
    font-weight: 600;
    font-size: 0.9rem;
}

/* GALLERY */
.th-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.th-gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--th-radius-md);
    position: relative;
    cursor: pointer;
    box-shadow: var(--th-shadow-md);
    transition: all 0.3s ease;
}

.th-gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.th-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--th-shadow-lg);
}

.th-gallery-item:hover::after {
    opacity: 1;
}

.th-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.th-gallery-item:hover img {
    transform: scale(1.05);
    filter: brightness(0.7);
}

/* POST NAVIGATION */
.th-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}

.th-post-nav-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--th-light);
    border-radius: var(--th-radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.th-post-nav-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--th-shadow-lg);
    border-color: var(--th-accent);
}

.th-post-nav-item span {
    font-size: 0.9rem;
    color: var(--th-gray-500);
    margin-bottom: 0.5rem;
    font-family: var(--th-font-display);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.th-post-nav-item strong {
    font-size: 1.1rem;
    color: var(--th-primary);
    font-family: var(--th-font-body);
    font-weight: 700;
}

.th-post-nav-prev {
    text-align: left;
}

.th-post-nav-next {
    text-align: right;
}

/* YEAR FILTER */
.th-year-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.th-year-filter label {
    font-weight: 500;
    color: var(--th-gray-700);
}

.th-year-filter select {
    font-family: var(--th-font-body);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--th-gray-200);
    border-radius: var(--th-radius-md);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.th-year-filter select:hover {
    transform: translateY(-2px);
    box-shadow: var(--th-shadow-sm);
    border-color: var(--th-accent);
}

.th-year-filter select:focus {
    outline: none;
    border-color: var(--th-accent);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

/* RESPONSIVE LIGHTBOX */
@media (max-width: 768px) {
    .th-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .th-lightbox-prev {
        left: 10px;
    }
    
    .th-lightbox-next {
        right: 10px;
    }
    
    .th-lightbox-close {
        top: 10px;
        right: 10px;
    }
    
    .th-lightbox-close, 
    .th-lightbox-prev, 
    .th-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .th-post-nav {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .th-year-filter {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .th-year-filter select {
        width: 100%;
    }
}

/* ==============================================
   MEJORAS INCIDENCIAS Y BOTONES
   ============================================== */

/* Mejorar visibilidad del botón de incidencias */
.th-incidencias-wrapper {
    margin-top: 1.5rem;
    display: flex !important;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.th-btn-warning {
    background: #f59e0b !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

.th-btn-warning:hover {
    background: #d97706 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4) !important;
}

.th-incidencias-timer {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(245, 158, 11, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--th-radius-full);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Asegurar que el botón de incidencias se vea en mobile */
@media (max-width: 768px) {
    .th-incidencias-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .th-incidencias-btn {
        width: 100%;
        text-align: center;
    }
}

/* Alineación izquierda en secciones del evento */
.th-event-material,.th-event-dorsales,.th-event-buttons,.th-event-results,.th-event-organizadores{text-align:left}
.th-event-material h3,.th-event-dorsales h3,.th-event-buttons h3,.th-event-results h3,.th-event-organizadores h3{text-align:left}
.th-material-list,.th-buttons-grid,.th-organizadores-grid{justify-content:flex-start}

/* Forzar logo siempre a la izquierda */
.th-header .th-header-inner{justify-content:space-between!important;text-align:left!important}
.th-header .th-logo{margin-left:0!important;margin-right:auto!important;justify-self:flex-start!important}

