/* Custom Styles for Tawa United FC */

/* Section Headers */
.section-header {
    position: relative;
    font-size: 1.5rem;
    font-weight: bold;
    color: #001540;
    text-transform: uppercase;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 4px solid #D20A11;
    background: linear-gradient(90deg, rgba(210, 10, 17, 0.1) 0%, transparent 100%);
    padding: 0.5rem 1rem;
    border-radius: 0 4px 4px 0;
}

/* Page container constraints for a cleaner centered layout */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-header::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #D20A11, #001540);
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    background: #001540;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: none;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.hero-stat {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    color: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.hero-stat h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    color: #fcd34d;
}

.hero-stat p {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.btn-primary,
.action-red {
    background: #D20A11;
    color: white;
    border: none;
    box-shadow: 0 10px 25px rgba(210, 10, 17, 0.2);
}

.btn-primary:hover,
.action-red:hover {
    background: #c51010;
}

.btn-secondary,
.bg-white\/10 {
    background-color: #f8fafc;
    color: #001540;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover,
.bg-white\/10:hover {
    background-color: #e2e8f0;
}

.home-card {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 14px 40px rgba(2,6,23,0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    padding: 1rem;
}

.home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 55px rgba(2,6,23,0.09);
}

.match-summary {
    border-left: 4px solid #D20A11;
}

/* Enhanced match summary card appearance */
.match-summary {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(2,6,23,0.06);
}

.match-summary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(2,6,23,0.09);
}

.match-summary .match-score {
    background: linear-gradient(90deg, rgba(210,10,17,0.12), rgba(0,21,64,0.04));
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 1.75rem;
    color: #D20A11;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.03);
}

.match-summary .match-team p {
    margin: 0;
}

/* Recent match card layout to match provided format */
.recent-match-card {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(2,6,23,0.06);
}

.recent-match-card .vs-label {
    font-size: 34px;
    font-weight: 800;
    color: #6b7280;
}

.recent-match-card .match-team p {
    margin: 0;
    color: #111827;
}

.recent-match-card .divider {
    height: 1px;
    width: 80px;
    background: #e5e7eb;
}

.recent-match-card .match-date {
    font-size: 1rem;
    color: #475569;
    margin-top: 0.25rem;
}

.recent-match-card .match-result {
    font-size: 1rem;
    color: #c53030; /* red-600 */
}

.recent-match-card .font-bold.text-lg {
    color: #111827;
}

.btn-view-red {
    background: #D20A11;
    color: white;
    box-shadow: 0 8px 20px rgba(210,10,17,0.18);
    border: none;
}

.btn-view-red:hover {
    background: #b30a0a;
}

.recent-match-card img {
    object-fit: contain;
}

.result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
}

.result-table thead th {
    padding: 1rem 0.75rem;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #475569;
    font-weight: 700;
}

.result-table tbody tr {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    cursor: pointer;
}

.result-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    background: #f8fafc;
}

.result-table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border: none;
}

.result-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #e2e8f0;
    color: #475569;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

.result-score {
    font-size: 1.5rem;
    font-weight: 900;
    color: #001540;
}

.result-row-title {
    font-weight: 700;
    color: #1f2937;
}

.result-row-subtitle {
    color: #6b7280;
    font-size: 0.85rem;
}

.match-summary .match-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.match-summary .match-team img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 9999px;
}

.match-summary .match-score {
    font-size: 2rem;
    font-weight: 900;
    color: #001540;
}

.match-summary .match-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.match-summary .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.badge-league {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-venue {
    background: #fef3c7;
    color: #b45309;
}

.badge-status {
    background: #d1fae5;
    color: #166534;
}

.feature-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,21,64,0.08), rgba(0,21,64,0.3));
    z-index: 1;
}

.feature-card img,
.feature-card iframe {
    display: block;
    width: 100%;
    min-height: 220px;
}

.feature-card .feature-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
}

/* Section header style for clearer visual hierarchy */
.section-header {
    font-size: 1.25rem;
    color: #001540;
    font-weight: 800;
    letter-spacing: 0.01em;
    margin-bottom: 0.75rem;
}

/* Uniform spacing between page sections */
main > .grid,
main > .mt-16,
main > .grid + .grid {
    margin-bottom: 1.75rem;
}

/* Make cards consistent inside grids */
.grid .home-card,
.grid .feature-card,
.grid .team-players {
    height: 100%;
}

/* Improve readability for paragraphs inside cards */
.home-card p,
.feature-card p {
    line-height: 1.6;
    color: #475569;
}

/* Tighter, consistent gutter for grid items */
.grid { gap: 1.25rem; }

/* Footer spacing for sections */
.home-card .border-t,
.home-card .border-b {
    padding-top: 0.75rem;
}

/* News caption overlay (large hero-style card) */
.caption-overlay {
    z-index: 3;
    left: 1rem;
    bottom: 1rem;
    right: 1rem;
}

.hero-value-card,
.why-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.hero-value-card {
    border-radius: 1.5rem;
    padding: 1rem;
}

