/* Base */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800&display=swap');

body {
    font-family: 'Inter', sans-serif;
}
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #00152b;
    background-image:
        linear-gradient(rgba(0, 10, 30, 0.72), rgba(0, 10, 30, 0.82)),
        url('../images/frattonfront.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #ffffff;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout */
.page {
    max-width: 900px !important;
    width: 100%;
    margin: 0 auto;
    padding: 16px;
    overflow-x: hidden;
}

/* Ensure all child elements stay within page width */
.page > * {
    max-width: 100%;
}

/* Header */
.site-header {
    margin-bottom: 20px;
}

.site-text h1 {
    margin: 0;
    font-size: 32px;
}

.tagline {
    margin: 4px 0 0;
    font-size: 14px;
    opacity: 0.85;
}

/* PompeyRama Logo Banner */
.pompeyrama-banner {
    background: url('../images/1939cup.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    padding: 0;
    margin: 20px 0;
    text-align: right;
    border: 1px solid rgba(102, 163, 255, 0.75);
    box-shadow: 0 4px 12px rgba(0, 20, 137, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.pompeyrama-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 20, 137, 0.65) 0%, rgba(10, 36, 99, 0.7) 50%, rgba(0, 31, 92, 0.65) 100%);
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.pompeyrama-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 20, 137, 0.4);
    border-color: #66a3ff;
}

.pompeyrama-banner:hover::before {
    opacity: 1;
}

.pompeyrama-logo {
    max-width: 500px;
    max-height: 80px;
    width: auto;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    margin: 0;
    object-fit: contain;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%);
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .pompeyrama-logo {
        max-width: 400px;
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .pompeyrama-logo {
        max-width: 300px;
        max-height: 60px;
    }
}

.current-season {
    background: #002b66;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px solid #003d80;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.current-season::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 163, 255, 0.1) 0%, rgba(102, 163, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.current-season:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-color: #66a3ff;
}

.current-season:hover::before {
    opacity: 1;
}
.current-season h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.current-season-text {
    margin: 0 0 10px;
    font-size: 14px;
}

.current-season-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #ffffff;
}

.btn-primary {
    background: #ffffff;
    color: #003399;
}

.btn-secondary {
    background: transparent;
    color: #ffffff;
    border-color: #66a3ff;
}

/* Archive hub */
.archive-hub {
    margin-bottom: 80px;
}

.archive-hub h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.archive-hub-actions {
    margin-bottom: 16px;
}

.random-match-btn {
    display: inline-block;
}



/* Last visit card */
.last-visit-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(102, 163, 255, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.last-visit-card .last-visit-label {
    font-size: 12px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.last-visit-card .last-visit-title {
    font-size: 15px;
    font-weight: 700;
}

.last-visit-card .btn-secondary {
    white-space: nowrap;
}


.archive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.archive-card {
    background: #002244;
    border-radius: 6px;
    padding: 10px 12px;
    border: 1px solid #003d80;
    transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.archive-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.archive-card p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.archive-card:hover {
    background: #003366;
    border-color: #66a3ff;
    transform: translateY(-1px);
}

/* INDEX PAGE FOOTER — FIXED, CENTERED, FULL WIDTH */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;

    width: 100%;
    text-align: center;

    background: rgba(0, 0, 40, 0.55);
    color: #ffffff;

    padding: 16px 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;

    border-top: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.35);

    z-index: 999;
}

/* IMPORTANT: REMOVE breakout behaviour on index footer */
.footer-bar {
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
}

/* Stats Dashboard */
.stats-dashboard {
    margin-bottom: 30px;
}

.stats-dashboard h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: linear-gradient(135deg, #002b66 0%, #001f4d 100%);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 1px solid #003d80;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,87,184,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,87,184,0.3);
    border-color: #66a3ff;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.9;
}

/* SVG shirt icon styling */
.stat-icon .shirt {
    width: 50px;
    height: 50px;
}

.stat-icon .shirt-shape {
    fill: #0057b8;
    stroke: #ffffff;
    stroke-width: 2px;
}

.stat-icon .collar-v {
    stroke: #ffffff;
    stroke-width: 2;
    fill: none;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
    margin: 8px 0;
    line-height: 1;
    pointer-events: none;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #8fb3d9;
    margin: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Clickable stat items */
.stat-item-clickable {
    cursor: pointer !important;
    transition: all 0.2s ease;
    pointer-events: auto !important;
}

.stat-item-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(122, 180, 255, 0.4);
}

/* Ensure stat items can receive clicks */
.stat-item {
    pointer-events: auto !important;
}

.stat-detail {
    font-size: 12px;
    color: #b3c9e6;
    margin-top: 6px;
    opacity: 0.9;
}

/* Individual stat card colors */
.stat-card-matches {
    background: linear-gradient(135deg, rgba(0,43,102,0.85) 0%, rgba(0,31,77,0.9) 100%), 
                url('../images/newcrest.png');
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
}

.stat-card-matches:hover {
    transform: translateY(-3px);
    /* Keep background size the same on hover */
}

.stat-card-scorer {
    background: linear-gradient(135deg, rgba(0,61,128,0.85) 0%, rgba(0,43,102,0.9) 100%), 
                url('../playerimg/pharris2.jpg');
    background-size: cover;
    background-position: top;
    background-blend-mode: multiply;
}

.stat-card-scorer .stat-number {
    color: #ffd966;
}

.stat-card-scorer:hover {
    transform: translateY(-3px);
    /* Keep background size the same on hover */
}

.stat-card-apps {
    background: linear-gradient(135deg, rgba(0,87,184,0.85) 0%, rgba(0,61,128,0.9) 100%), 
                url('../playerimg/jdickinson2.jpg');
    background-size: cover;
    background-position: top;
    background-blend-mode: multiply;
}

.stat-card-apps:hover {
    transform: translateY(-3px);
    /* Keep background size the same on hover */
}

.stat-card-win {
    background: linear-gradient(135deg, #006633 0%, #004d26 100%);
}

.stat-card-win .stat-number {
    color: #66ff99;
}

.stat-card-seasons {
    background: linear-gradient(135deg, #4d0066 0%, #330044 100%);
}

.stat-card-seasons .stat-number {
    color: #cc99ff;
}

.stat-card-percentage {
    background: linear-gradient(135deg, #b38a00 0%, #8a6a00 100%);
}

.stat-card-percentage .stat-number {
    color: #ffeb99;
}

/* Static (non-clickable) stat cards - no hover lift, no pointer cursor */
.stat-card-static {
    cursor: default;
}

.stat-card-static:hover {
    transform: none;
    box-shadow: none;
    border-color: #003d80;
}

.stat-card-static:hover::before {
    opacity: 0;
}


/* Mobile */
@media (max-width: 768px) {

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-number {
        font-size: 28px;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }

    .current-season-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        text-align: center;
        width: 100%;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
