/*
Theme Name: Swim Lancashire
Theme URI: https://www.swimlancashire.org.uk
Description: A modern, mobile-ready WordPress theme for Lancashire County Water Polo & Swimming Association featuring the Lancashire rose and red color scheme
Version: 1.0
Author: Custom Theme
Author URI: https://www.swimlancashire.org.uk
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swimlancashire

This theme is designed for Swim Lancashire with a focus on:
- Modern, clean design
- Full mobile responsiveness
- Red color scheme representing Lancashire
- Easy navigation for swimming competition information
- Event calendar integration ready
*/

/* ========================================
   CSS RESET & BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #cf2e2e;
    --dark-red: #a82424;
    --light-red: #e85a5a;
    --accent-blue: #004E89;
    --dark-gray: #2C2C2C;
    --medium-gray: #666666;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --border-gray: #E0E0E0;
    --success-green: #28A745;
    
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-headings: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 4px 20px rgba(220, 20, 60, 0.2);
}

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

body {
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--dark-red);
    text-decoration: underline;
}

strong, b {
    font-weight: 700;
}

em, i {
    font-style: italic;
}

/* ========================================
   LAYOUT STRUCTURE
   ======================================== */

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER
   ======================================== */

.site-header {
    background-color: var(--white);
    border-bottom: 3px solid var(--primary-red);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

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

.header-top a {
    color: var(--white);
    margin-left: 1rem;
}

.header-top a:hover {
    color: var(--light-gray);
}

.header-main {
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.site-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-red);
    margin: 0;
    line-height: 1;
}

.site-title a {
    color: var(--primary-red);
    text-decoration: none;
}

.site-title a:hover {
    color: var(--dark-red);
    text-decoration: none;
}

.site-description {
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin: 0.25rem 0 0;
}

/* ========================================
   NAVIGATION
   ======================================== */

.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark-gray);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    background-color: var(--primary-red);
    color: var(--white);
    text-decoration: none;
}

/* Dropdown Menu */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    z-index: 100;
}

.nav-menu li:hover > .sub-menu {
    display: block;
}

.nav-menu .sub-menu li {
    display: block;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--dark-gray);
    white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
    background-color: var(--light-gray);
    color: var(--primary-red);
    text-decoration: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed);
}

.menu-toggle:hover {
    background-color: var(--dark-red);
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 5px 0;
    transition: 0.3s;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--dark-red) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
    text-decoration: none;
}

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

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

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

.btn-red:hover {
    background-color: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
    text-decoration: none;
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */

.content-section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: var(--primary-red);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-header .underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary-red);
    margin: 0 auto 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--medium-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   CARDS & BOXES
   ======================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all var(--transition-speed);
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

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

.card-meta {
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

.card-excerpt {
    color: var(--medium-gray);
    margin-bottom: 1rem;
}

/* ========================================
   EVENTS & NEWS
   ======================================== */

.event-item,
.news-item {
    background-color: var(--white);
    border-left: 4px solid var(--primary-red);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
}

.event-item:hover,
.news-item:hover {
    box-shadow: var(--box-shadow-hover);
    transform: translateX(5px);
}

.event-date,
.news-date {
    display: inline-block;
    background-color: var(--primary-red);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.event-title,
.news-title {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.event-title a,
.news-title a {
    color: var(--dark-gray);
    text-decoration: none;
}

.event-title a:hover,
.news-title a:hover {
    color: var(--primary-red);
}

.event-location,
.news-category {
    color: var(--medium-gray);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
    padding: 2rem;
}

.widget {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.widget-title {
    color: var(--primary-red);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-red);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-gray);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: var(--dark-gray);
    transition: color var(--transition-speed);
}

.widget ul li a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background-color: var(--dark-gray);
    color: var(--light-gray);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-widget h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

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

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: var(--light-gray);
    text-decoration: none;
}

.footer-widget a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all var(--transition-speed);
}

.social-icon:hover {
    background-color: var(--primary-red);
    transform: translateY(-3px);
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* ========================================
   TABLES
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

thead {
    background-color: var(--primary-red);
    color: var(--white);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-gray);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: var(--light-gray);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

.text-red {
    color: var(--primary-red);
}

.bg-red {
    background-color: var(--primary-red);
}

.bg-light-gray {
    background-color: var(--light-gray);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 2rem; }
.p-4 { padding: 3rem; }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
}

@media screen and (max-width: 768px) {
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Header */
    .header-top {
        display: none;
    }
    
    .header-inner {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-branding {
        flex-direction: column;
        text-align: center;
    }
    
    /* Navigation */
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        width: 100%;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li > a {
        border-radius: 0;
        border-bottom: 1px solid var(--border-gray);
    }
    
    .nav-menu .sub-menu {
        position: static;
        box-shadow: none;
        background-color: var(--light-gray);
        padding-left: 1rem;
    }
    
    /* Hero */
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    /* Cards */
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    /* Tables */
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}

@media screen and (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .site-logo {
        width: 60px;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .content-section {
        padding: 2rem 0;
    }
    
    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .site-header,
    .main-navigation,
    .sidebar,
    .site-footer,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    clip: auto !important;
    color: var(--primary-red);
    display: block;
    font-size: 1rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}
