/* Agave Website Custom CSS Framework */

:root {
    /* Agave Color Scheme */
    --primary-color: #22577E;        /* Dark blue - main brand color */
    --secondary-color: #5584AC;      /* Medium blue - accent color */
    --accent-color: #95D1CC;         /* Light teal - highlight color */
    --background-light: #F6F2D4;     /* Cream - page background */
    --header-dark: #0E2839;          /* Very dark blue-black - header */
    --text-dark: #22577E;            /* Primary text */
    --text-light: #5584AC;           /* Secondary text */
    --text-muted: #95D1CC;           /* Muted text */
    --background-dark: #22577E;      /* Dark sections */
    --shadow-soft: rgba(34, 87, 126, 0.1);
    --shadow-medium: rgba(34, 87, 126, 0.2);
    --shadow-strong: rgba(34, 87, 126, 0.3);
    --transition-smooth: all 0.3s ease;

    /* Additional Agave variations */
    --primary-light: rgba(34, 87, 126, 0.1);
    --secondary-light: rgba(85, 132, 172, 0.1);
    --accent-light: rgba(149, 209, 204, 0.1);
}

/* Global Styles */
body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Bebas Neue', sans-serif;
    color: var(--header-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Header Styles */
.navbar {
    background-color: var(--header-dark) !important;
    padding: 1rem 0;
    box-shadow: 0 4px 6px var(--shadow-soft);
    z-index: 9999 !important;
    position: sticky !important;
    top: 0 !important;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: white !important;
}

.navbar-nav .nav-link {
    color: #dfdfdf !important;
    font-weight: 500;
    margin: 0 2px;
    padding-left: 20px !important;
    padding-right: 20px !important;
    border-radius: 6px;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-color) !important;
    background-color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Dropdown Menu Styles */
.navbar-nav .dropdown-menu {
    background-color: var(--primary-color) !important;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-medium);
    margin-top: 0.5rem;
    z-index: 99999 !important;
    opacity: 1 !important;
    position: absolute !important;
}

.navbar-nav .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-smooth);
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus,
.navbar-nav .dropdown-item.active {
    background-color: var(--accent-color);
    color: var(--header-dark) !important;
}

.navbar-nav .dropdown-toggle:after {
    color: var(--accent-color);
}

/* Logo sizing */
.navbar-brand img {
    max-width: 220px; /* Default for medium and above */
    height: auto;
    border-radius: 8px;
}

.footer-logo {
    height: auto;
    width: auto;
    max-width: 150px;
    opacity: 0.8;
}

.footer .footer-logo-large {
    padding: 20px;
    background-color: #0E2839;
    border-radius: 1.5rem;
    height: auto;
    width: 200px;
    max-width: 200px;
    opacity: 0.9;
}

.footer img {
    min-width: 260px;
}

/* Mobile phones and below */
@media (max-width: 767px) {
    .navbar-brand img {
        max-width: 180px;
    }
}

/* Hero Section */
.hero-section {
    background: rgba(5, 14, 20, 0.8);
    color: white;
    padding: 6rem 0;
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-top: 0;
}

/* Hero Section Mobile Padding Overrides */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0 !important; /* 50% reduction for tablets */
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0 !important; /* Further reduction for phones */
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle,
.hero-subtitle2,
.hero-subtitle3 {
    font-size: 1.3rem;
    margin-bottom: 0px;
    color: white !important;
    opacity: 0.9;
}

/* Hero subtitle container with spacing and positioning */
.hero-subtitle-container {
    margin-bottom: 2rem;
    position: relative;
    min-height: 2.5em; /* Default minimum, will be overridden by JavaScript for rotating mode */
}

/* Specific handling for rotating subtitle containers */
.hero-subtitle-container:has(.hero-subtitle-rotating) {
    min-height: 4em; /* Fallback for longer rotating subtitles if JavaScript fails */
}

/* Stacked subtitle spacing */
.hero-subtitle-container p:not(.hero-subtitle-rotating) {
    margin-bottom: 20px;
}

.hero-subtitle-container p:last-child:not(.hero-subtitle-rotating) {
    margin-bottom: 0;
}

