/*
 * Archway HCC — hcc.css
 * Project-specific styles for Haverfordwest Cricket Club
 */

/* ─────────────────────────────────────────
   CSS CUSTOM PROPERTIES
───────────────────────────────────────── */

:root {
	--hcc-blue:        #3253d8;
    --hcc-blue-dark:   #2743b8;
    --hcc-white:       #ffffff;
    --hcc-text:        #1a1a2e;
    --hcc-muted:       #6b7280;
    --hcc-border:      #e5e7eb;
    --hcc-footer-bg:   #1a1a2e;
    --hcc-footer-text: #9ca3af;

    --hcc-nav-link-alpha:       rgba(255, 255, 255, 0.9);
    --hcc-nav-link-alpha-hover: rgba(255, 255, 255, 1);

    --hcc-header-transition: transform 0.3s ease;
    --hcc-header-height: 120px;
}


/* ─────────────────────────────────────────
   GLOBAL
───────────────────────────────────────── */

html {
	overflow-x: hidden;
}

body {
    font-family: 'Google Sans Flex', sans-serif;
    color: var(--hcc-text);
    background: var(--hcc-white);
    font-size: 18px;
	line-height: 1.7;
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
	color: var(--hcc-muted);
	font-weight: 700;
	letter-spacing: -0.025rem;
}

.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {
	margin-top: 0;
	margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
	.h1, .h2, h1, h2 {
		letter-spacing: -0.1rem;
	}

	.h3, .h4, .h5, .h6, h3, h4, h5, h6 {
		letter-spacing: -0.05rem;
	}
}

a {
    color: var(--hcc-blue);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--hcc-blue-dark);
}

/* Push content below fixed header */
.site-content {
    padding-top: var(--hcc-header-height);
}

strong {
	font-weight: 600;
}

/* ─────────────────────────────────────────
   CONTAINER
───────────────────────────────────────── */

.container,
.container-xl {
    --bs-gutter-x: 2.5rem;
}

/* ─────────────────────────────────────────
   HEADER & NAVBAR
───────────────────────────────────────── */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    transform: translateY(0);
    transition: var(--hcc-header-transition);
}

/* State: header hidden (slides up) */
.site-header.header-hidden {
    transform: translateY(-100%);
}

.navbar {
    background-color: var(--hcc-blue);
    min-height: var(--hcc-header-height);
    padding-top: 0;
    padding-bottom: 0;
}

/* Logo */
.hcc-logo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .hcc-logo {
        width: 80px;
        height: 80px;
		margin: 0.5rem 0;
    }
}

/* Club name beside logo */
.hcc-club-name {
    font-family: 'Google Sans Flex', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    line-height: 1.3;
    color: var(--hcc-white);
    letter-spacing: -0.05rem;
	position: absolute;
	left: calc(67px + 2rem);
	top: 24px;
}

@media (min-width: 992px) {
    .hcc-club-name {
		font-size: 2.25rem;
		left: calc(87px + 2rem);
		top: 20px;
    }
}

/* Navbar brand — no Bootstrap override weirdness */
.navbar-brand {
    padding: 0.75rem 0;
    text-decoration: none;
}

.navbar-brand:hover .hcc-club-name {
    color: var(--hcc-white);
}

/* Nav collapse */
@media (min-width: 992px) {
	.navbar-expand-lg .navbar-collapse {
		flex-basis: auto;
		position: absolute;
		left: calc(87px + 2rem);
		top: 60px;
		display: flex !important;
	}
}

/* Nav items */
.navbar-nav .nav-item {
	margin-right: 1.5rem;
}

.navbar-nav .nav-item:last-child {
	margin-right: 0;
}

.dropdown-toggle::after {
	display: inline-block;
	margin-left: 0.5rem;
	vertical-align: .255em;
	content: "";
	border-top: .3em solid;
	border-right: .3em solid transparent;
	border-bottom: 0;
	border-left: .3em solid transparent;
	opacity: 0.5;
}

/* Nav links */
.navbar-nav .nav-link {
    color: var(--hcc-nav-link-alpha);
    font-family: 'Google Sans Flex', sans-serif;
    font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.025rem;
    padding: 0.5rem 0.125rem !important;
	position: relative;
    text-decoration: none;
	transition: color 0.2s ease;
}

.navbar-nav .nav-link::before {
	content: "";
	height: 2px;
	width: 100%;
	background-color: transparent;
	border-radius: 1px;
	position: absolute;
	bottom: 6px;
	left: 0;
	transition: background-color 0.2s ease;
}

.navbar-nav .nav-link:hover::before {
	background-color: rgba(255,255,255,0.75);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    color: var(--hcc-nav-link-alpha-hover);
}

/* Dropdown menu */
.dropdown-menu {
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 180px;
}

.dropdown-item {
    font-family: 'Google Sans Flex', sans-serif;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    color: var(--hcc-text);
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(59, 113, 224, 0.08);
    color: var(--hcc-blue);
}

.dropdown-item.active {
    background-color: var(--hcc-blue);
    color: var(--hcc-white);
}

