/* ==========================================================================
   Taekwondo Theme - main.css
   Estilos principales del tema
   ========================================================================== */

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
header.scrolled {
    background: rgba(18, 18, 32, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--white);
}
.logo-icon { width: 48px; height: 48px; position: relative; }
.logo-text { font-size: 1.5rem; font-weight: 800; letter-spacing: 2px; }
.logo-text span { color: var(--primary); }

/* --- Hamburger --- */
.hamburger {
    position: fixed; top: 1.5rem; right: 2rem; z-index: 1001;
    width: 44px; height: 44px; cursor: pointer;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
    background: rgba(212, 56, 13, 0.15); border: 2px solid var(--primary);
    border-radius: 12px; padding: 8px; transition: all 0.3s ease;
}
.hamburger:hover { background: var(--primary); }
.hamburger .bar {
    width: 22px; height: 2.5px; background: var(--white);
    border-radius: 2px; transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    transform-origin: center;
}
.hamburger.active .bar:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }
.hamburger.active { background: var(--primary); border-color: var(--primary); }

/* --- Nav Overlay --- */
.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(18, 18, 32, 0.98); z-index: 999;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: all 0.5s ease;
}
.nav-overlay.active { opacity: 1; visibility: visible; }
.nav-overlay nav { text-align: center; }
.nav-overlay nav a {
    display: block; font-size: 2.5rem; font-weight: 700; color: var(--white);
    text-decoration: none; padding: 0.5rem 0; transform: translateY(30px);
    opacity: 0; transition: all 0.4s ease; position: relative;
}
.nav-overlay.active nav a { transform: translateY(0); opacity: 1; }
.nav-overlay nav a:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay nav a:nth-child(2) { transition-delay: 0.2s; }
.nav-overlay nav a:nth-child(3) { transition-delay: 0.3s; }
.nav-overlay nav a:nth-child(4) { transition-delay: 0.4s; }
.nav-overlay nav a:nth-child(5) { transition-delay: 0.5s; }
.nav-overlay nav a:nth-child(6) { transition-delay: 0.6s; }
.nav-overlay nav a:hover { color: var(--primary); }
.nav-overlay nav a::after {
    content: ''; position: absolute; bottom: 5px; left: 50%;
    transform: translateX(-50%) scaleX(0); width: 60%; height: 3px;
    background: var(--primary); border-radius: 2px; transition: transform 0.3s ease;
}
.nav-overlay nav a:hover::after { transform: translateX(-50%) scaleX(1); }

/* --- Hero --- */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--dark) 0%, var(--secondary) 100%);
}
.hero-bg { position: absolute; inset: 0; opacity: 0.15; filter: blur(2px); }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(18,18,32,0.7) 0%, rgba(18,18,32,0.9) 100%);
}
.hero-content {
    position: relative; z-index: 2; text-align: center; max-width: 900px; padding: 2rem;
}
.hero-badge {
    display: inline-block; background: rgba(212, 56, 13, 0.2);
    border: 1px solid var(--primary); color: var(--primary);
    padding: 0.5rem 1.5rem; border-radius: 50px; font-size: 0.85rem;
    font-weight: 600; letter-spacing: 3px; text-transform: uppercase;
    margin-bottom: 1.5rem; animation: fadeInUp 0.8s ease forwards;
}
.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; line-height: 1.1;
    margin-bottom: 1.5rem; animation: fadeInUp 0.8s ease 0.2s forwards; opacity: 0;
}
.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p {
    font-size: 1.25rem; color: rgba(255,255,255,0.7); max-width: 600px;
    margin: 0 auto 2.5rem; animation: fadeInUp 0.8s ease 0.4s forwards; opacity: 0;
}
.hero-buttons {
    display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s forwards; opacity: 0;
}
.scroll-indicator {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    z-index: 2; animation: bounce 2s infinite;
}
.scroll-indicator svg { width: 30px; height: 30px; stroke: rgba(255,255,255,0.5); }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 1rem 2.5rem; border-radius: 50px; font-size: 1rem;
    font-weight: 600; text-decoration: none; cursor: pointer;
    transition: all 0.3s ease; border: none; font-family: inherit;
}
.btn-primary {
    background: var(--primary); color: var(--white);
    box-shadow: 0 4px 25px rgba(212, 56, 13, 0.4);
}
.btn-primary:hover {
    background: var(--primary-dark); transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(212, 56, 13, 0.5);
}
.btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.3); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); transform: translateY(-2px); }

