/* ============================================
   Southern California Robotics League
   Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary-blue: #1E3A5F;
    --accent-orange: #FF6B35;
    --light-gray: #F5F7FA;
    --dark-gray: #2D3748;
    --white: #FFFFFF;
    --success-green: #38A169;
    --error-red: #E53E3E;
    --text-color: #2D3748;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --header-height: 80px;
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

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

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

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

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1.2;
}

.logo-text span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--accent-orange);
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-orange);
    transition: var(--transition);
}

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

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

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    transition: var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-color: var(--primary-blue);
    color: var(--white);
    margin-top: var(--header-height);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-title {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-tag {
    background-color: var(--accent-orange);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
}

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

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

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

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

.btn-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 5rem 0;
}

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

.section-dark {
    background-color: var(--primary-blue);
    color: var(--white);
}

.section-dark h2,
.section-dark h3 {
    color: var(--white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
}

.section-dark .section-header p {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Cards
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

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

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

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ============================================
   Features
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--accent-orange);
}

.feature-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.feature-text {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ============================================
   Statistics
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-orange);
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ============================================
   Forms
   ============================================ */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

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

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

.form-label.required::after {
    content: ' *';
    color: var(--error-red);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--white);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

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

.form-error {
    color: var(--error-red);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: var(--error-red);
}

.form-success {
    background-color: #c6f6d5;
    color: #22543d;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    text-align: center;
    display: none;
}

.form-submit {
    width: 100%;
}

/* ============================================
   Contact Page
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    padding: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--accent-orange);
}

.contact-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.contact-value {
    font-weight: 500;
    color: var(--text-color);
}

.map-container {
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   Services Page
   ============================================ */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) > * {
    direction: ltr;
}

.service-detail-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.service-detail-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.service-detail-content h3 {
    margin-bottom: 1rem;
}

.service-detail-content p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-list {
    margin-bottom: 1.5rem;
}

.service-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.service-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: 700;
}

/* ============================================
   About Page
   ============================================ */
.about-hero {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 8rem 0 5rem;
    margin-top: var(--header-height);
}

.about-hero h1 {
    color: var(--white);
}

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

.value-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.value-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background-color: var(--accent-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.value-icon svg {
    width: 35px;
    height: 35px;
    fill: var(--white);
}

.value-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.value-text {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ============================================
   Legal Pages
   ============================================ */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 8rem;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.legal-content ul,
.legal-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    list-style: disc;
}

.legal-content ol li {
    list-style: decimal;
}

.last-updated {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 2rem;
}

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9375rem;
}

.cookie-text a {
    color: var(--accent-orange);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.cookie-btn-accept {
    background-color: var(--accent-orange);
    color: var(--white);
}

.cookie-btn-accept:hover {
    background-color: #e55a2b;
}

.cookie-btn-reject {
    background-color: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.cookie-btn-reject:hover {
    background-color: var(--white);
    color: var(--dark-gray);
}

.cookie-btn-settings {
    background-color: transparent;
    color: var(--accent-orange);
    text-decoration: underline;
    padding: 0.75rem 0.5rem;
}

.cookie-btn-settings:hover {
    color: var(--white);
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background-color: var(--white);
    border-radius: 10px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cookie-modal-header h3 {
    margin: 0;
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cookie-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.cookie-category-title {
    font-weight: 600;
    color: var(--text-color);
}

.cookie-category-description {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition);
    border-radius: 26px;
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-orange);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo span {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--accent-orange);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
    transition: var(--transition);
}

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

.footer-contact li {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

.footer-contact strong {
    display: block;
    color: var(--white);
    margin-bottom: 0.25rem;
}

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

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

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

.footer-legal a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

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

/* ============================================
   Page Header
   ============================================ */
.page-header {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 8rem 0 4rem;
    margin-top: var(--header-height);
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 1rem;
}

.page-header p {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
    padding: 1rem 0;
    background-color: var(--light-gray);
}

.breadcrumbs-list {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumbs-list li::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumbs-list li:last-child::after {
    display: none;
}

.breadcrumbs-list a {
    color: var(--text-light);
}

.breadcrumbs-list a:hover {
    color: var(--primary-blue);
}

.breadcrumbs-list li:last-child {
    color: var(--primary-blue);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .nav-list {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        box-shadow: var(--shadow);
        display: none;
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero {
        min-height: 500px;
    }
    
    .contact-grid,
    .service-detail,
    .service-detail:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .btn-group {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .hero-tags {
        flex-direction: column;
        align-items: flex-start;
    }
}

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

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

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

.hidden { display: none !important; }
.visible { display: block !important; }

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal {
        display: none !important;
    }
    
    main {
        margin-top: 0;
    }
    
    body {
        font-size: 12pt;
    }
}