/* Rotating subtitle styles */
.hero-subtitle-rotating {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    margin-bottom: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero-subtitle-rotating.active {
    opacity: 1;
}

/* Ensure rotating subtitles don't overflow on smaller screens */
@media (max-width: 768px) {
    .hero-subtitle-rotating {
        font-size: 1.1rem;
        line-height: 1.4;
    }
}

@media (max-width: 576px) {
    .hero-subtitle-rotating {
        font-size: 1rem;
        line-height: 1.3;
    }
}

/* Title drop shadow */
.hero-title.drop-shadow {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
}

/* Hero Buttons Container - Bootstrap Grid (handled in PHP) */
.hero-buttons.row {
    margin: 0 auto;
    max-width: 1000px; /* Allow more space for proper side-by-side layout */
}

/* Ensure hero button cards have proper responsive sizing */
.hero-button-card {
    max-width: 100% !important; /* Prevent overflow in Bootstrap columns */
}

/* Desktop spacing adjustments */
@media (min-width: 992px) {
    .hero-buttons.row {
        max-width: 800px; /* Optimal width for desktop */
    }
    
    .hero-button-card {
        min-width: 300px; /* Ensure buttons aren't too narrow on wide screens */
        max-width: 400px; /* Prevent buttons from getting too wide */
    }
}

/* Hero CTA Button Cards - Children of Bootstrap Columns */
.hero-button-card {
    display: block;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1 / 1 !important;
    width: 100%; /* Fill the column */
    min-height: 250px; /* Minimum height for small screens */
}

/* Center single card */
.hero-buttons .col-12 .hero-button-card {
    max-width: 400px; /* Max width for single card */
    margin: 0 auto; /* Center the single card */
}

/* Single Card Layout - Full width container with flexbox */
.hero-buttons-single {
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-button-single {
    width: 600px; /* Minimum 600px as requested */
    max-width: 90vw; /* Responsive max width */
}

@media (max-width: 768px) {
    .hero-button-single {
        width: 400px;
        max-width: 85vw;
    }
}

@media (max-width: 576px) {
    .hero-button-single {
        width: 300px;
        max-width: 80vw;
    }
}

@media (max-width: 320px) {
    .hero-button-single {
        width: 250px;
        max-width: 75vw;
    }
}

/* CSS Grid system for hero buttons - Two card layout only */
.hero-buttons.row {
    display: grid !important;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

/* Two cards: responsive layout */
.hero-buttons.row:has(.col-6) {
    grid-template-columns: 1fr; /* Stacked on mobile */
}

@media (min-width: 768px) {
    .hero-buttons.row:has(.col-6) {
        grid-template-columns: 1fr 1fr; /* Two columns from 768px+ */
        gap: 2rem;
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Override Bootstrap column behavior when using grid */
.hero-button-column.col-6,
.hero-buttons .col-12 {
    flex: none !important;
    max-width: none !important;
    width: auto !important;
}

/* Ensure no pseudo-elements on parent */
.hero-button-card::before,
.hero-button-card::after {
    display: none !important;
}

.hero-button-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Child div positioned at bottom with overlay - full width */
.hero-button-card .button-content {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 2;
    padding: 0.75rem 1.5rem 1rem 1.5rem;
    text-align: center;
    color: white;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 30%, rgba(0, 0, 0, 0.85) 100%);
    border-radius: 0 0 12px 12px;
}

.hero-button-card .button-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.hero-button-card .button-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    line-height: 1.3;
}

/* Mobile adjustments for 200x200px buttons */
@media (max-width: 576px) {
    .hero-button-card .button-content {
        bottom: 0 !important;
        padding: 0.5rem 1rem 0.75rem 1rem !important;
        background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.9) 100%) !important;
        border-radius: 0 0 12px 12px;
    }
    
    .hero-button-card .button-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .hero-button-card .button-subtitle {
        font-size: 0.8rem;
    }
}

/* Remove parent overlay - no overlay on the parent div */

/* Standard Button Styling for Hero */
.hero-buttons .btn {
    margin: 0;
}

/* Single button centering - when only one button is enabled */
.hero-buttons:has(.hero-button-card:only-child) {
    justify-content: center;
}

/* Mobile responsive sizing - Bootstrap handles layout */
@media (max-width: 575px) {
    .hero-button-card {
        min-height: 200px; /* Smaller height for phones */
        margin: 0 auto; /* Center when stacked */
        max-width: 300px; /* Reasonable max width on small screens */
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .hero-button-card {
        min-height: 300px; /* Medium height for tablets in stacked mode */
        margin: 0 auto; /* Center when stacked */
        max-width: 400px; /* Reasonable max width on medium screens */
    }
}

@media (min-width: 768px) {
    .hero-button-card {
        min-height: 300px; /* Consistent height for side-by-side layout */
    }
}

/* Hero Lines (Static) */
.hero-lines {
    display: none; /* Animation removed */
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-medium);
}

.btn-outline-primary {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.btn-outline-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-medium);
}

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

.section .content-section {
    color: var(--header-dark);
}

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

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

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

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-soft);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer h5 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

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

/* Contact Form */
.form-control {
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    padding: 0.75rem;
    transition: var(--transition-smooth);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-light);
}

.form-label {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Utility Classes */
.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

/* Responsive Design - Additional Mobile Styles */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-outline-primary {
        padding: 0.6rem 1.5rem;
    }
}

