/**
 * Barbarian Rugby Club - Modern Sports Template
 * Creative, responsive, mobile-first design
 */

/* ===== VARIABLES ===== */
:root {
    --primary: #002C5B;      /* Navy Blue */
    --secondary: #6FAFDD;    /* Sky Blue */
    --accent: #D4AF37;       /* Gold */
    --dark: #001F3F;         /* Darker Navy */
    --light: #F8F9FA;        /* Light Gray */
    --success: #28A745;      /* Green */
    --danger: #DC3545;       /* Red */
    --white: #FFFFFF;
    --text-dark: #212529;
    --text-gray: #6C757D;
    --border: #DEE2E6;
    
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Crimson Text', Georgia, serif;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
    
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-12 { flex: 0 0 100%; }
.col-8 { flex: 0 0 66.666%; }
.col-6 { flex: 0 0 50%; }
.col-4 { flex: 0 0 33.333%; }
.col-3 { flex: 0 0 25%; }

@media (max-width: 768px) {
    .col, .col-3, .col-4, .col-6, .col-8 {
        flex: 0 0 100%;
    }
}

/* ===== HEADER & NAVIGATION ===== */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    border-bottom: 1px solid var(--secondary);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left, .top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-bar a {
    color: var(--white);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.site-logo a {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.site-logo img {
    height: 50px;
    width: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        padding: 20px;
    }
    
    .main-nav.active {
        display: block;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 80px 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0 L50 50 L0 100 L100 100 L50 50 L100 0 Z" fill="rgba(255,255,255,0.03)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--dark);
}

.btn-primary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== CARDS ===== */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-image {
    position: relative;
    padding-top: 60%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    overflow: hidden;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: var(--dark);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary);
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.875rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-excerpt {
    color: var(--text-gray);
    margin-bottom: 20px;
    flex: 1;
}

.card-footer {
    padding: 20px 25px;
    background: var(--light);
    border-top: 1px solid var(--border);
}

/* ===== MATCH CARDS ===== */
.match-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    padding: 30px;
    margin-bottom: 25px;
    transition: var(--transition);
}

.match-card:hover {
    box-shadow: var(--shadow-md);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light);
}

.match-date {
    font-size: 0.875rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-venue {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.team {
    flex: 1;
    text-align: center;
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.team-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

.match-score {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.score-separator {
    font-size: 1.5rem;
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .match-teams {
        flex-direction: column;
        gap: 15px;
    }
    
    .match-score {
        font-size: 2rem;
    }
}

/* ===== PLAYER CARD ===== */
.player-card {
    text-align: center;
}

.player-card .card-image {
    padding-top: 120%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.player-card .card-image img {
    object-fit: cover;
    object-position: top center;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    padding: 20px;
    background: var(--light);
}

.player-stat {
    text-align: center;
}

.player-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.player-stat-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== SECTION STYLES ===== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 20px auto 0;
}

.section-light {
    background: var(--white);
}

.section-dark {
    background: var(--light);
}

/* ===== GRID ===== */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--accent);
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ===== CONTENT STYLES ===== */
.content {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.content h1, .content h2, .content h3 {
    margin-top: 30px;
}

.content h1:first-child,
.content h2:first-child,
.content h3:first-child {
    margin-top: 0;
}

.content p {
    margin-bottom: 20px;
}

.content img {
    margin: 30px 0;
    border-radius: 8px;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    padding: 20px 0;
    background: var(--light);
}

.breadcrumbs ul {
    display: flex;
    list-style: none;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin-left: 10px;
    color: var(--text-gray);
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 10px !important; }
.mb-2 { margin-bottom: 20px !important; }
.mb-3 { margin-bottom: 30px !important; }
.mb-4 { margin-bottom: 40px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 10px !important; }
.mt-2 { margin-top: 20px !important; }
.mt-3 { margin-top: 30px !important; }
.mt-4 { margin-top: 40px !important; }

.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }

@media (max-width: 768px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
}
