/* Nashua City Championship - Main Stylesheet */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --color-primary: #1a5f2a;
    --color-primary-dark: #134820;
    --color-secondary: #c9a227;
    --color-text: #333;
    --color-text-light: #666;
    --color-white: #fff;
    --color-off-white: #f8f9fa;
    --color-border: #e0e0e0;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --header-height: 80px;
}

/* ============================================
   Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    padding: 0;
    background: var(--color-white);
}

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

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

p {
    margin: 0 0 1rem;
}

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

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

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

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

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

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

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

.btn-large {
    padding: 16px 40px;
    font-size: 16px;
}

.btn-disabled {
    opacity: 0.7;
    cursor: default;
    pointer-events: none;
}

/* Hero section white button */
.hero-section .btn {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

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

/* ============================================
   Header
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: var(--header-height);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.header-logo .logo-img {
    height: 60px;
    width: auto;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 150px;
    background: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    color: var(--color-text);
}

.dropdown-menu a:hover {
    background: var(--color-off-white);
    color: var(--color-primary);
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s ease;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    bottom: -7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

.header-cta .btn {
    font-size: 12px;
    padding: 10px 20px;
}

/* ============================================
   Main Content
   ============================================ */
.site-main {
    margin-top: var(--header-height);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('/static/sites/nashuacitychampionship/images/hero.jpg') center center / cover no-repeat;
    text-align: center;
    color: var(--color-white);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 71, 42, 0.75) 0%, rgba(18, 50, 30, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 40px 20px;
}

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

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

/* ============================================
   Page Hero
   ============================================ */
.page-hero {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    margin: 0;
}

/* ============================================
   Content Sections
   ============================================ */
.content-section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 40px;
}

/* ============================================
   Tournament Info Section
   ============================================ */
.tournament-info-section {
    background: var(--color-off-white);
    padding: 60px 0;
}

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

.tournament-dates h2 {
    margin-bottom: 30px;
}

.dates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 600px;
    margin: 0 auto;
}

.date-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-day {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.date-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    color: var(--color-text-light);
}

.date-venue {
    font-size: 14px;
    color: var(--color-text);
}

/* ============================================
   Champions Section
   ============================================ */
.champions-section {
    padding: 80px 0;
}

.champions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

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

.champion-image {
    margin-bottom: 20px;
}

