/* ========================================
   AARA Web 2.0 Theme - Modern Three-Column Layout
   ======================================== */

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

:root {
    /* Amateur Radio Green Color Palette - Forest & Nature Theme */
    --primary-color: #2d5016;      /* Dark forest green */
    --primary-dark: #1f3a0f;       /* Deeper forest green */
    --secondary-color: #4a7c2c;    /* Medium forest green */
    --accent-color: #6b9d3a;       /* Fresh grass green */
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-alt: #f4f7f0;             /* Very light green tint */
    --border-color: #d4e5c9;       /* Light sage green */
    --shadow-sm: 0 1px 2px 0 rgba(45, 80, 22, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(45, 80, 22, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(45, 80, 22, 0.1);
    --gradient-primary: linear-gradient(135deg, #4a7c2c 0%, #2d5016 100%);
    --gradient-secondary: linear-gradient(135deg, #6b9d3a 0%, #4a7c2c 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    /* Static background - winter scene with snowmobilers and ham radio operator */
    background-image: url('/images/winter-background.svg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Header Styles - Forest Green Gradient */
.site-header {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Semi-transparent forest green gradient to show winter background */
    background: linear-gradient(135deg, rgba(74, 124, 44, 0.95) 0%, rgba(45, 80, 22, 0.95) 100%);
    backdrop-filter: blur(8px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.logo-section {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.header-logo-link {
    flex-shrink: 0;
}

.header-logo {
    height: 100px;
    width: auto;
    max-width: 400px;
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.header-text {
    text-align: left;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.site-title a {
    color: white;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.site-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 0.5rem;
}

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

.nav-item a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item a:hover,
.nav-item.active a {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Three-Column Container */
.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 2rem;
}

/* Main Content Area */
.main-content {
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.15) 0%,
        rgba(118, 75, 162, 0.15) 100%),
        rgba(255, 255, 255, 0.75);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(102, 126, 234, 0.2);
    min-height: 600px;
    backdrop-filter: blur(10px);
}

/* Sidebar Styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: linear-gradient(135deg,
        rgba(102, 126, 234, 0.15) 0%,
        rgba(118, 75, 162, 0.15) 100%),
        rgba(255, 255, 255, 0.75);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(8px);
}

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

.quick-links,
.recent-updates,
.resource-links {
    list-style: none;
}

.quick-links li,
.recent-updates li,
.resource-links li {
    margin-bottom: 0.75rem;
}

.quick-links a,
.recent-updates a,
.resource-links a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary-color);
}

.quick-links a:hover,
.recent-updates a:hover,
.resource-links a:hover {
    background: white;
    color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.recent-updates li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.note-date {
    font-size: 0.8rem;
    color: var(--text-light);
    padding-left: 0.5rem;
}

/* Widget content boxes - white background for better contrast */
.widget p {
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary-color);
    margin-bottom: 0.75rem;
}

.widget p:last-child {
    margin-bottom: 0;
}

/* Events Widget - no additional styling needed, inherits from .widget */
.widget-calendar {
    /* Gradient already applied by .widget class */
}

.events-list {
    margin-bottom: 1rem;
}

.event-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

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

.event-title a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

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

.view-all-events {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem;
}

/* Page Content Styles */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.page-meta {
    color: var(--text-light);
    font-size: 0.95rem;
}

.page-content {
    font-size: 1.05rem;
    line-height: 1.8;
}

.page-content h2 {
    font-size: 1.875rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.page-content h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.page-content p {
    margin-bottom: 1rem;
}

.page-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.page-content a:hover {
    border-bottom-color: var(--primary-color);
}

.page-content ul,
.page-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* Home Page Styles */
.home-page {
    max-width: 100%;
}

.home-events {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.home-events h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.event-date-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    min-width: 70px;
    height: fit-content;
}

.event-date-badge .month {
    display: block;
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
}

.event-date-badge .day {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.event-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.event-details h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.event-details h3 a:hover {
    color: var(--primary-color);
}

.event-location {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* List Page Styles */
.list-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.list-item:hover {
    box-shadow: var(--shadow-md);
}

.list-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.list-title a {
    color: var(--text-color);
    text-decoration: none;
}

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

.list-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.list-summary {
    color: var(--text-color);
    line-height: 1.6;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
    margin-top: 4rem;
    padding: 2rem 0;
    backdrop-filter: blur(8px);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-callsign {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 0.5rem;
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 200px 1fr 200px;
        gap: 1.5rem;
    }
}

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

    .sidebar-left {
        order: 2;
    }

    .main-content {
        order: 1;
    }

    .sidebar-right {
        order: 3;
    }

    .nav-menu {
        flex-direction: column;
    }

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

    /* Logo adjustments for mobile */
    .logo-section {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .header-logo {
        height: 70px;
        max-width: 280px;
    }

    .site-title {
        font-size: 1.75rem;
    }
}

/* Calendar/Events Styles */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.calendar-event-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.event-card-date {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.event-card-date .month {
    font-size: 0.875rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.event-card-date .day {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-card-date .year {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    opacity: 0.9;
}

.event-card-content {
    flex: 1;
}

.event-card-title {
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
}

.event-card-title a {
    color: var(--text-color);
    text-decoration: none;
}

.event-card-title a:hover {
    color: var(--primary-color);
}

.event-card-time,
.event-card-location {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.event-card-summary {
    margin-top: 1rem;
    color: var(--text-color);
}

/* Single Event Page */
.event-single {
    max-width: 100%;
}

.event-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.event-meta {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.event-meta > div {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.event-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.gallery-item a {
    display: block;
    position: relative;
    cursor: zoom-in;
}

.gallery-item a::after {
    content: "🔍";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover a::after {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-item:hover img {
    opacity: 0.9;
}

.gallery-item-caption {
    padding: 1rem;
}

.gallery-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gallery-item-date {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Member/Table Styles */
.members-table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.members-table th,
.data-table th {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.members-table td,
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.members-table tr:hover,
.data-table tr:hover {
    background: var(--bg-alt);
}

.members-table a,
.data-table a {
    color: var(--primary-color);
    text-decoration: none;
}

.members-table a:hover,
.data-table a:hover {
    text-decoration: underline;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Prevent scrolling when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 2rem;
    }

    .header-container {
        position: relative;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(135deg, rgba(74, 124, 44, 0.98) 0%, rgba(45, 80, 22, 0.98) 100%);
        backdrop-filter: blur(10px);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        overflow-y: auto;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .main-nav.mobile-open {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-item a {
        padding: 1rem 1.25rem;
        font-size: 1.1rem;
    }

    /* Backdrop overlay */
    .main-nav.mobile-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        justify-content: center;
    }

    .nav-item a {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .sidebar,
    .site-footer {
        display: none;
    }

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

    .main-content {
        box-shadow: none;
    }
}
