/* ===================================
   Modern Bill Cox Website Styles
   =================================== */

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

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #1a3a6b;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --grey: #666;
    --light-grey: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    background: var(--primary-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

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

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

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

/* Navigation */
#main-nav {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-header {
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    list-style: none;
    padding: 0;
}

.nav-links > li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nav-links > li > a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
    background-color: rgba(255,255,255,0.1);
    padding-left: 40px;
}

/* Submenu Styles */
.has-submenu {
    position: relative;
}

.submenu {
    list-style: none;
    background-color: rgba(0,0,0,0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.has-submenu.submenu-open .submenu {
    max-height: 500px;
    overflow-y: auto;
}

.submenu li a {
    display: block;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 10px 30px 10px 50px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.submenu li a:hover {
    background-color: rgba(255,255,255,0.1);
    padding-left: 60px;
}

/* Scrollbar styling for submenu */
.submenu::-webkit-scrollbar {
    width: 8px;
}

.submenu::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.submenu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.submenu::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 40px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero .tagline {
    font-size: 1.2rem;
    font-style: italic;
    opacity: 0.9;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 40px;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.welcome-box {
    margin-bottom: 40px;
}

.welcome-box h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
}

.welcome-box p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.feature-list {
    list-style: none;
    margin: 20px 0;
}

.feature-list li {
    padding: 15px;
    margin-bottom: 10px;
    background: var(--light-bg);
    border-left: 4px solid var(--primary-color);
    border-radius: 5px;
}

.feature-list strong {
    color: var(--primary-color);
}

/* Highlights Section */
.highlights {
    margin-top: 40px;
}

.highlights h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.8rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
}

.highlight-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: var(--light-bg);
    padding: 25px;
    border-radius: 10px;
    border: 2px solid var(--light-grey);
    transition: all 0.3s ease;
}

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

.card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.card p {
    color: var(--grey);
    margin-bottom: 15px;
}

/* Button Styles */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-box {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.sidebar-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.sidebar-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 10px;
}

.quick-links {
    list-style: none;
}

.quick-links li {
    margin-bottom: 10px;
}

.quick-links a {
    color: var(--primary-color);
    text-decoration: none;
    display: block;
    padding: 10px;
    background: var(--light-bg);
    border-radius: 5px;
    transition: all 0.2s ease;
}

.quick-links a:hover {
    background: var(--primary-color);
    color: white;
    padding-left: 20px;
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 40px;
}

footer a {
    color: white;
    text-decoration: underline;
}

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

/* Video Page Styles */
.video-container {
    margin-bottom: 40px;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    color: var(--primary-color);
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 15px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    #main-nav {
        position: fixed;
        left: -300px;
        top: 0;
        width: 300px;
        height: 100vh;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    #main-nav.active {
        left: 0;
    }

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

    .hero h1 {
        font-size: 1.8rem;
    }

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

    .main-content {
        padding: 25px;
    }

    .container {
        padding: 20px 15px;
    }

    .highlight-cards {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-item img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 20px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 20px;
    }

    .welcome-box h2,
    .highlights h3 {
        font-size: 1.5rem;
    }
}

/* Desktop Enhancement */
@media (min-width: 769px) {
    #main-nav {
        position: sticky;
        width: 280px;
        height: calc(100vh - 40px);
        overflow-y: auto;
        float: left;
        margin-right: 30px;
        border-radius: 15px;
        margin: 20px;
    }

    .container {
        margin-left: 340px;
    }

    .has-submenu:hover .submenu {
        max-height: 500px;
        overflow-y: auto;
    }
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 50px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s ease;
    width: 50px;
    height: 50px;
    line-height: 40px;
}

.lightbox-close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    cursor: pointer;
    padding: 20px 15px;
    z-index: 10001;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-color);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 10001;
}

/* Mobile adjustments for lightbox */
@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 40px;
    }

    .lightbox-nav {
        font-size: 30px;
        padding: 15px 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-counter {
        font-size: 14px;
        bottom: 20px;
        padding: 8px 15px;
    }
}