.why-card {
    border-radius: 1.5rem;
}
.caption-badge {
    background: #ffd54f;
    color: #1f2937;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}
.caption-title {
    color: white;
    line-height: 1.05;
    text-shadow: 0 6px 18px rgba(2,6,23,0.55);
}
.caption-sub {
    color: rgba(255,255,255,0.9);
    max-width: 40rem;
}

/* Video caption overlay */
.feature-card .video-caption {
    position: absolute;
    left: 1rem;
    bottom: 0.75rem;
    z-index: 4;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}
.feature-card .video-caption::before {
    content: '';
    display: block;
    height: 4px;
    width: 48px;
    background: #D20A11;
    margin-bottom: 8px;
}

/* small red timeline dot at right side of caption */
.feature-card .video-caption .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #D20A11;
    border-radius: 9999px;
    margin-left: 8px;
}

/* Caption that appears below the news image */
.news-caption-below {
    padding-left: 0.25rem;
}
.news-caption-below .caption-badge {
    background: #ffd54f;
    color: #1f2937;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}
.news-caption-below h3 {
    margin-top: 0.5rem;
}
.news-caption-below .caption-sub {
    color: #475569;
}

.section-note {
    color: #475569;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .hero-stat-grid {
        grid-template-columns: 1fr;
    }

    .match-summary .match-meta {
        justify-content: center;
    }
}

/* Navy Blue and Action Red */
.navy-blue { background-color: #001540; }
.action-red { background-color: #D20A11; }

.logo-overlay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent; /* wrapper transparent so only image pixels are affected */
    padding: 0.15rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.logo-overlay img {
    display: block;
}

/* Apply an invert-only overlay to logo vectors (assumes the logo image has transparency).
   This changes the logo colors to white while preserving transparency. */
.logo-invert img {
    filter: invert(1) grayscale(1) brightness(2);
    transition: filter 180ms ease;
}

/* Hero logo overlay (large, centered, semi-transparent) */
.hero-logo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
    opacity: 0.6; /* 60% */
}

.hero-logo-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Team Player Cards - Using Flexbox */
.team-players {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.player-card {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1 1 200px;
    max-width: 250px;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.player-card img {
    width: 100%;
    height: 12rem;
    object-fit: contain;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    background-color: #f3f4f6;
}

/* Coaching Staff Card */
.coach-card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-bottom: 4px solid #D20A11;
    transition: transform 0.3s ease;
}

.coach-card:hover {
    transform: translateY(-3px);
}

.coach-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    display: block;
    background-color: #f3f4f6;
}

.coach-card .coach-info {
    padding: 1.5rem;
}

/* Image Modal Styles */
#imageModal img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f3f4f6;
}

/* Make images clickable */
.coach-card img,
.player-card img {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.coach-card img:hover,
.player-card img:hover {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header {
        font-size: 1.25rem;
        padding-left: 0.75rem;
    }

    .team-players {
        gap: 1rem;
    }

    .player-card {
        flex: 1 1 150px;
    }
}

/* Admin dashboard improvements */
.admin-main {
    min-height: calc(100vh - 8rem);
}
.admin-summary-card,
.admin-action-card,
.admin-section-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 18px 50px rgba(0,0,0,0.06);
}
.admin-summary-card {
    padding: 1.5rem;
}
.admin-summary-card h3,
.admin-action-card h3,
.admin-section-card h3 {
    margin-bottom: 1rem;
    color: #001540;
}
.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}
.admin-summary-stat {
    padding: 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, #001540 0%, #0d3155 100%);
    color: white;
}
.admin-summary-stat span {
    display: block;
}
.admin-summary-stat .value {
    font-size: 2rem;
    font-weight: 900;
}
.admin-summary-stat .label {
    margin-top: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    opacity: 0.8;
}
.admin-action-list {
    display: grid;
    gap: 0.75rem;
}
.admin-action-list a {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    background: #f4f6fb;
    color: #001540;
    text-decoration: none;
    font-weight: 600;
}
.admin-action-list a:hover {
    background: #001540;
    color: white;
}
.admin-panel-section {
    padding: 1.5rem;
    border-radius: 1rem;
    background: white;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
}
.admin-panel-section h2 {
    margin-bottom: 1.25rem;
}
.admin-panel-grid {
    display: grid;
    gap: 1.5rem;
}
@media (max-width: 1024px) {
    .admin-summary-grid,
    .admin-panel-grid {
        grid-template-columns: 1fr;
    }
}

/* Left Sidebar Styles */
.site-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #001540, #0b2340);
    color: #fff;
    z-index: 1000;
    overflow-y: auto;
}
.sidebar-brand img { border-radius: 6px; }
.sidebar-link {
    display: block;
    color: #e6eef8;
    padding: 0.5rem 0.25rem;
}
.sidebar-link:hover { color: #fff; }

/* When sidebar is active, add left padding to page content */
body.has-sidebar {
    padding-left: 260px;
}

/* Small screens: hide sidebar and remove padding */
@media (max-width: 768px) {
    .site-sidebar { transform: translateX(-120%); position: fixed; }
    body.has-sidebar { padding-left: 0; }
}