/* ============================================================
   global.css  –  DieOnYourFeet shared stylesheet
   ============================================================ */

/* ── Fonts ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Barlow:wght@400;500;600&family=Oswald:wght@400;500;600;700&display=swap');

/* ── CSS Variables (single source of truth) ─────────────────── */
:root {
    /* Core palette */
    --red:           #e63946;
    --gold:          #f4a500;
    --red-glow:      rgba(230,57,70,.12);
    --gold-glow:     rgba(244,165,0,.12);

    /* Backgrounds */
    --bg0:           #0a0a0a;
    --bg1:           #111111;
    --bg2:           #161616;
    --bg3:           #1e1e1e;

    /* Text */
    --txt:           #f0f0f0;
    --sub:           #777777;

    /* Border */
    --bdr:           #222222;

    /* Legacy aliases — keeps old components working */
    --primary-red:   var(--red);
    --dark-red:      var(--red);
    --hover-red:     #ff3333;
    --accent-gold:   var(--gold);
    --dark-bg:       var(--bg0);
    --dark-black:    var(--bg0);
    --light-black:   var(--bg2);
    --light-text:    var(--txt);
}

/* ── Base ──────────────────────────────────────────────────── */
body {
    padding-top: 80px;
    background-color: var(--bg0);
    color: var(--txt);
    font-family: 'Barlow', 'Oswald', sans-serif;
}

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
    background: var(--bg0);
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--red);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}
.navbar.scrolled { padding: 0.3rem 0; background: rgba(10,10,10,0.95); }

.custom-logo {
    font-family: 'Barlow Condensed', 'Arial Black', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
    padding: 5px 0;
}
.custom-logo span:nth-child(1) { color: var(--red); text-shadow: 2px 2px 0 #000, 1px 1px 0 #000, -1px -1px 0 #000; }
.custom-logo span:nth-child(2) { color: #fff; position: relative; }
.custom-logo span:nth-child(2)::after {
    content: ''; position: absolute; left: 0; bottom: 2px;
    width: 100%; height: 3px; background: var(--red); transform: skewX(-15deg);
}

.nav-link {
    color: var(--txt) !important;
    margin: 0 8px; transition: 0.3s; font-weight: 500;
    position: relative; padding: 0.5rem 0.8rem !important; border-radius: 4px;
}
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 50%; background: var(--red); transition: all 0.3s ease;
}
.nav-link:hover::after { width: 80%; left: 10%; }
.nav-link:hover { color: var(--red) !important; background: var(--red-glow); }
.nav-item.active .nav-link { color: var(--red) !important; font-weight: 600; }
.nav-item.active .nav-link::after { width: 80%; left: 10%; }
.navbar-toggler { border: 1px solid rgba(255,255,255,0.2); padding: 0.35rem 0.6rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(230,57,70,0.5); }

/* ── Dropdown ──────────────────────────────────────────────── */
.dropdown-menu { background-color: var(--bg2); border: 1px solid var(--bdr); margin-top: 0; }
.dropdown-menu li a { color: var(--txt); }
.dropdown-menu li hr { color: var(--bdr); }
.dropdown-item:hover { background-color: var(--red); color: var(--txt); }
/* Hover dropdowns on desktop */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu { display: block; }
    .dropdown-menu { border-top: 2px solid var(--red); animation: dropdownFade 0.2s ease; }
}
@keyframes dropdownFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

