:root {
    --brand-teal: #4d9aa0;
    --brand-purple: #7b68b8;
    --text-dark: #212529;
}

body {
    color: var(--text-dark) !important;
    font-family: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.hero-section {
    background-size: cover;
    background-position: center;
    background-color: #4d9aa0;
    padding: 150px 0;
    color: white;
    text-align: center;
    position: relative;
}

.hero-section h1 {
    color: white;
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* Option Label */
.option-label {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin-bottom: 1rem !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Option 1: Dark Overlay */
.hero-option-1 {
    position: relative;
}

.hero-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-option-1 .container {
    position: relative;
    z-index: 2;
}

/* Option 2: Text Background Box */
.hero-text-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hero-option-2 h1 {
    color: var(--text-dark) !important;
}

.hero-option-2 .lead {
    color: var(--text-dark) !important;
}

.hero-option-2 .option-label {
    color: var(--brand-teal) !important;
}

/* Option 3: Enhanced Text Shadow with Subtle Overlay */
.hero-option-3 {
    position: relative;
}

.hero-overlay-subtle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.hero-option-3 .container {
    position: relative;
    z-index: 2;
}

.hero-option-3 h1 {
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8),
                 0 0 20px rgba(0, 0, 0, 0.5),
                 2px 2px 5px rgba(0, 0, 0, 0.9);
}

.hero-option-3 .lead {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(0, 0, 0, 0.5),
                 1px 1px 3px rgba(0, 0, 0, 0.9);
    color: white !important;
}

.hero-option-3 .btn-outline-light {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    border-width: 2px;
}

.section {
    padding: 80px 0;
}

.section-title {
    color: var(--text-dark) !important;
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 3rem;
    text-align: center;
}

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rooms-section .card {
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
    height: 250px;
    object-fit: cover;
}

.card-title {
    color: var(--text-dark) !important;
}

.card-text {
    color: var(--text-dark) !important;
}

.btn-primary {
    background-color: var(--brand-teal);
    border-color: var(--brand-teal);
    color: white;
}

.btn-primary:hover {
    background-color: #3d7a7f;
    border-color: #3d7a7f;
}

.navbar {
    background: linear-gradient(to right, var(--brand-teal), var(--brand-purple));
    padding: 1rem 0;
}

.navbar-brand,
.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
}

.navbar-nav .nav-link:hover {
    color: var(--brand-purple) !important;
}

/* Dropdown hover behavior */
.navbar-nav .dropdown:hover > .dropdown-menu {
    display: block;
}

.navbar-nav .dropdown > .dropdown-toggle:active {
    pointer-events: none;
}

.dropdown-menu {
    margin-top: 0;
}

.dropdown-item:hover {
    background-color: var(--brand-teal);
    color: white;
}

footer {
    background-color: var(--brand-purple);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

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

footer a:hover {
    color: white;
}

.about-section,
.contact-section,
.past-retreats-section {
    background-color: #f8f9fa;
}

.contact-section .card {
    background-color: white;
}

.leader-image {
    width: 100%;
    max-width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.retreat-hero {
    background-size: cover;
    background-position: center;
    background-color: var(--brand-teal);
    padding: 200px 0 150px;
    color: white;
    text-align: center;
    position: relative;
}

.retreat-hero .hero-overlay-subtle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 1;
}

.retreat-hero .container {
    position: relative;
    z-index: 2;
}

.retreat-hero h1 {
    color: white;
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8),
                 0 0 20px rgba(0, 0, 0, 0.5),
                 2px 2px 5px rgba(0, 0, 0, 0.9);
}

.retreat-hero .subtitle {
    color: white !important;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(0, 0, 0, 0.5),
                 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.hero-when-where {
    color: white;
}

.hero-when-where .when-where-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(0, 0, 0, 0.5),
                 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.hero-when-where p {
    color: white !important;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(0, 0, 0, 0.5),
                 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.hero-when-where a {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8),
                 0 0 15px rgba(0, 0, 0, 0.5),
                 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.leaders-section {
    padding: 60px 0;
}

.leader-card {
    text-align: center;
    margin-bottom: 2rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.leader-card:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}

.leader-card h4 {
    color: var(--text-dark) !important;
    margin-top: 1rem;
}

p, li {
    color: var(--text-dark) !important;
}

h2, h3, h4, h5, h6 {
    color: var(--text-dark) !important;
}

/* Gallery Styles */
.gallery-placeholder {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery Mobile Collapse */
.gallery-toggle-btn {
    display: none; /* Hidden on desktop by default */
}

/* Hide additional images on mobile by default */
@media (max-width: 767.98px) {
    .gallery-item-hidden-mobile {
        display: none;
    }
    
    .gallery-expanded .gallery-item-hidden-mobile {
        display: block; /* Restore default display when expanded */
    }
    
    .gallery-toggle-btn {
        display: inline-block; /* Show button on mobile */
    }
}

/* Form Styles */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 0.25rem rgba(77, 154, 160, 0.25);
}

.text-danger {
    color: #dc3545 !important;
}

/* Spinner styles for form submissions */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Morocco Page - Section Color Differentiation */
.when-where-section {
    background-color: rgba(77, 154, 160, 0.08); /* Subtle teal tint */
}

.when-where-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.when-where-label {
    color: var(--brand-teal);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.description-section {
    background-color: white;
}

.section-alt {
    background-color: rgba(123, 104, 184, 0.06); /* Subtle purple tint */
}

.included-section {
    background-color: rgba(77, 154, 160, 0.05); /* Very subtle teal */
}

.gallery-section {
    background-color: rgba(123, 104, 184, 0.06); /* Subtle purple tint */
}

.rooms-section {
    background-color: white;
}

.signup-section {
    background-color: rgba(123, 104, 184, 0.06); /* Subtle purple tint */
}

.signup-section .card {
    background-color: white;
}

/* FAQ Section */
.faq-section {
    background-color: white;
}

.accordion-button {
    color: var(--text-dark);
    font-weight: 500;
    background-color: white;
}

.accordion-button:not(.collapsed) {
    color: var(--brand-teal);
    background-color: rgba(77, 154, 160, 0.08);
    box-shadow: none;
}

.accordion-button:focus {
    border-color: var(--brand-teal);
    box-shadow: 0 0 0 0.25rem rgba(77, 154, 160, 0.25);
}

.accordion-item {
    border: 1px solid rgba(0, 0, 0, 0.125);
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    overflow: hidden;
}

.accordion-body {
    color: var(--text-dark);
    line-height: 1.7;
}

.accordion-body ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.accordion-body a {
    color: var(--brand-teal);
    text-decoration: underline;
}

.accordion-body a:hover {
    color: #3d7a7f;
}

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

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
}

.gallery-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 2.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.gallery-lightbox-close span {
    line-height: 1;
    font-weight: 300;
}

.gallery-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
    user-select: none;
}

.gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-prev {
    left: 30px;
}

.gallery-lightbox-next {
    right: 30px;
}

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

.gallery-image {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .gallery-lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 2rem;
    }
    
    .gallery-lightbox-prev {
        left: 15px;
    }
    
    .gallery-lightbox-next {
        right: 15px;
    }
    
    .gallery-lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .gallery-lightbox-img {
        max-height: calc(100vh - 100px);
    }
}

/* Leader Bio Modal Styles */
#leaderBioModal .modal-header {
    background-color: var(--brand-teal);
    color: white;
    border-bottom: none;
}

#leaderBioModal .modal-title {
    color: white;
    font-weight: 600;
    text-align: center;
    width: 100%;
    margin-right: 2rem; /* Space for close button */
}

#leaderBioModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.9;
}

#leaderBioModal .btn-close:hover {
    opacity: 1;
}

#leaderBioModal .modal-body {
    text-align: center;
    padding: 2rem;
    background-color: #fff;
}

#leaderBioModal .modal-body p {
    text-align: center;
    white-space: pre-line;
    line-height: 1.8;
    color: var(--text-dark);
    margin: 0;
}

#leaderBioModal .modal-footer {
    background-color: var(--brand-purple);
    border-top: none;
    justify-content: center;
    padding: 1rem;
}

#leaderBioModal .modal-footer .btn {
    background-color: white;
    color: var(--brand-purple);
    border-color: white;
    font-weight: 500;
}

#leaderBioModal .modal-footer .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    color: var(--brand-purple);
}