/* --- Section Common --- */
section { padding: 6rem 2rem; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.section-tag {
    display: inline-block; color: var(--primary); font-size: 0.85rem;
    font-weight: 700; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 1rem;
}
.section-header h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.2; }
.section-header p { color: rgba(255,255,255,0.6); font-size: 1.1rem; }

/* --- About --- */
.about { background: var(--secondary); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; max-width: 1200px; margin: 0 auto; align-items: center; }
.about-image { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3; }
.about-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.about-image:hover img { transform: scale(1.05); }
.about-image::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--primary); border-radius: 20px; transform: translate(15px, 15px); z-index: -1; }
.about-content h3 { font-size: 2rem; font-weight: 800; margin-bottom: 1.5rem; }
.about-content h3 span { color: var(--primary); }
.about-content p { color: rgba(255,255,255,0.7); margin-bottom: 1rem; font-size: 1.05rem; }
.tenets-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 1.5rem; }
.tenets-list li { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: rgba(255,255,255,0.9); }
.tenets-list li::before { content: '◆'; color: var(--primary); font-size: 0.7rem; }

/* --- Categories --- */
.categories { background: var(--dark); }
.categories-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.category-card { background: var(--secondary); border-radius: 24px; overflow: hidden; transition: all 0.4s ease; border: 1px solid rgba(255,255,255,0.05); position: relative; }
.category-card:hover { transform: translateY(-8px); box-shadow: 0 20px 60px rgba(0,0,0,0.4); border-color: rgba(212, 56, 13, 0.3); }
.category-image { height: 260px; overflow: hidden; position: relative; }
.category-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.category-card:hover .category-image img { transform: scale(1.08); }
.category-image .age-badge { position: absolute; top: 1rem; left: 1rem; background: var(--primary); color: var(--white); padding: 0.4rem 1rem; border-radius: 50px; font-size: 0.8rem; font-weight: 700; }
.category-body { padding: 2rem; }
.category-body h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.category-body .subtitle { color: var(--primary); font-size: 0.9rem; font-weight: 600; margin-bottom: 1rem; }
.category-body p { color: rgba(255,255,255,0.6); font-size: 0.95rem; margin-bottom: 1.5rem; }
.category-features { list-style: none; margin-bottom: 1.5rem; }
.category-features li { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.category-features li svg { width: 18px; height: 18px; stroke: var(--accent); flex-shrink: 0; }
.category-btn { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--primary); font-weight: 600; text-decoration: none; font-size: 0.95rem; transition: gap 0.3s ease; }
.category-btn:hover { gap: 1rem; }

/* --- Belts --- */
.belts { background: var(--secondary); }
.belts-timeline { max-width: 800px; margin: 0 auto; position: relative; }
.belts-timeline::before { content: ''; position: absolute; left: 30px; top: 0; bottom: 0; width: 3px; background: linear-gradient(to bottom, var(--white), var(--primary)); border-radius: 2px; }
.belt-item { display: flex; gap: 2rem; margin-bottom: 2rem; align-items: flex-start; }
.belt-marker { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; position: relative; z-index: 2; border: 3px solid rgba(255,255,255,0.2); }
.belt-content { background: rgba(255,255,255,0.05); border-radius: 16px; padding: 1.5rem; flex: 1; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s ease; }
.belt-content:hover { border-color: rgba(212, 56, 13, 0.3); background: rgba(255,255,255,0.08); }
.belt-content h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.belt-content p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

/* --- Techniques --- */
.techniques { background: var(--dark); }
.techniques-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 1200px; margin: 0 auto; }
.technique-card { background: var(--secondary); border-radius: 20px; padding: 2rem; text-align: center; transition: all 0.3s ease; border: 1px solid rgba(255,255,255,0.05); }
.technique-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 15px 40px rgba(212, 56, 13, 0.15); }
.technique-icon { width: 70px; height: 70px; border-radius: 50%; background: rgba(212, 56, 13, 0.15); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 2rem; }
.technique-card h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.75rem; }
.technique-card p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }

/* --- Gallery --- */
.gallery { background: var(--secondary); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 250px); gap: 1rem; max-width: 1200px; margin: 0 auto; }
.gallery-item { border-radius: 16px; overflow: hidden; position: relative; cursor: pointer; }
.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%); opacity: 0; transition: opacity 0.3s ease; }
.gallery-item:hover::after { opacity: 1; }

/* --- History --- */
.history { background: var(--dark); position: relative; }
.history-content { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.history-block { background: rgba(255,255,255,0.03); border-radius: 20px; padding: 2rem; border: 1px solid rgba(255,255,255,0.05); }
.history-block h4 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; color: var(--accent); }
.history-block p { color: rgba(255,255,255,0.6); font-size: 0.95rem; line-height: 1.8; }