.champion-image img {
    width: 280px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.champion-info h3 {
    margin-bottom: 5px;
}

.champion-title {
    color: var(--color-primary);
    font-weight: 500;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
    background: var(--color-off-white);
    padding: 80px 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    margin-bottom: 20px;
}

.about-content p {
    color: var(--color-text-light);
    margin-bottom: 20px;
}

/* ============================================
   Partners Section
   ============================================ */
.partners-section {
    padding: 80px 0;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    justify-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.partner-logo img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(50%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* ============================================
   Newsletter CTA Section
   ============================================ */
.newsletter-cta-section {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0;
    text-align: center;
}

.newsletter-cta-section h2 {
    margin-bottom: 15px;
}

.newsletter-cta-section p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.newsletter-cta-section .btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
    border-color: var(--color-white);
}

.newsletter-cta-section .btn-primary:hover {
    background: transparent;
    color: var(--color-white);
}

/* ============================================
   Qualifying Page
   ============================================ */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.requirement-card {
    background: var(--color-off-white);
    padding: 40px;
    border-radius: 8px;
}

.requirement-card.highlight {
    background: var(--color-primary);
    color: var(--color-white);
}

.requirement-card h2 {
    margin-bottom: 25px;
}

.index-requirements {
    display: flex;
    gap: 30px;
}

.index-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.index-value {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.index-label {
    font-weight: 600;
}

.index-note {
    font-size: 14px;
    color: var(--color-text-light);
}

.field-size {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Eligibility sections */
.eligibility-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.eligibility-card {
    background: var(--color-white);
    padding: 40px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.eligibility-card h3 {
    margin-bottom: 15px;
    color: var(--color-primary);
}

.eligibility-list {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 20px;
}

.eligibility-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

/* Additional Info */
.additional-info {
    max-width: 800px;
    margin: 0 auto 60px;
}

.additional-info h3 {
    color: var(--color-primary);
    margin-top: 30px;
}

/* Qualifying CTA */
.qualifying-cta {
    text-align: center;
    background: var(--color-off-white);
    padding: 50px;
    border-radius: 8px;
}

.qualifying-cta h3 {
    margin-bottom: 10px;
}

.qualifying-cta p {
    margin-bottom: 25px;
    color: var(--color-text-light);
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ============================================
   History Page
   ============================================ */
.history-intro {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}

.history-intro p {
    color: var(--color-text-light);
}

/* Archives Section */
.archives-section {
    margin-bottom: 60px;
}

.archives-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.archives-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 30px;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.archive-item {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.archive-item img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.archive-item figcaption {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-align: center;
    font-style: italic;
    min-height: 40px;
}

@media (max-width: 768px) {
    .archives-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .archive-item img {
        height: 250px;
    }
}

/* Results Link */
.results-link {
    color: var(--color-primary);
    font-size: 0.875rem;
    text-decoration: none;
}

.results-link:hover {
    text-decoration: underline;
}

/* Records Section */
.records-section {
    margin-bottom: 60px;
}

.records-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.records-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.record-card {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.record-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
}

.record-label {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.record-holder {
    display: block;
    font-weight: 600;
    font-size: 1.125rem;
}

.record-years {
    display: block;
    font-size: 13px;
    opacity: 0.8;
    margin-top: 5px;
}

/* Champions List */
.champions-list-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

.champions-table-wrapper {
    max-width: 500px;
    margin: 0 auto;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.champions-table {
    width: 100%;
    border-collapse: collapse;
}

.champions-table th,
.champions-table td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.champions-table th {
    background: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.champions-table tr:hover {
    background: var(--color-off-white);
}

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

/* ============================================
   Contact Page
   ============================================ */
.contact-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
}

.contact-form-section h2 {
    margin-bottom: 15px;
}

.contact-form-section > p {
    color: var(--color-text-light);
    margin-bottom: 30px;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #dc3545;
}

.field-error {
    color: #dc3545;
    font-size: 13px;
}

.form-errors {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
}

.btn-submit {
    align-self: flex-start;
}

/* Contact Info Sidebar */
.contact-info-section h2 {
    margin-bottom: 30px;
}

.contact-method {
    margin-bottom: 30px;
}

.contact-method h3 {
    font-size: 1rem;
    margin-bottom: 10px;
}

.contact-method a {
    color: var(--color-primary);
}

.contact-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-social .social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
}

.contact-social .social-link img {
    width: 24px;
    height: 24px;
}

.contact-social .social-link:hover {
    color: var(--color-primary);
}

/* Contact Success */
.contact-success {
    text-align: center;
    padding: 40px;
    background: #d4edda;
    border-radius: 8px;
}

.contact-success .success-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    color: #28a745;
}

.contact-success h3 {
    color: #28a745;
}

.contact-success .success-note {
    color: var(--color-text-light);
    font-size: 14px;
}

/* ============================================
   Newsletter Page
   ============================================ */
.newsletter-layout {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-intro {
    margin-bottom: 40px;
}

.newsletter-intro h2 {
    margin-bottom: 15px;
}

.newsletter-benefits {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.newsletter-benefits li {
    background: var(--color-off-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.newsletter-form-container {
    background: var(--color-off-white);
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.newsletter-form .form-group label {
    font-weight: 600;
    font-size: 14px;
}

.newsletter-form .form-input,
.newsletter-form input[type="email"],
.newsletter-form input[type="text"] {
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 16px;
    width: 100%;
}

.newsletter-form .btn-submit {
    width: 100%;
    padding: 14px;
}

.form-group-hidden {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.privacy-note {
    font-size: 13px;
    color: var(--color-text-light);
}

/* Newsletter Success */
.newsletter-success {
    text-align: center;
    padding: 20px;
}

.newsletter-success .success-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    color: #28a745;
}

.newsletter-success h3 {
    color: #28a745;
    margin-bottom: 10px;
}

.newsletter-success .success-note {
    font-size: 14px;
    color: var(--color-text-light);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #1a1a1a;
    color: var(--color-white);
    padding: 40px 0;
    text-align: center;
}

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

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo-img {
    height: 60px;
    width: auto;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-social .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.footer-social .social-link img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.footer-social .social-link:hover img {
    opacity: 0.7;
}

.footer-copyright {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.footer-credit {
    font-size: 13px;
    color: #666;
}

.footer-credit a {
    color: #888;
}

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

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 1024px) {
    .requirements-grid,
    .eligibility-sections {
        grid-template-columns: 1fr;
    }

    .records-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--color-off-white);
        margin-top: 10px;
        display: none;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .header-cta {
        display: none;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .dates-grid,
    .champions-grid,
    .contact-layout {
        grid-template-columns: 1fr;
    }

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

    .eligibility-list {
        columns: 1;
    }

    .index-requirements {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .page-hero {
        padding: 40px 0;
    }

    .content-section {
        padding: 50px 0;
    }

    .requirement-card,
    .eligibility-card,
    .newsletter-form-container {
        padding: 25px;
    }
}
