/* ===================================================
   CRESTONE JAZZ TRIO — Master Stylesheet
   =================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,700;1,500&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
    --navy:       #001439;
    --navy-90:    rgba(0, 20, 57, 0.9);
    --slate:      #3b527b;
    --slate-90:   rgba(59, 82, 123, 0.9);
    --gold:       #d4af37;
    --gold-hover: #f0cc5b;
    --text-dark:  #1a1a2e;
    --text-body:  #444;
    --bg-light:   #fafafa;
    --bg-alt:     #f0f2f5;
    --white:      #ffffff;
    --font-body:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    color: var(--text-body);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > main {
    flex: 1;
}

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

/* ===================================================
   HEADER & NAVIGATION
   =================================================== */
header {
    background: linear-gradient(to right, var(--navy-90) 50%, var(--slate-90) 100%);
    color: var(--white);
    padding: 0 15px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding var(--transition), background var(--transition);
}

header.large {
    padding: 5px 20px;
    background: linear-gradient(to right, var(--navy-90) 50%, var(--slate-90) 100%);
}

nav {
    display: flex;
    align-items: center;
    width: 100%;
}

nav .logo-small {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.5s, opacity 0.5s, transform 0.5s, width 0.5s;
}

nav .logo-small img {
    width: 100px;
    height: auto;
    margin-right: 15px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    flex: 1;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 8px 0;
    position: relative;
    transition: color var(--transition);
}

/* Animated underline on hover */
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition);
}

nav ul li a:hover::after,
nav ul li a.current::after {
    width: 100%;
}

nav ul li a.current {
    color: var(--gold);
}

nav ul li a:hover {
    color: var(--gold-hover);
}

/* ---------- Mobile Dropdown ---------- */
nav .dropdown {
    display: none;
    position: fixed;
    right: 20px;
    padding-right: 15px;
}

nav .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--slate);
    min-width: 150px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
}

nav .dropdown-content a {
    color: var(--white);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    transition: background var(--transition);
}

nav .dropdown-content a:hover {
    background-color: var(--navy);
}

nav .dropdown:hover .dropdown-content {
    display: block;
}

nav .dropbtn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition);
}

nav .dropbtn:hover {
    color: var(--gold);
}

/* ===================================================
   HERO SECTION
   =================================================== */
.hero {
    background: url('images/CrestoneHero.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    position: relative;
    margin-top: -80px;
    padding-top: 80px;
}

/* Dark gradient overlay for legibility */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 20, 57, 0.35) 0%,
        rgba(0, 0, 0, 0.15) 40%,
        rgba(0, 0, 0, 0.15) 60%,
        rgba(0, 20, 57, 0.5) 100%
    );
    z-index: 1;
}

.logo-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1s, transform 1s;
    width: 80%;
    max-width: none;
    height: auto;
    z-index: 2;
}

.logo-large.visible {
    opacity: 1;
    transform: translate(-50%, -60%);
}

.logo-large img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
}

/* Scroll-down indicator */
.hero::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 12px;
    z-index: 2;
}

@keyframes scrollPulse {
    0%   { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

.hero .scroll-indicator-dot {
    position: absolute;
    bottom: 46px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    z-index: 2;
    animation: scrollPulse 1.5s ease-in-out infinite;
}

/* ===================================================
   MAIN CONTENT
   =================================================== */
main {
    margin-top: 60px;
}

/* ===================================================
   ABOUT SECTION (Homepage)
   =================================================== */
.about {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: left;
    flex-wrap: wrap;
    background: var(--white);
}

.about img {
    border-radius: 50%;
    max-width: 250px;
    margin-right: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    transition: transform 0.4s ease;
}

.about img:hover {
    transform: scale(1.03);
}

.about-content {
    flex: 1;
    max-width: 600px;
}

.about-content h2 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: 10px;
}

.about-content p {
    margin-top: 10px;
    color: var(--text-body);
    line-height: 1.7;
}

/* ---------- CTA Link Styles ---------- */
.read-more,
.see-more,
.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 22px;
    border: 2px solid var(--navy);
    border-radius: 30px;
    margin-top: 20px;
    transition: all var(--transition);
    background: transparent;
}

.read-more:hover,
.see-more:hover,
.contact-button:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,20,57,0.25);
}

.read-more .arrow,
.see-more .arrow,
.contact-button .arrow {
    transition: transform var(--transition);
}

.read-more:hover .arrow,
.see-more:hover .arrow,
.contact-button:hover .arrow {
    transform: translateX(4px);
}