/* --- Stats --- */
.stats { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); padding: 4rem 2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 1000px; margin: 0 auto; text-align: center; }
.stat-item h3 { font-size: 3rem; font-weight: 900; line-height: 1; margin-bottom: 0.5rem; }
.stat-item p { font-size: 0.95rem; opacity: 0.85; font-weight: 500; }

/* --- Contact --- */
.contact { background: var(--secondary); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; max-width: 1100px; margin: 0 auto; }
.contact-info h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 1rem; }
.contact-info p { color: rgba(255,255,255,0.6); margin-bottom: 2rem; }
.contact-details { list-style: none; }
.contact-details li { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.contact-details li span:first-child { width: 44px; height: 44px; border-radius: 12px; background: rgba(212, 56, 13, 0.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-details li span:last-child { color: rgba(255,255,255,0.8); }
.contact-form { background: rgba(255,255,255,0.03); border-radius: 20px; padding: 2.5rem; border: 1px solid rgba(255,255,255,0.05); }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: rgba(255,255,255,0.8); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 0.85rem 1.25rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: var(--white); font-family: inherit; font-size: 0.95rem; transition: border-color 0.3s ease; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select option { background: var(--secondary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* --- Footer --- */
footer { background: var(--dark); padding: 3rem 2rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.9rem; margin-top: 1rem; line-height: 1.7; }
.footer-col h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--white); }
.footer-col a { display: block; color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.9rem; padding: 0.3rem 0; transition: color 0.3s ease; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); font-size: 0.85rem; }

/* --- Lightbox --- */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.95); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox img { max-width: 90%; max-height: 90vh; border-radius: 12px; object-fit: contain; }
.lightbox-close { position: absolute; top: 2rem; right: 2rem; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,0.1); border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.3s ease; }
.lightbox-close:hover { background: var(--primary); }

/* --- Back to Top --- */
.back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: var(--white); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 100; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; box-shadow: 0 4px 20px rgba(212, 56, 13, 0.4); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* --- Animations --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateX(-50%) translateY(-10px); } 60% { transform: translateX(-50%) translateY(-5px); } }
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: all 0.7s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }

/* --- Blog (index.php / single.php) --- */
.blog-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; padding: 2rem 0; }
.blog-card { background: var(--dark); border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s ease; }
.blog-card:hover { transform: translateY(-5px); border-color: rgba(212, 56, 13, 0.3); }
.blog-card-image img { width: 100%; height: 220px; object-fit: cover; }
.blog-card-body { padding: 1.5rem; }
.blog-card-meta { display: flex; gap: 1rem; margin-bottom: 0.75rem; font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.blog-card-meta span { display: flex; align-items: center; gap: 0.3rem; }
.blog-card-meta a { color: var(--primary); text-decoration: none; }
.blog-card-title a { color: var(--white); text-decoration: none; font-size: 1.25rem; font-weight: 700; }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt { color: rgba(255,255,255,0.6); font-size: 0.9rem; margin: 0.75rem 0 1.25rem; }
.no-posts { text-align: center; padding: 4rem 2rem; grid-column: 1 / -1; }
.no-posts h2 { margin: 1rem 0; }
.no-posts p { color: rgba(255,255,255,0.6); margin-bottom: 2rem; }

/* --- Page / Single --- */
.page-container { max-width: 800px; margin: 0 auto; padding: 3rem 0; }
.page-featured-image { border-radius: 20px; overflow: hidden; margin-bottom: 2rem; }
.page-featured-image img { width: 100%; height: auto; display: block; }
.page-body { color: rgba(255,255,255,0.85); font-size: 1.05rem; line-height: 1.8; }
.page-body h2, .page-body h3, .page-body h4 { color: var(--white); margin: 2rem 0 1rem; }
.page-body a { color: var(--primary); }
.page-body img { max-width: 100%; height: auto; border-radius: 12px; }
.single-meta { color: rgba(255,255,255,0.6); }
.single-meta strong { color: var(--white); }
.single-tags { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }
.single-tags a { color: var(--primary); text-decoration: none; }
.single-navigation { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }
.single-nav-link { text-decoration: none; padding: 1rem; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s ease; flex: 1; }
.single-nav-link:hover { border-color: var(--primary); }
.single-nav-label { display: flex; align-items: center; gap: 0.5rem; color: var(--primary); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; }
.single-nav-title { color: var(--white); font-weight: 600; }
.single-nav-next { text-align: right; }
.single-nav-next .single-nav-label { justify-content: flex-end; }