/* Animation Classes - Only for cards, not sections */
.card.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Ensure sections always visible */
.section {
    opacity: 1 !important;
    transform: none !important;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom PayPal Donate Button */
.paypalBtn select{font-family: 'Montserrat', sans-serif !important; font-size: 12px !important; background-color: #95D1CC !important;color:#22577E !important;padding: 4px !important;border-radius: 8px !important;margin-bottom: 10px !important;
    border:none !important;max-width: 255px !important;}

.paypal-donate-form {
    display: inline-block;
    margin: 1rem 0;
}

.paypal-donate-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 12px 24px;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px var(--shadow-soft);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.paypal-donate-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.paypal-donate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--shadow-medium);
}

.paypal-donate-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.paypal-donate-btn:hover::before {
    animation: shine 0.6s ease-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.paypal-donate-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .paypal-donate-btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .paypal-donate-icon {
        width: 20px;
        height: 20px;
    }
}

/* ======================================
   PERFORMANCES PAGE SPECIFIC STYLES
   ====================================== */

/* Performance page year section styling */
.performances-page .year-header:hover {
    background-color: rgba(149, 209, 204, 0.3) !important;
}

.performances-page .year-chevron {
    margin-right: 8px;
    transition: transform 0.2s ease;
    color: var(--primary-color);
}

.performances-page .year-section {
    border-left: 3px solid var(--accent-color);
    margin-left: 10px;
}

.performances-page .year-section:hover {
    border-left-color: var(--primary-color);
}

/* Performance page list items */
.performances-page .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.75) !important;
    transition: background-color 0.3s ease;
}

.performances-page .list-group-item {
    border-color: rgba(149, 209, 204, 0.3);
    background-color: transparent !important;
}

/* Performance page buttons */
.performances-page .btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px var(--shadow-medium) !important;
    transition: all 0.3s ease !important;
}

/* Performance page button hover - now all buttons have same style */
.performances-page .btn[style*="background-color: #22577E"]:hover {
    background-color: #1a4564 !important;
    border-color: #1a4564 !important;
    color: white !important;
}

/* Performance page cards */
.performances-page .card {
    box-shadow: 0 4px 12px var(--shadow-soft);
    border-radius: 10px;
}

/* Performance page badges */
.performances-page .badge {
    border-radius: 15px;
    font-weight: 500;
}

/* Performance page upcoming section */
.performances-page .upcoming-performances {
    /* Specific upcoming styles if needed */
}

/* Performance page past section */
.performances-page .past-performances {
    /* Specific past performance styles if needed */
}

/* ======================================
   NAVBAR RESPONSIVE BREAKPOINT OVERRIDES
   ====================================== */

/* Custom navbar behavior - collapse at 1024px */
.navbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.navbar .container-fluid {
  display: flex !important;
  flex-wrap: inherit !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
}

@media (max-width: 1024px) {
  .navbar-collapse {
    display: none !important;
  }
  .navbar-collapse.show {
    display: block !important;
  }
  .navbar-toggler {
    display: block !important;
  }
  .navbar-nav {
    flex-direction: column !important;
  }
  .navbar-nav .dropdown-menu {
    position: static !important;
    float: none !important;
    width: 100% !important;
    margin-top: 0 !important;
    box-shadow: none !important;
  }
}

@media (min-width: 1025px) {
  .navbar-collapse {
    display: flex !important;
    flex-basis: auto !important;
    flex-grow: 1 !important;
    align-items: center !important;
  }
  .navbar-toggler {
    display: none !important;
  }
  .navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    margin-left: auto !important;
    align-items: center !important;
  }
  .navbar-brand {
    margin-right: auto !important;
  }
}

/* Lazy Loading Images */
img {
    loading: lazy;
}

/* Fade in animation for lazy loaded images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Main Content Fade Up Animation */
main {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

main.fadeInUp {
    opacity: 1;
    transform: translateY(0);
}

/* Footer Quick Links - Newspaper Style Columns */
.footer-quick-links {
    column-count: 1; /* Single column on mobile */
    max-width: 400px; /* Limit width for single column */
    margin: 0 auto; /* Center the links */
}

/* Tablet and above - 3 columns */
@media (min-width: 768px) {
    .footer-quick-links {
        column-count: 3;
        column-gap: 2rem;
        column-rule: none;
        max-width: 750px; /* Adjust for 3 columns */
    }
    
    .footer-quick-links li {
        break-inside: avoid;
        page-break-inside: avoid;
        text-align: left; /* Left align within columns for better readability */
    }
}

/* Large screens - expand width and gap */
@media (min-width: 992px) {
    .footer-quick-links {
        max-width: 900px;
        column-gap: 3rem;
    }
}

/* Hero Button Cards - Smart Bootstrap Grid Layout (handled in PHP) */