.see-more-container,
.contact-button-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* ===================================================
   EVENTS SECTION (Homepage)
   =================================================== */
.events {
    padding: 80px 20px;
    text-align: center;
    background: var(--bg-alt);
}

.events h2 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: 20px;
}

.events ul {
    padding: 0;
    list-style: none;
    max-width: 700px;
    margin: 0 auto;
}

.events ul li {
    padding: 15px 20px;
    margin-bottom: 12px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    text-align: left;
    line-height: 1.6;
}

/* ===================================================
   GALLERY PREVIEW (Homepage)
   =================================================== */
.gallery-preview {
    padding: 80px 20px;
    text-align: center;
    background: var(--white);
}

.gallery-preview h2 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: 20px;
}

/* ---------- Carousel ---------- */
.carousel-container {
    position: relative;
    max-width: 600px;
    margin: auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel img {
    width: 100%;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.45);
    color: white;
    border: none;
    font-size: 20px;
    padding: 12px 14px;
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--transition);
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.75);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

/* ===================================================
   CONTACT SECTION (Homepage)
   =================================================== */
.contact {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-alt);
}

.contact h2 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 2rem;
    margin-bottom: 10px;
}

.contact p {
    margin-top: 10px;
    color: var(--text-body);
}

/* ===================================================
   FADE-IN SCROLL ANIMATION
   =================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   FOOTER
   =================================================== */
footer {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 40px 0 30px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.footer-logo img {
    width: 80px;
    height: auto;
    opacity: 0.8;
}

.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 30px;
}

.footer-nav li {
    margin: 0;
}

.footer-nav li a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color var(--transition);
}

.footer-nav li a:hover,
.footer-nav li a.current {
    color: var(--gold);
}

/* ---------- Social Media Icons (Footer) ---------- */
.social-media-container {
    margin-bottom: 20px;
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.social-media {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    background: none !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.social-media a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background var(--transition), transform var(--transition);
    text-decoration: none;
}

.social-media a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.social-media a svg {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px;
    min-height: 22px;
    fill: #ffffff !important;
    display: block;
    transition: fill var(--transition);
}

.social-media a:hover svg {
    fill: var(--gold) !important;
}

/* Legacy support for img icons */
.social-media img {
    width: 22px;
    height: 22px;
    transition: transform var(--transition);
    filter: brightness(0) invert(1);
}

.social-media a:hover img {
    transform: scale(1.1);
}

/* ===================================================
   MOBILE RESPONSIVE
   =================================================== */
@media (max-width: 768px) {
    nav ul {
        display: none;
    }

    nav .dropdown {
        display: block;
    }

    .hero h1 {
        font-size: 2em;
    }

    .about {
        padding: 50px 20px;
        flex-direction: column;
        text-align: center;
    }

    .about img {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .about-content h2 {
        font-size: 1.6rem;
    }

    .events, .gallery-preview, .contact {
        padding: 50px 20px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .footer-nav {
        margin-top: 10px;
        gap: 15px;
        flex-wrap: wrap;
    }
}

/* ===================================================
   ABOUT PAGE
   =================================================== */
body.about-page {
    background: url('images/CrestoneHero.jpg') no-repeat center center fixed;
    background-color: #333;
    background-size: cover;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    height: 100vh;
    transition: background-position 1s ease-out, background-size 1s ease-out;
}

.about-section {
    position: relative;
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
}

header.about-page {
    padding: 5px 20px;
    background: linear-gradient(to right, var(--navy-90) 50%, var(--slate-90) 100%);
}

header .logo-small {
    display: flex;
    align-items: center;
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s, visibility 0.5s;
}

header .logo-small img {
    width: 100px;
    height: auto;
    margin-right: 10px;
}

/* ---------- Floating Content Boxes ---------- */
.floating-content-box {
    position: fixed;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 30px;
    border-radius: 16px;
    color: var(--white);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    opacity: 0;
    font-size: 1.3em;
    line-height: 1.6;
}

.floating-content-box.left {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 800px;
    width: 80%;
    text-align: center;
}

.floating-content-box.right {
    top: 0;
    right: 0;
    height: 100%;
    width: 50%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.9) 50%, rgba(0, 0, 0, 0.05) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transform: translateY(20px);
    padding: 40px 30px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.floating-content-box.left-side {
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 50%, rgba(0, 0, 0, 0.05) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transform: translateY(20px);
    padding: 40px 30px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.floating-content-box h1 {
    font-family: var(--font-heading);
    font-size: 2.2em;
    margin-bottom: 10px;
}

.floating-content-box .subheading {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--gold);
    margin-top: -10px;
    font-size: 1.1em;
}

.floating-content-box p {
    margin-bottom: 12px;
    line-height: 1.7;
}

.floating-content-box.visible {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
}

.floating-content-box.hidden {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-20px);
}

.floating-content-box.right.visible {
    transform: translateY(0);
}

.floating-content-box.right.hidden {
    transform: translateY(-20px);
}

.floating-content-box.left-side.visible {
    transform: translateY(0);
}

.floating-content-box.left-side.hidden {
    transform: translateY(-20px);
}

/* ---------- Floating Scroll Indicator ---------- */
.floating-indicator {
    position: fixed;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: var(--white);
    font-size: 1.2em;
    transition: opacity 1s ease-in-out;
    opacity: 0;
    z-index: 10;
}

.floating-indicator.visible {
    opacity: 1;
}

.floating-indicator p {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    padding: 10px 20px;
    border-radius: 30px;
    display: inline-block;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* About page mobile */
@media (max-width: 768px) {
    .floating-content-box {
        font-size: 0.9em;
    }

    .floating-content-box p {
        margin-bottom: 10px;
    }

    .floating-content-box.right,
    .floating-content-box.left-side {
        width: 100%;
        padding: 20px;
    }
}

/* ===================================================
   EVENTS PAGE
   =================================================== */
.events-page main {
    padding: 20px;
    background-color: var(--white);
    min-height: calc(100vh - 140px);
}

.events-section {
    max-width: 800px;
    margin: 0 auto;
}

.events-section h1 {
    font-family: var(--font-heading);
    color: var(--navy);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2rem;
}

.event {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 20px;
    background-color: var(--bg-light);
    transition: box-shadow var(--transition), transform var(--transition);
}

.event:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.event h2 {
    font-family: var(--font-heading);
    color: var(--navy);
    margin-bottom: 8px;
}

.event p {
    margin: 5px 0;
    color: var(--text-body);
}

.event a {
    display: inline-block;
    margin-top: 10px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition);
}

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

/* Empty events state */
.events-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-body);
}