/* ── Social Icons ──────────────────────────────────────────── */
.social-icons { display: flex; margin-left: 15px; padding-left: 15px; border-left: 1px solid rgba(255,255,255,0.2); }
.social-icon {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.1); color: var(--txt);
    margin: 0 5px; transition: all 0.3s ease;
}
.social-icon:hover { background: var(--red); color: white; transform: translateY(-2px); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-custom { background-color: var(--red); color: white; padding: 12px 30px; border-radius: 30px; text-transform: uppercase; font-weight: 600; transition: all 0.3s ease; border: none; font-family: 'Barlow Condensed', sans-serif; letter-spacing: 1px; }
.btn-custom:hover { background-color: var(--hover-red); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); color: white; }
.btn-remind { background-color: transparent; border: 2px solid var(--gold); color: var(--gold); padding: 8px 20px; border-radius: 20px; transition: all 0.3s ease; }
.btn-remind:hover { background-color: var(--gold); color: var(--bg0); }
.btn-preview { background-color: transparent; border: 2px solid var(--red); color: var(--red); padding: 8px 20px; border-radius: 20px; transition: all 0.3s ease; }
.btn-preview:hover { background-color: var(--red); color: #fff; }

/* ── API Badge ─────────────────────────────────────────────── */
.api-badge {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
    padding: 4px 12px; border-radius: 20px;
    font-family: 'Barlow Condensed', sans-serif; font-size: 11px;
    font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
}
.api-badge.live { background: rgba(34,197,94,.12); color: #22c55e; border: 1px solid rgba(34,197,94,.25); }
.api-badge.demo { background: rgba(100,100,100,.12); color: #555; border: 1px solid var(--bdr); }
.api-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.api-badge.live .dot { animation: apiBlink 1.4s ease-in-out infinite; }
@keyframes apiBlink { 0%,100%{opacity:1}50%{opacity:.2} }

/* ── Section Title ─────────────────────────────────────────── */
.section-title { text-align: center; margin: 50px 0 30px; position: relative; padding-bottom: 15px; text-transform: uppercase; font-size: 2.2rem; font-family: 'Barlow Condensed', sans-serif; font-weight: 800; letter-spacing: 2px; }
.section-title:after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 100px; height: 3px; background-color: var(--red); }

/* ── Bootstrap Card override ───────────────────────────────── */
.card { background-color: var(--bg2); border: 1px solid var(--bdr); transition: all 0.3s ease; margin-bottom: 20px; overflow: hidden; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); border-color: var(--red); }
.card-img-top { max-height: 200px; height: 200px; object-fit: cover; }
.card-title, .card-text { color: #fff; }

/* ============================================================
   IMAGE CONTAINER — 4:3 ratio wrapper pattern
   position:relative + padding-top:75% on wrapper
   position:absolute + object-fit:cover on <img>
   ============================================================ */

/* ── News Cards ────────────────────────────────────────────── */
.news-card { background-color: var(--bg1); border-radius: 10px; overflow: hidden; transition: all 0.3s ease; height: 100%; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }

.news-image, .featured-news-image {
    position: relative; width: 100%; padding-top: 75%; overflow: hidden; background-color: var(--bg1);
}
.news-image img, .featured-news-image img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center; display: block; transition: transform 0.3s ease;
}
.news-card:hover .news-image img { transform: scale(1.05); }

.image-placeholder {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.image-placeholder img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: contain; object-position: center; display: block; padding: 6px;
}

.news-content { padding: 20px; }
.news-content h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; margin-bottom: 10px; color: #fff; font-weight: 700; }
.news-date { color: var(--red); font-size: 0.9rem; margin-bottom: 10px; }
.news-content p { color: #ccc; margin-bottom: 15px; }
.news-link { color: var(--gold); text-decoration: none; font-weight: bold; transition: color 0.3s ease; }
.news-link:hover { color: #fff; text-decoration: underline; }

/* ── Fantasy Cards ─────────────────────────────────────────── */
.fantasy-card {
    background-color: var(--bg2); border-radius: 10px; overflow: hidden;
    transition: all 0.3s ease; margin-bottom: 20px;
    display: flex; flex-direction: row; align-items: stretch;
}
.fantasy-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.fight-image { flex: 0 0 220px; width: 220px; position: relative; overflow: hidden; background-color: var(--bg1); }
.fight-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.fight-era { position: absolute; bottom: 8px; left: 8px; background: var(--red); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 12px; text-transform: uppercase; z-index: 2; }
.fight-content { flex: 1; padding: 20px; min-width: 0; }

/* ── Technique Cards ───────────────────────────────────────── */
.technique-card { background-color: var(--bg1); border-radius: 10px; overflow: hidden; transition: all 0.3s ease; height: 100%; margin-bottom: 20px; display: flex; flex-direction: row; align-items: stretch; }
.technique-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.technique-animation { flex: 0 0 320px; width: 320px; position: relative; overflow: hidden; background-color: #222; min-height: 220px; }
.technique-animation img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.technique-content { flex: 1; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.technique-content h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; margin-bottom: 10px; color: #fff; font-weight: 700; }
.technique-content p { color: #ccc; margin-bottom: 15px; }
.technique-link { color: var(--red); text-decoration: none; font-weight: bold; transition: color 0.3s ease; }
.technique-link:hover { color: #fff; text-decoration: underline; }

/* ── Event Cards ───────────────────────────────────────────── */
.event-card { background-color: var(--bg1); border-radius: 10px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--bdr); }
.event-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid var(--bdr); padding-bottom: 10px; }
.event-header h3 { margin: 0; color: #fff; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; }
.event-date { color: var(--red); font-weight: bold; }
.event-result { display: flex; align-items: center; margin-bottom: 10px; padding: 8px; background-color: rgba(255,255,255,0.05); border-radius: 5px; }
.result-win { background-color: #1a6e1a; color: #fff; padding: 3px 8px; border-radius: 3px; font-size: 0.8rem; margin-right: 10px; font-weight: bold; }
.result-details { color: #ccc; font-size: 0.9rem; }
.event-link { color: var(--gold); text-decoration: none; font-weight: bold; }
.event-link:hover { color: #fff; text-decoration: underline; }
.event-img { position: relative; width: 100%; padding-top: 75%; overflow: hidden; background-color: #222; border-radius: 6px; margin-bottom: 12px; }
.event-img img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.promotion-logo { width: 100%; max-height: 200px; object-fit: contain; object-position: center; display: block; border-radius: 6px; }

/* ── Fighter image ─────────────────────────────────────────── */
.fighter-image { position: relative; width: 100%; padding-top: 100%; overflow: hidden; background-color: #222; border-radius: 6px; }
.fighter-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

/* ── Profile Cards ─────────────────────────────────────────── */
.profile-card { background-color: var(--bg2); border-radius: 10px; overflow: hidden; transition: all 0.3s ease; height: 100%; border: 1px solid var(--bdr); }
.profile-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); border-color: var(--red); }
.profile-image { position: relative; width: 100%; padding-top: 75%; overflow: hidden; background-color: #333; }
.profile-image img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.profile-content { padding: 20px; }
.profile-content h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; margin-bottom: 10px; color: #fff; font-weight: 700; }
.profile-content p { color: #ccc; margin-bottom: 15px; }
.profile-link { color: var(--red); text-decoration: none; font-weight: bold; transition: color 0.3s ease; }
.profile-link:hover { color: #fff; text-decoration: underline; }

/* ── History / On This Day ─────────────────────────────────── */
.history-card { background-color: var(--bg2); border-radius: 10px; padding: 20px; margin-bottom: 20px; border: 1px solid var(--bdr); }
.history-date { color: var(--red); font-weight: bold; font-size: 1.1rem; margin-bottom: 10px; }
.history-content h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; margin-bottom: 10px; color: #fff; font-weight: 700; }
.history-content p { color: #ccc; line-height: 1.6; }

/* ── Score / Match Cards ───────────────────────────────────── */
.score-card { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(to right, var(--bg1), var(--bg2)); border: 2px solid var(--red); border-radius: 10px; padding: 20px; margin-bottom: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.fighter { text-align: center; flex: 1; }
.fighter-left { text-align: left; }
.fighter-right { text-align: right; }
.fighter-name { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; font-weight: 800; margin-bottom: 5px; }
.fighter-country { font-size: 1rem; color: var(--sub); margin-bottom: 10px; }
.fighter-score { font-size: 1.8rem; color: var(--red); font-weight: bold; }
.fighter-stats { display: flex; gap: 10px; margin-bottom: 10px; }
.stat { background-color: var(--bg1); padding: 3px 8px; border-radius: 10px; font-size: 0.8rem; border: 1px solid var(--bdr); }
.fight-details { text-align: center; flex: 0 0 150px; }
.vs-badge { font-size: 1.8rem; font-weight: bold; color: var(--gold); margin-bottom: 10px; font-family: 'Barlow Condensed', sans-serif; }
.round-time { background-color: var(--red); padding: 5px 10px; border-radius: 20px; }
.round { display: block; font-size: 1rem; }
.time { display: block; font-size: 1.4rem; font-weight: bold; background-color: var(--red); border-radius: 25px; }
.match-card { background: linear-gradient(to right, var(--bg1), var(--bg2)); border: 2px solid var(--red); border-radius: 10px; padding: 20px; margin-bottom: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.match-fighters { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.match-fighter { text-align: center; flex: 1; }
.match-fighter-name { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; font-weight: 800; margin-bottom: 5px; }
.match-fighter-record { font-size: 0.9rem; color: var(--sub); }
.match-vs { font-size: 1.8rem; font-weight: bold; color: var(--gold); margin: 0 20px; font-family: 'Barlow Condensed', sans-serif; }
.match-details { text-align: center; margin-bottom: 15px; }
.match-date, .match-time, .match-location, .match-event { margin-bottom: 5px; font-size: 1.1rem; }
.match-time { font-weight: bold; color: var(--red); }
.match-actions { display: flex; justify-content: center; gap: 15px; }

/* ── Knockout / Submission Cards ───────────────────────────── */
.submission-card, .knockout-card {
    display: flex !important; flex-direction: row !important; align-items: stretch;
    background-color: var(--bg2); border-radius: 10px; overflow: visible !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease; margin-bottom: 24px; min-height: 220px;
}
.submission-card:hover, .knockout-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.5); }
.knockout-number, .submission-number {
    flex: 0 0 48px; width: 48px; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 700; color: var(--red);
    background-color: var(--bg1); border-radius: 10px 0 0 10px;
}
.knockout-image, .submission-image, .knockout-video, .submission-video {
    flex: 0 0 300px !important; width: 300px !important;
    position: relative !important; overflow: hidden !important;
    background-color: var(--bg1); min-height: 220px;
}
.knockout-image img, .submission-image img, .knockout-video img, .submission-video img {
    position: absolute !important; top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; object-position: center !important; display: block !important;
}
.knockout-content, .submission-content {
    flex: 1 1 auto; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; min-width: 0;
}
.knockout-content h3, .submission-content h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 1.4rem; margin-bottom: 8px; color: #fff; font-weight: 700; }
.knockout-content p, .submission-content p { color: #ccc; margin-bottom: 10px; line-height: 1.5; }
.knockout-date, .submission-date { color: var(--red); font-size: 0.9rem; margin-bottom: 6px; display: block; }
.knockout-fighters, .submission-fighters { color: var(--sub); font-size: 0.95rem; margin-bottom: 4px; }
.knockout-stats, .submission-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.knockout-stat, .submission-stat { background-color: var(--bg1); border: 1px solid var(--bdr); padding: 3px 10px; border-radius: 12px; font-size: 0.82rem; color: #ddd; }
.watch-btn { display: inline-block; margin-top: 10px; padding: 7px 20px; background-color: var(--red); color: #fff; border-radius: 20px; text-decoration: none; font-size: 0.9rem; font-weight: 600; font-family: 'Barlow Condensed', sans-serif; letter-spacing: 1px; transition: background 0.3s ease; align-self: flex-start; }
.watch-btn:hover { background-color: var(--hover-red); color: #fff; }

/* ── Section backgrounds ───────────────────────────────────── */
.live-scores, .latest-news, .recent-events, .techniques, .fighter-blogs, .brand-story, .featured-products, .on-this-day { padding: 50px 0; background-color: var(--bg2); }
.upcoming-matches, .fighter-profiles, .submissions, .product-categories { padding: 50px 0; background-color: var(--bg1); }

/* ── Footer ────────────────────────────────────────────────── */
footer { background-color: var(--bg2); padding: 50px 0 20px; margin-top: 50px; border-top: 1px solid var(--bdr); }
footer .social-icons { font-size: 1.5rem; margin: 20px 0; display: block; border-left: none; padding-left: 0; margin-left: 0; }
footer .social-icons a { color: #fff; margin: 0 10px; transition: all 0.3s ease; text-decoration: none; }
footer .social-icons a:hover { color: var(--red); }

/* ── Footer Newsletter ────────────────────────────────────── */
.footer-newsletter-row {
    display: flex; gap: 0; border-radius: 6px; overflow: hidden;
    border: 1px solid var(--bdr); transition: border-color 0.3s ease;
}
.footer-newsletter-row:focus-within { border-color: var(--red); box-shadow: 0 0 12px rgba(230,57,70,0.15); }
.footer-nl-input {
    flex: 1; background: var(--bg1); border: none; color: var(--txt);
    padding: 10px 14px; font-size: 0.85rem; font-family: 'Barlow', sans-serif;
    outline: none; min-width: 0;
}
.footer-nl-input::placeholder { color: #555; }
.footer-nl-btn {
    background: var(--red); color: #fff; border: none; padding: 10px 18px;
    font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
    display: flex; align-items: center; gap: 6px; white-space: nowrap;
    transition: background 0.3s ease;
}
.footer-nl-btn:hover { background: var(--hover-red); }
.footer-nl-msg { font-size: 0.78rem; margin-top: 8px; min-height: 1.2em; transition: color 0.3s ease; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .navbar-collapse { background: var(--bg0); padding: 15px; border-radius: 8px; margin-top: 10px; border: 1px solid rgba(255,255,255,0.1); }
    .navbar .social-icons { border-left: none; padding-left: 0; margin-left: 0; justify-content: center; margin-top: 15px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,0.1); }
    .nav-link { margin: 5px 0; text-align: center; }
    .custom-logo { font-size: 1.5rem; }
}
@media (max-width: 768px) {
    .score-card { flex-direction: column; text-align: center; }
    .fighter-left, .fighter-right { text-align: center; margin-bottom: 15px; }
    .fight-details { margin: 15px 0; }
    .match-fighters { flex-direction: column; }
    .fantasy-card { flex-direction: column; }
    .fight-image { flex: none; width: 100%; height: 180px; }
    .match-fighter { margin-bottom: 15px; }
    .match-actions { flex-direction: column; align-items: center; }
    .event-header { flex-direction: column; text-align: center; }
    .event-date { margin-top: 10px; }
    .event-result { flex-direction: column; align-items: flex-start; }
    .result-win { margin-bottom: 5px; }
    .submission-card, .knockout-card, .technique-card { flex-direction: column !important; }
    .knockout-number, .submission-number { width: 100%; flex: none; border-radius: 10px 10px 0 0; padding: 8px 0; font-size: 1.2rem; min-height: unset; }
    .knockout-image, .submission-image, .knockout-video, .submission-video { flex: none !important; width: 100% !important; min-height: unset !important; height: 0 !important; padding-top: 75% !important; }
    .technique-animation { flex: none; width: 100%; min-height: unset; height: 0; padding-top: 56%; }
}
@media (max-width: 400px) { .custom-logo { font-size: 1.2rem; } }
