/* =====================================================================
   AMI FC - Theme chính
   Màu chủ đạo: #2f2f2f (xám đen) + #ad0909 (đỏ)
   ===================================================================== */

:root {
    --ami-dark:      #2f2f2f;
    --ami-dark-2:    #252525;
    --ami-dark-3:    #1b1b1b;
    --ami-red:       #ad0909;
    --ami-red-dark:  #8a0606;
    --ami-red-light: #d11a1a;
    --ami-text:      #2b2b2b;
    --ami-muted:     #8a8f98;
    --ami-line:      #e5e5e5;
    --ami-bg:        #f4f4f4;
    --ami-white:     #ffffff;
    --font: 'Roboto', 'Segoe UI', Tahoma, Arial, sans-serif;
    --header-h: 74px;
    --radius: 6px;
    --shadow: 0 6px 24px rgba(0,0,0,.10);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--ami-text);
    background: var(--ami-white);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--ami-red); }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}
.clearfix::after { content: ''; display: block; clear: both; }

/* --------------------------- TOP BAR ---------------------------- */
.site-topbar {
    background: var(--ami-dark-2);
    color: #cfcfcf;
    font-size: 13px;
    border-bottom: 1px solid #3d3d3d;
}
.site-topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 38px;
}
.site-topbar a { color: #cfcfcf; }
.site-topbar a:hover { color: #fff; }
.topbar-info span { margin-right: 18px; }
.topbar-social a { margin-left: 12px; }

/* ---------------------------- HEADER ---------------------------- */
.site-header {
    background: var(--ami-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.site-header .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}
.c-logo img { height: 52px; width: auto; }
.c-logo .logo-text { color: #fff; line-height: 1.1; }
.c-logo .logo-text b { display: block; font-size: 24px; letter-spacing: 1px; }
.c-logo .logo-text span { font-size: 11px; color: var(--ami-red-light); text-transform: uppercase; letter-spacing: 2px; }

/* Menu */
.main-menu > ul { display: flex; align-items: center; }
.main-menu > ul > li { position: relative; }
.main-menu > ul > li > a,
.main-menu > ul > li > span {
    display: block;
    padding: 0 15px;
    height: var(--header-h);
    line-height: var(--header-h);
    color: #eaeaea;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    cursor: pointer;
}
.main-menu > ul > li > a:hover,
.main-menu > ul > li > span:hover,
.main-menu > ul > li.active > a { color: #fff; background: var(--ami-red); }

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    padding: 8px;
}

/* --------------------------- HERO SLIDE ------------------------- */
.hero {
    position: relative;
    background: var(--ami-dark-3);
}
.hero-slider { position: relative; }
.hero-slider .slide img {
    width: 100%;
    height: 520px;
    object-fit: cover;
}
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 0;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 5;
}
.hero-nav:hover { background: var(--ami-red); }
.hero-nav.prev { left: 20px; }
.hero-nav.next { right: 20px; }
.hero-dots {
    position: absolute; bottom: 16px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 8px; z-index: 5;
}
.hero-dots button {
    width: 10px; height: 10px; border-radius: 50%;
    border: 0; background: rgba(255,255,255,.5); cursor: pointer; padding: 0;
}
.hero-dots button.active { background: var(--ami-red); }

/* --------------------- NEXT MATCH + STANDING -------------------- */
.home-highlight {
    background: var(--ami-dark);
    padding: 26px 0;
}
.home-highlight .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.panel {
    background: linear-gradient(160deg, #3a3a3a, #262626);
    border-radius: var(--radius);
    border: 1px solid #454545;
    overflow: hidden;
}
.panel-title {
    background: var(--ami-red);
    color: #fff;
    padding: 11px 18px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: .5px;
}
.next-match { padding: 20px 18px; }
.next-match .tournament { color: #bbb; text-align: center; font-size: 13px; margin-bottom: 14px; }
.next-match .scoreboard {
    display: flex; align-items: center; justify-content: center; gap: 20px;
}
.next-match .team { text-align: center; color: #fff; flex: 1; }
.next-match .team img { height: 62px; width: auto; margin: 0 auto 8px; }
.next-match .team span { font-weight: 700; font-size: 14px; }
.next-match .vs { font-size: 26px; font-weight: 800; color: var(--ami-red-light); }
.next-match .meta {
    display: flex; justify-content: center; gap: 26px;
    margin-top: 18px; color: #cfcfcf; font-size: 13px;
}
.next-match .meta li { display: flex; align-items: center; gap: 7px; }
.next-match .meta i { color: var(--ami-red-light); }

.standing-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.standing-table th, .standing-table td { padding: 9px 8px; color: #ddd; text-align: center; }
.standing-table thead th { background: #1f1f1f; color: #fff; text-transform: uppercase; font-size: 11px; }
.standing-table tbody tr:nth-child(even) { background: rgba(255,255,255,.03); }
.standing-table td.club { text-align: left; }
.standing-table tr.is-ami td { background: rgba(173,9,9,.25); color: #fff; font-weight: 700; }
.standing-table td.pts { color: var(--ami-red-light); font-weight: 700; }

/* ------------------------- SECTION BOX -------------------------- */
.section { padding: 46px 0; }
.section-dark { background: var(--ami-dark); }
.section-gray { background: var(--ami-bg); }

.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 26px;
}
.section-head h2 {
    position: relative;
    margin: 0;
    padding-left: 16px;
    font-size: 26px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: .5px;
}
.section-head h2::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 6px; height: 26px; background: var(--ami-red); border-radius: 3px;
}
.section-dark .section-head h2 { color: #fff; }
.section-head .view-all {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    color: var(--ami-muted); display: inline-flex; align-items: center; gap: 6px;
}
.section-head .view-all:hover { color: var(--ami-red); }
.section-dark .section-head .view-all { color: #bbb; }

/* --------------------------- INTRO ------------------------------ */
.intro-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; align-items: center; }
.intro-text { color: #ddd; }
.intro-text p { margin: 0 0 14px; }
.intro-img img { border-radius: var(--radius); width: 100%; }

/* --------------------------- CARDS ------------------------------ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.nd-card {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); display: flex; flex-direction: column;
    transition: transform .25s, box-shadow .25s;
}
.nd-card:hover { transform: translateY(-5px); box-shadow: 0 14px 32px rgba(0,0,0,.18); }
.nd-card .thumb { position: relative; overflow: hidden; }
.nd-card .thumb img { width: 100%; height: 200px; object-fit: cover; transition: transform .4s; }
.nd-card:hover .thumb img { transform: scale(1.06); }
.nd-card .date-badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--ami-red); color: #fff;
    font-size: 11px; padding: 4px 10px; border-radius: 3px; font-weight: 700;
}
.nd-card .play-badge {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.28);
}
.nd-card .play-badge i { font-size: 46px; color: #fff; opacity: .9; }
.nd-card .body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.nd-card .cat { color: var(--ami-red); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.nd-card h3 { margin: 8px 0 10px; font-size: 17px; line-height: 1.4; color: #1e1e1e; }
.nd-card h3 a:hover { color: var(--ami-red); }
.nd-card p { margin: 0 0 14px; color: #666; font-size: 14px; flex: 1; }
.nd-card .more { font-size: 13px; font-weight: 700; color: var(--ami-red); text-transform: uppercase; }

/* Horizontal news list */
.news-list { display: flex; flex-direction: column; gap: 18px; }
.news-item {
    display: grid; grid-template-columns: 210px 1fr; gap: 18px;
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow);
}
.news-item .thumb img { width: 100%; height: 100%; min-height: 140px; object-fit: cover; }
.news-item .body { padding: 16px 18px 16px 0; }
.news-item .date { color: var(--ami-muted); font-size: 12px; }
.news-item h3 { margin: 6px 0 8px; font-size: 19px; }
.news-item p { margin: 0; color: #666; font-size: 14px; }

/* --------------------------- SQUAD ------------------------------ */
.player-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.player-card {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(180deg, #3a3a3a, #202020);
    border: 1px solid #444; text-align: center;
}
.player-card .photo { position: relative; padding-top: 118%; background: #222; }
.player-card .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-card .num {
    position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--ami-red); color: #fff; font-weight: 800;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.player-card .info { padding: 12px; color: #fff; position: relative; z-index: 2; }
.player-card .info .name { font-weight: 700; font-size: 15px; }
.player-card .info .pos { font-size: 12px; color: var(--ami-red-light); text-transform: uppercase; }
.player-card .gradient {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 12%, transparent 55%);
}

.group-title {
    color: #fff; font-size: 20px; font-weight: 800; text-transform: uppercase;
    margin: 34px 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--ami-red);
    display: flex; align-items: center; gap: 10px;
}
.group-title:first-of-type { margin-top: 0; }

/* ------------------------ SPONSOR MARQUEE ----------------------- */
.sponsor-strip { background: #fff; padding: 22px 0; border-top: 1px solid var(--ami-line); }
.sponsor-strip .row { display: flex; align-items: center; gap: 34px; flex-wrap: wrap; justify-content: center; }
.sponsor-strip img { height: 52px; width: auto; filter: grayscale(1); opacity: .7; transition: .3s; }
.sponsor-strip img:hover { filter: none; opacity: 1; }

/* ---------------------------- PAGE ------------------------------ */
.page-hero {
    background: linear-gradient(rgba(20,20,20,.82), rgba(20,20,20,.82)),
                url('__HERO__') center/cover no-repeat;
    background-color: var(--ami-dark);
    padding: 70px 0;
    color: #fff;
    text-align: center;
}
.page-hero h1 { margin: 0; font-size: 34px; text-transform: uppercase; font-weight: 800; letter-spacing: 1px; }
.breadcrumb { margin-top: 8px; font-size: 13px; color: #bbb; }
.breadcrumb a:hover { color: var(--ami-red-light); }

.page-body { padding: 50px 0; }
.article { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
.article h1 { margin-top: 0; font-size: 30px; }
.article .article-meta { color: var(--ami-muted); font-size: 13px; margin-bottom: 18px; }
.article .feature-img { border-radius: var(--radius); margin-bottom: 22px; width: 100%; }
.article-content { font-size: 16px; line-height: 1.8; color: #333; }
.article-content img { border-radius: var(--radius); margin: 12px 0; }
.article-content h2, .article-content h3 { margin-top: 26px; }
.article-content blockquote {
    border-left: 4px solid var(--ami-red); margin: 18px 0; padding: 8px 18px;
    background: #fafafa; font-style: italic; color: #555;
}

.video-frame { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Sidebar */
.layout-sidebar { display: grid; grid-template-columns: 1fr 340px; gap: 34px; align-items: start; }
.widget { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 24px; }
.widget h3 { margin: 0 0 16px; font-size: 17px; text-transform: uppercase; padding-bottom: 10px; border-bottom: 2px solid var(--ami-red); }
.widget-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ami-line); }
.widget-list li:last-child { border-bottom: 0; }
.widget-list img { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; flex: 0 0 80px; }
.widget-list .t { font-size: 14px; font-weight: 600; line-height: 1.4; }
.widget-list .d { font-size: 12px; color: var(--ami-muted); }

/* -------------------------- FIXTURES ---------------------------- */
.fixture-row {
    display: grid; grid-template-columns: 160px 1fr 120px;
    align-items: center; gap: 16px;
    background: #fff; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.fixture-row .when { color: var(--ami-muted); font-size: 13px; }
.fixture-row .teams { display: flex; align-items: center; justify-content: center; gap: 18px; font-weight: 700; }
.fixture-row .score {
    background: var(--ami-dark); color: #fff; padding: 5px 14px; border-radius: 4px; font-weight: 800;
}
.fixture-row .score.live { background: var(--ami-red); }
.fixture-row .venue { text-align: right; color: var(--ami-muted); font-size: 13px; }

/* ---------------------------- CONTACT --------------------------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; }
.form-control {
    width: 100%; padding: 12px 14px; border: 1px solid #ddd; border-radius: 5px;
    font-family: var(--font); font-size: 14px; margin-bottom: 14px; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--ami-red); box-shadow: 0 0 0 3px rgba(173,9,9,.12); }
textarea.form-control { min-height: 130px; resize: vertical; }
.btn {
    display: inline-block; padding: 12px 26px; border: 0; border-radius: 5px;
    background: var(--ami-red); color: #fff; font-weight: 700; cursor: pointer;
    text-transform: uppercase; font-size: 13px; letter-spacing: .5px; transition: .2s;
}
.btn:hover { background: var(--ami-red-dark); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--ami-red); color: var(--ami-red); }
.btn-outline:hover { background: var(--ami-red); color: #fff; }
.contact-info li { display: flex; gap: 14px; margin-bottom: 18px; }
.contact-info i {
    width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
    background: rgba(173,9,9,.1); color: var(--ami-red);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.alert { padding: 13px 18px; border-radius: 5px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #e6f6ec; color: #1a7a42; border: 1px solid #b6e3c6; }
.alert-error { background: #fdeaea; color: #a31616; border: 1px solid #f3bcbc; }

/* --------------------------- PRODUCTS --------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .25s; }
.product-card:hover { transform: translateY(-5px); }
.product-card img { width: 100%; height: 250px; object-fit: cover; }
.product-card .body { padding: 16px; text-align: center; }
.product-card h3 { margin: 0 0 8px; font-size: 15px; min-height: 42px; }
.product-card .price { color: var(--ami-red); font-weight: 800; font-size: 17px; }
.product-card .old-price { color: var(--ami-muted); text-decoration: line-through; font-size: 13px; margin-left: 8px; }

/* --------------------------- PAGINATION ------------------------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 36px; }
.pagination a, .pagination span {
    min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 12px; border-radius: 5px; background: #fff; box-shadow: var(--shadow); font-weight: 600;
}
.pagination .active { background: var(--ami-red); color: #fff; }

/* ----------------------------- FOOTER --------------------------- */
.site-footer { background: var(--ami-dark-3); color: #bcbcbc; font-size: 14px; }
.footer-main { padding: 46px 0 34px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; }
.footer-col h4 {
    color: #fff; font-size: 15px; text-transform: uppercase; margin: 0 0 18px;
    padding-bottom: 10px; border-bottom: 2px solid var(--ami-red); display: inline-block;
}
.footer-col p { margin: 0 0 10px; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a:hover { color: var(--ami-red-light); padding-left: 4px; }
.footer-logo img { height: 60px; margin-bottom: 14px; }
.footer-bottom {
    border-top: 1px solid #3a3a3a; padding: 16px 0;
    display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #888;
}
.footer-social a {
    display: inline-flex; width: 36px; height: 36px; border-radius: 50%;
    background: #3a3a3a; color: #ddd; align-items: center; justify-content: center;
    margin-left: 8px; transition: .2s;
}
.footer-social a:hover { background: var(--ami-red); color: #fff; }

/* --------------------------- BACK TO TOP ------------------------ */
#back-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 900;
    width: 46px; height: 46px; border-radius: 50%; border: 0;
    background: var(--ami-red); color: #fff; font-size: 20px; cursor: pointer;
    opacity: 0; visibility: hidden; transition: .3s;
}
#back-top.show { opacity: 1; visibility: visible; }

/* --------------------------- ANIMATION -------------------------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .6s ease both; }

/* ============================ RESPONSIVE ========================= */
@media (max-width: 1024px) {
    .home-highlight .grid, .intro-wrap, .contact-wrap, .layout-sidebar { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .player-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
    .menu-toggle { display: block; }
    .main-menu {
        position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
        background: var(--ami-dark-2); overflow-y: auto;
        transform: translateX(-100%); transition: transform .3s; z-index: 999;
    }
    .main-menu.open { transform: none; }
    .main-menu > ul { display: block; padding: 10px 0; }
    .main-menu > ul > li > a, .main-menu > ul > li > span { height: auto; line-height: 1.4; padding: 14px 22px; }
    .hero-slider .slide img { height: 320px; }
    .topbar-info { display: none; }
}
@media (max-width: 640px) {
    .card-grid, .player-grid, .product-grid, .footer-grid { grid-template-columns: 1fr; }
    .news-item { grid-template-columns: 1fr; }
    .news-item .body { padding: 16px; }
    .news-item .thumb img { min-height: 200px; }
    .fixture-row { grid-template-columns: 1fr; text-align: center; gap: 8px; }
    .fixture-row .venue { text-align: center; }
    .next-match .scoreboard { gap: 10px; }
    .section-head h2 { font-size: 21px; }
}

/* ===================== LAYOUT CHIA CỘT RESPONSIVE ===================== */
.split { display: grid; gap: 20px; align-items: start; min-width: 0; }
.split > * { min-width: 0; }
.split-main      { grid-template-columns: minmax(0, 1fr) 320px; }
.split-main-wide { grid-template-columns: minmax(0, 1fr) 340px; }
.split-side-300  { grid-template-columns: minmax(0, 1fr) 300px; }
.split-visual    { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.split-visual-15 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.split-visual-14 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.split-2         { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 992px) {
    .split-main, .split-main-wide, .split-side-300,
    .split-visual, .split-visual-15, .split-visual-14,
    .split-2 { grid-template-columns: minmax(0, 1fr); }
}