.events-empty p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* ===================================================
   CONTACT PAGE
   =================================================== */
.contact-page main {
    padding: 20px;
    background-color: var(--white);
    min-height: calc(100vh - 140px);
}

.contact-section {
    max-width: 800px;
    margin: 0 auto;
}

.contact-section h1 {
    font-family: var(--font-heading);
    color: var(--navy);
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.contact-info {
    margin-bottom: 30px;
    text-align: center;
    color: var(--text-body);
    line-height: 1.7;
}

.contact-info p {
    margin: 10px 0;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

#contact-form label {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.95rem;
}

#contact-form input,
#contact-form textarea {
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: var(--font-body);
    transition: border-color var(--transition), box-shadow var(--transition);
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0, 20, 57, 0.1);
}

#contact-form button {
    align-self: flex-start;
    padding: 12px 28px;
    background-color: var(--navy);
    color: var(--white);
    border: 2px solid var(--navy);
    border-radius: 30px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all var(--transition);
}

#contact-form button:hover {
    background-color: transparent;
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,20,57,0.15);
}

@media (max-width: 768px) {
    .contact-page main {
        padding: 10px;
    }

    .contact-section {
        width: 100%;
    }

    .form-group {
        width: 100%;
    }

    #contact-form button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ===================================================
   GALLERY PAGE
   =================================================== */
.gallery-page main {
    padding: 20px;
    background-color: var(--white);
    min-height: calc(100vh - 140px);
}

.video-gallery, .photo-gallery {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.video-gallery h1, .photo-gallery h1 {
    font-family: var(--font-heading);
    color: var(--navy);
    margin-bottom: 25px;
    font-size: 2.2rem;
}

#video-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

#video-gallery iframe {
    width: 100%;
    max-width: 400px;
    height: 250px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

#photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 10px;
}

#photo-gallery img {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    transition: transform var(--transition), box-shadow var(--transition);
    object-fit: cover;
    cursor: pointer;
}

#photo-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ===================================================
   SUB-PAGE HEADER (Events, Gallery, Contact)
   =================================================== */
header.events-page,
header.gallery-page,
header.contact-page {
    padding: 5px 20px;
    background: linear-gradient(to right, var(--navy-90) 50%, var(--slate-90) 100%);
}

/* Sub-page logo always visible */
.logo-small.always-visible {
    visibility: visible !important;
    opacity: 1 !important;
}