/* Hamburger — white icon */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    color: var(--hcc-white);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2c255%2c255%2c1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile nav — open state */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--hcc-blue);
        padding: 1rem 0 1.5rem;
    }

    .navbar-nav .nav-link {
        padding: 0.6rem 1rem;
    }

    .dropdown-menu {
        background-color: rgba(0, 0, 0, 0.15);
        box-shadow: none;
        border-radius: 0;
        padding: 0;
    }

    .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
        padding: 0.5rem 1.75rem;
    }

    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--hcc-white);
    }
}

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */

.site-footer {
    background-color: var(--hcc-footer-bg);
    color: var(--hcc-footer-text);
    font-size: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer .footer-credit {
    color: var(--hcc-footer-text);
}

.site-footer a {
    color: var(--hcc-footer-text);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: var(--hcc-white);
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */

.btn-primary {
    background-color: var(--hcc-blue);
    border-color: var(--hcc-blue);
    font-family: 'Google Sans Flex', sans-serif;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--hcc-blue-dark);
    border-color: var(--hcc-blue-dark);
}

.btn-outline-primary {
    border-color: var(--hcc-blue);
    color: var(--hcc-blue);
    font-family: 'Google Sans Flex', sans-serif;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: var(--hcc-blue);
    border-color: var(--hcc-blue);
}

/* ─────────────────────────────────────────
   SKIP TO CONTENT
───────────────────────────────────────── */

.skip-to-content {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 9999;
    padding: 0.5rem 1rem;
    background: var(--hcc-text);
    color: var(--hcc-white);
    font-size: 0.875rem;
    text-decoration: none;
}

.skip-to-content:focus {
    top: 0;
}

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */

.page-hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 300px;
    display: flex;
    align-items: flex-end;
}

@media (min-width: 768px) {
    .page-hero {
        min-height: 450px;
    }
}

@media (min-width: 1200px) {
    .page-hero {
        min-height: 600px;
    }
}

.page-hero-overlay {
    width: 100%;
    padding: 8rem 0 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.page-hero-title {
    color: #ffffff;
	font-size: 1.5rem;
    font-weight: 700;
	letter-spacing: -0.025rem;
    margin: 0;
}

.page-hero-tagline {
    color: #ffffff;
    margin: 0;
}

@media (min-width: 768px) {

	.page-hero-title {
		font-size: 3rem;
		letter-spacing: -0.1rem;
	}

    .page-hero-tagline {
        font-size: 1.5rem;
		margin: -0.5rem 0 0.5rem;
    }
}

/* ─────────────────────────────────────────
   KADENCE OVERWRITES
───────────────────────────────────────── */

.kt-block-spacer .kt-divider {
	border-top: solid 1px #a7a7a7 !important;
}

/* ─────────────────────────────────────────
   HERO - FEATURED IMAGE FOR LIVE SPORT
───────────────────────────────────────── */

.page-id-635 .page-hero {
	background-position: top center;
}

/* ─────────────────────────────────────────
   BAR & KITCHEN
───────────────────────────────────────── */

/* Opening Hours */


.opening-hours > .wp-block-column > .opening-club {
	position: relative;
	display: inline-block;
	margin-bottom: 20px;
}

.opening-hours > .wp-block-column > .opening-club::after {
	content: "";
	position: absolute;
	bottom: -12px;
	left: 0px;
	width: 100%;
	height: 4px;
	border-bottom-width: 4px;
	border-bottom-style: dotted;
	border-bottom-color: #4352d2;
	opacity: 0.25;
}

.opening-hours > .wp-block-column.today > .opening-club::after {
	border-radius: 2px;
	background-color: #4352d2;
	border-bottom-style: none;
	opacity: 1;
}

.opening-hours > .wp-block-column > .opening-kitchen {
	margin-top: 0;
}

.opening-hours > .wp-block-column.today {
	font-weight: 700;
}

/* ─────────────────────────────────────────
   LIVE SPORT
───────────────────────────────────────── */

/* Upcoming Fixtures */

.fixture-row {
    display: grid;
    grid-template-columns: 94px 58px 1fr auto;
    align-items: center;
    padding: 20px;
    background: #f5f5f5;
    font-weight: 700;
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid #e8e8e8;
}

.fixture-row:first-of-type {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.fixture-row:last-of-type {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    border-bottom: none;
}

.fixture-row:first-of-type:last-of-type {
    border-radius: 10px;
}

.fixture-date-header {
	margin-top: 30px;
	margin-bottom: 10px;
}

.fixture-time {
}

.fixture-icon img {
	width: 40px;
}

.fixture-time > span {
	text-align: center;
	font-weight: 700;
	border-radius: 15px;
	border: 2px solid #ddd;
	display: inline-block;
	width: 74px;
	padding: 3px 0px;
	letter-spacing: -0.05rem;
}

@media (max-width: 600px) {
    .fixture-row {
        grid-template-columns: 40px 1fr 1fr;
        grid-template-rows: auto auto;
    }
    
    .fixture-teams, .fixture-event {
        grid-column: 2 / -1;
    }
}