/* === 1. Variables & Global Styles === */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&family=Lato:wght@300;400;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
    --primary-deep: #5D1A2A;      /* Rich Burgundy */
    --primary-accent: #D4AF37;   /* Classic Gold */
    --dark-text: #2c2c2c;         /* Dark Charcoal for text */
    --light-bg: #fffaf0;         /* Soft Cream / Floral White */
    --light-text: #f5f5f5;        /* Warm Off-White for dark backgrounds */
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    padding-top: 80px; /* Adjust for taller navbar */
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-deep);
}

.main-content {
    min-height: calc(100vh - 80px - 250px); /* Adjust for new navbar height */
}

/* Custom Button Styling */
.btn-gold {
    background-color: var(--primary-accent);
    color: var(--primary-deep);
    border: 2px solid var(--primary-accent);
    padding: 10px 30px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: var(--primary-deep);
    color: var(--light-text);
    border-color: var(--primary-deep);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(93, 26, 42, 0.2);
}

/* === 2. Navbar === */
.navbar-custom {
    background-color: var(--primary-deep);
    /*padding-top: 15px;
    padding-bottom: 15px;*/
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--primary-accent);
}

.navbar-custom .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--light-text);
}

.navbar-custom .nav-link {
    color: rgba(245, 245, 245, 0.75);
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0 15px;
    position: relative;
    letter-spacing: 1.5px;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--light-text);
}

/* Underline effect for nav links */
.navbar-custom .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: var(--primary-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
}

.navbar-custom .nav-link:hover::after,
.navbar-custom .nav-link.active::after {
    transform: scaleX(1);
}

/* === 3. Hero Section - Owl Carousel === */
.hero-section-container {
    height: 75vh;
    position: relative;
    color: var(--light-text);
    background-color: #000;
}

.hero-carousel .hero-slide {
    height: 75vh;
    width: 100%;
    position: relative;
    overflow: hidden; /* Hide anything that spills out */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide .hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* This is the magic property. It behaves just like background-size: cover. */
    object-fit: cover; 
    
    /* This lets you control the focal point, e.g., 'center top' or '25% 50%' */
    object-position: center center; 
    
    z-index: 1; /* Bottom layer */
}

.hero-slide .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /*background: linear-gradient(to top, rgba(93, 26, 42, 0.6), rgba(93, 26, 42, 0.4));*/
    z-index: 2; /* Sits on top of the image */
}

/* Dark overlay for readability */
.hero-carousel .hero-slide::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(93, 26, 42, 0.8), rgba(93, 26, 42, 0.5));
}

.hero-carousel .hero-content {
    position: relative;
    z-index: 3; /* Sits on top of the overlay */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    max-width: 800px;
    padding: 0 20px;
    right: 200px;
}

.hero-carousel .hero-content h1 {
    font-size: 4rem;
    color: var(--primary-accent);
    font-weight: 700;
}

.hero-carousel .hero-content p {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    /*color: var(--primary-accent);*/
}

/* Owl Carousel Navigation/Dots Styling */
.hero-carousel .owl-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-carousel .owl-dots .owl-dot span {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.hero-carousel .owl-dots .owl-dot.active span,
.hero-carousel .owl-dots .owl-dot:hover span {
    background: var(--primary-accent);
}

/* Add some animation */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.owl-item.active .animated-headline { animation: fadeInUp 0.8s ease 0.3s both; }
.owl-item.active .animated-subtext { animation: fadeInUp 0.8s ease 0.5s both; }
.owl-item.active .animated-button { animation: fadeInUp 0.8s ease 0.7s both; }

/* --- Additions for Owl Carousel Animations --- */
.owl-carousel .animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

.owl-carousel .owl-animated-in {
  z-index: 0;
}

.owl-carousel .owl-animated-out {
  z-index: 1;
}

.fadeOut {
  animation-name: fadeOut;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.fadeIn {
    animation-name: fadeIn;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* --- Styling for Custom Nav Arrows --- */
.hero-carousel .owl-nav {
    /* This removes the default margin that can push the container down */
    margin: 0;
}

.hero-carousel .owl-nav button.owl-prev,
.hero-carousel .owl-nav button.owl-next,
.tri-pane-carousel .owl-nav button.owl-prev,
.tri-pane-carousel .owl-nav button.owl-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;

    color: var(--primary-deep) !important; 
    font-size: 1.5rem !important;
    transition: all 0.3s ease !important;
    opacity: 0.8;
}

.hero-carousel .owl-nav button.owl-prev {
    left: 30px;
}

.hero-carousel .owl-nav button.owl-next {
    right: 30px;
}

/* Hover effect */
.hero-carousel .owl-nav button.owl-prev:hover,
.hero-carousel .owl-nav button.owl-next:hover,
.tri-pane-carousel .owl-nav button.owl-prev:hover,
.tri-pane-carousel .owl-nav button.owl-next:hover {
    background: var(--primary-accent) !important;
    color: var(--primary-deep) !important;
    opacity: 1;
    transform: translateY(-50%) scale(1.1); /* The Y transform is for owl's centering */
}

/* Ensure the arrows are on top of the dots if they overlap */
.hero-carousel .owl-nav {
    z-index: 10;
}

/* === 4. General Section Styling === */
.section {
    padding: 80px 0;
}

.section-bg {
    background-color: white;
}

.section-title {
    text-align: center;
    padding-bottom: 40px;
}

.section-title h2 {
    font-size: 3rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
    color: var(--primary-deep);
}

/* Decorative line under section titles */
.section-title h2::after {
    content: '';
    position: absolute;
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-accent);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    max-width: 600px;
    margin: 0 auto;
    color: #6c757d;
}

/* --- Elegant News Ticker Styling --- */
.news-ticker-wrapper {
    background: var(--primary-deep);
    color: var(--light-text);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important for border-radius */
}

.news-ticker-header {
    padding: 20px 25px;
    background-color: rgba(0, 0, 0, 0.2); /* Slightly darker than the main background */
    border-bottom: 3px solid var(--primary-accent);
}

.news-ticker-header h4 {
    color: var(--light-text);
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.1rem;
    margin: 0;
}

.news-ticker-content {
    padding: 10px 25px;
    flex-grow: 1; /* Allows this area to fill the remaining space */
    position: relative;
}

/* Inner shadow to give depth */
.news-ticker-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, var(--primary-deep) 0%, rgba(93, 26, 42, 0) 100%);
    z-index: 2;
    pointer-events: none; /* Allows clicks to go through the shadow */
}

#news-ticker {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 240px; /* MUST be row_height * max_rows from JS (80 * 3) */
    overflow: hidden; /* Crucial for the ticker effect */
}

#news-ticker li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#news-ticker li:last-child {
    border-bottom: none;
}

#news-ticker a {
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    padding: 10px;
    margin: 0 -10px; /* Extend clickable area */
    border-radius: 5px;
    color: var(--light-text);
}

#news-ticker a:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

#news-ticker .news-date {
    display: block;
    font-size: 0.8rem;
    color: var(--primary-accent); /* Gold color for the date */
    font-weight: bold;
    margin-bottom: 5px;
}

#news-ticker .news-title {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
    transition: color 0.3s ease;
}

#news-ticker a:hover .news-title {
    color: white;
}

/* === 5. Custom Cards === */
.feature-card {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.feature-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.feature-card .card-body {
    padding: 30px;
}

.feature-card .card-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.feature-card .card-text.date {
    font-size: 0.9rem;
    color: var(--primary-accent);
    font-weight: bold;
    margin-bottom: 10px;
}

/* === Facilities Section === */
/* --- Overlapping Facilities Slider Styling --- */
.facilities-slider-wrapper {
    position: relative;
    padding: 30px;
}

/* This is the card-like background behind the image */
.facilities-slider-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 85%;
    height: 90%;
    background-color: white;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 1;
}

.facilities-carousel {
    position: relative;
    z-index: 2; /* Ensure the slider is on top of the background element */
}

.facility-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden; /* Important for the border-radius on the image */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.facility-item img {
    display: block;
    width: 100%;
    height: 450px;
    object-fit: cover;
}

/* The text overlay panel */
.facilities-nav-custom .btn-nav, .btn-nav {
    border: 2px solid var(--primary-deep);
    color: var(--primary-deep);
}
.facilities-nav-custom .btn-nav:hover, .btn-nav:hover {
    background: var(--primary-deep);
    color: white;
}

.facility-item .facility-info {
    position: absolute;
    bottom: -100%; /* Start hidden below the card */
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(93, 26, 42, 0.95), rgba(93, 26, 42, 0.7));
    color: var(--light-text);
    padding: 25px;
    transition: bottom 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth slide-up transition */
}

/* On hover, the text panel slides up */
.facility-item:hover .facility-info {
    bottom: 0;
}

.facility-item .facility-info h3 {
    color: var(--primary-accent);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.facility-item .facility-info p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* --- Styling for unified control bars (Facilities, etc.) --- */

/* This new rule makes the container a flexbox */
.facilities-controls {
    display: flex;
    align-items: center;
}

/* We target the .btn-nav class directly now */
.btn-nav,
.gallery-story-controls .control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #888;
    font-size: 1.2rem;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.btn-nav:hover,
.gallery-story-controls .control-btn:hover {
    background: var(--primary-deep);
    border-color: var(--primary-deep);
    color: white;
    transform: scale(1.1);
}

/* === Affiliations Section === */
/* --- "Rich Burgundy & Brushed Gold" Affiliations Styling --- */
.tri-pane-section {
    background: #5D1A2A;
    background-image: radial-gradient(circle at top center, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 40%);
    position: relative;
    overflow: hidden;
}

/* --- Left "Brushed Gold" Information Pane --- */
.affiliation-info-pane {
    background-image: url('../img/brushed-gold-bg.jpg');
    background-size: cover;
    background-position: center center;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 25px 60px -15px rgba(0,0,0,0.4);
    height: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.2);
}

/* Adding a dark inner overlay to make text more readable on the texture */
.affiliation-info-pane::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}
.affiliation-info-pane > * {
    position: relative;
    z-index: 3;
}

/* Update text colors for high contrast on gold */
.tri-pane-section .section-title h2 {
    color: var(--primary-deep);
}
.affiliation-info-pane #active-affiliation-details {
    margin-top: 20px;
    min-height: 100px;
}
.affiliation-info-pane .affiliation-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-deep);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.2);
}
.affiliation-info-pane .affiliation-location {
    font-size: 1.1rem;
    color: #442029;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.affiliation-info-pane .tri-pane-controls {
    margin-top: auto;
    padding-top: 30px;
}

/* --- Right "Showcase Stage" and Carousel Styling --- */
.tri-pane-carousel-wrapper {
    perspective: 1500px;
    display: flex;
    align-items: center;
    height: 100%;
}

.tri-pane-carousel .owl-stage {
    perspective: inherit;
    transform-style: preserve-3d;
}

/* Logo Plaques */
.tri-pane-carousel .pane-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 250px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(0.85);
}
.tri-pane-carousel .pane-item img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.5s ease;
}

/* The "Spotlight" Effect for the Center Plaque */
.tri-pane-carousel .owl-item.center .pane-item {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.35), 0 0 40px rgba(255, 223, 150, 0.5);
}

.tri-pane-carousel .owl-item.center .pane-item img {
    filter: grayscale(0%);
    opacity: 1;
}

.tri-pane-carousel .owl-item.active-prev .pane-item { transform: scale(0.85) translateX(30%) rotateY(45deg); opacity: 0.6; }
.tri-pane-carousel .owl-item.active-next .pane-item { transform: scale(0.85) translateX(-30%) rotateY(-45deg); opacity: 0.6; }

/* --- Navigation Arrows and View All Button --- */
.tri-pane-controls .btn-reveal {
    background: var(--primary-deep);
    color: white;
}

/* Generic Owl Arrow Positioning */
.hero-carousel .owl-nav button.owl-prev,
.tri-pane-carousel .owl-nav button.owl-prev {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
}
.hero-carousel .owl-nav button.owl-next,
.tri-pane-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
}

/* === Gallery Section === */
/* --- Refined "Layered Story" Gallery Styling --- */
.layered-gallery-section {
    padding: 80px 0;
    background-color: #fdfdfd; /* A slightly off-white, clean base */
    background-image: url('../img/gallery-bg.webp'); 
    background-repeat: repeat;
    position: relative;
    overflow: hidden;
}

.gallery-story-frame {
    /* New elegant gradient background */
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(93, 26, 42, 0.05), 0 15px 50px rgba(93, 26, 42, 0.05);
    position: relative;
    z-index: 10;
    border-top: 4px solid var(--primary-accent); /* Gold accent on top */
}

.gallery-caption-display {
    /* Using our new script font for a personal touch */
    font-family: 'Dancing Script', cursive;
    color: #555;
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 25px;
    min-height: 80px; /* Reserve space to prevent layout jumps */
    border-left: none; /* Removing the old border */
    padding-left: 0;
    line-height: 1.3;
    position: relative;
    padding-bottom: 10px;
}

/* Add a subtle, decorative underline */
.gallery-caption-display::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-accent);
}

.gallery-story-controls {
    margin-top: 30px;
    display: flex;
    align-items: center;
}

/* --- Reveal-on-Hover "View All" Button Styling --- */

.btn-reveal {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-accent);
    color: var(--primary-deep);
    font-weight: bold;
    text-decoration: none;
    /* Initial state: a circle */
    width: 50px;
    height: 50px;
    border-radius: 50px; /* Pill shape, which looks like a circle when width/height are equal */
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.645, 0.045, 0.355, 1); /* Smooth expansion transition */
}

.btn-reveal:hover {
    width: 220px; /* Expanded width on hover */
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-3px);
    background: var(--primary-deep);
    color: white;
}

.btn-reveal .btn-reveal-text {
    /* Text is initially hidden and doesn't take up space */
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    transition: max-width 0.4s ease-out 0.1s, opacity 0.3s ease-in 0.1s; /* Delayed transition for text */
}

.btn-reveal:hover .btn-reveal-text {
    /* Reveal the text on hover */
    max-width: 150px;
    opacity: 1;
    color: white;
}

.btn-reveal .btn-reveal-icon {
    margin-left: 0; /* No margin initially */
    transition: margin-left 0.5s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.btn-reveal:hover .btn-reveal-icon {
    margin-left: 10px; /* Create space for the revealed text */
}

/* --- Animated "View All" Button for Gallery --- */

.btn-view-all-animated {
    margin-top: 40px; /* Provides spacing from the controls above it */
    padding: 12px 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px; /* The initial space between the text and the arrow */
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-view-all-animated i {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-view-all-animated:hover {
    gap: 15px; /* The space between text and arrow increases on hover */
    transform: translateY(-3px); /* The button lifts up slightly */
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3); /* A soft gold shadow appears */
}

.btn-view-all-animated:hover i {
    transform: translateX(5px); /* The arrow icon moves to the right */
}

/* The Photo Spread and its decorative elements */
.photo-spread-wrapper {
    position: relative;
    height: 500px;
    min-width: 100%;
}

.abstract-background-shape {
    position: absolute;
    top: -10%;
    right: -15%;
    width: 80%;
    z-index: 0;
    opacity: 0.1;
}
.abstract-background-shape img {
    width: 100%;
}

.photo-card {
    position: absolute;
    background-color: white;
    padding: 12px;
    border-radius: 4px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1); /* A much smoother, slower transition */
    transform-origin: center center;
}

/* Subtle "glare" effect on the photos */
.photo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.5s ease;
}
.photo-card:hover::before {
    opacity: 0;
}

/* Wrapper for Ken Burns effect */
.photo-image-inner-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.photo-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Initial state for Ken Burns */
    transform: scale(1.15);
    transition: transform 8s ease-out; /* Slow pan/zoom */
}

/* On hover, or when active, trigger the pan/zoom */
.photo-card:hover img {
    transform: scale(1);
}

/* Card positions and rotations for artistic feel */
.photo-card-1 {
    width: 65%;
    height: 85%;
    top: 0;
    left: 10%;
    z-index: 2;
    transform: rotate(-3deg);
}

.photo-card-2 {
    width: 50%;
    height: 65%;
    bottom: 0;
    right: 5%;
    z-index: 3;
    transform: rotate(2deg);
}

/* Hover effects for the cards themselves */
.photo-card:hover {
    transform: rotate(0deg) scale(1.05) !important; /* Override the base rotation and scale up */
    z-index: 4;
}

/* === 6. Footer === */
.footer-custom {
    background: var(--primary-deep); /* Rich Burgundy background */
    color: rgba(245, 245, 245, 0.75); /* Warm off-white for general text */
    font-size: 0.9rem; /* Match the general font size feel */
    border-top: 3px solid var(--primary-accent); /* Gold accent top border, mirroring the navbar */
}

.footer-custom h5 {
    font-family: 'Playfair Display', serif; /* Use the elegant heading font */
    color: var(--light-text); /* Make the headings a solid, bright off-white */
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

/* Decorative underline for footer headings */
.footer-custom h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-accent); /* Gold underline */
}

.footer-custom a {
    color: rgba(245, 245, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-custom a:hover {
    color: var(--primary-accent); /* Links turn gold on hover */
    padding-left: 5px; /* Subtle indent on hover for interactivity */
}

/* Styling for the copyright text area */
.footer-copyright {
    background-color: rgba(0, 0, 0, 0.2); /* A slightly darker bar for the copyright */
    padding: 15px 0;
    font-size: 0.85rem;
}
.footer-copyright a {
    font-weight: bold;
}

.footer-custom .list-inline-item a {
    font-size: 20px;
    color: rgba(245, 245, 255, 0.75);
}

.footer-custom .list-inline-item a:hover {
    color: var(--primary-accent);
    transform: translateY(-3px);
    display: inline-block;
}

/* ===================================================================
   STYLING FOR INDIVIDUAL PAGES
=================================================================== */

/* --- 1. General Page Header --- */
.page-header {
    padding: 120px 0;
    position: relative;
    text-align: center;
    background-size: cover;
    background-position: center;
    color: white;
}
.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(93, 26, 42, 0.7);
}
.page-header .container {
    position: relative;
    z-index: 2;
}
.page-header .page-title {
    color: white;
    font-size: 3.5rem;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

/* --- 2. About Us Page --- */
.about-image-wrapper {
    position: relative;
}
.about-content h2.h3 {
    margin-bottom: 20px;
}
.about-content .lead {
    line-height: 1.8;
}
.icon-box {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    transition: all 0.3s ease-in-out;
    height: 100%;
}
.icon-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.icon-box .icon {
    margin: 0 auto;
    width: 64px;
    height: 64px;
    background: var(--primary-accent);
    color: var(--primary-deep);
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
    transition: all 0.3s ease-in-out;
}
.icon-box:hover .icon {
    background: var(--primary-deep);
    color: var(--primary-accent);
}

/* --- 3. Facilities Page --- */
.facility-card {
    background: white;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    position: relative;
    transition: all 0.4s ease;
}
.facility-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(93, 26, 42, 0.15);
}
.facility-card .facility-card-img {
    height: 220px;
    overflow: hidden;
}
.facility-card .facility-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.facility-card:hover .facility-card-img img {
    transform: scale(1.1);
}
.facility-card .facility-card-body {
    padding: 25px;
}
.facility-card .facility-card-body h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}
.facility-card .facility-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(93, 26, 42, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    font-size: 3rem;
    color: var(--primary-accent);
}
.facility-card:hover .facility-card-overlay {
    opacity: 1;
}

/* --- 4. News & Events Page --- */
.event-list {
    position: relative;
}
.event-item {
    display: flex;
    gap: 30px;
    padding: 25px 0;
    border-bottom: 1px solid #e9ecef;
}
.event-item:last-child {
    border-bottom: none;
}
.event-date {
    background-color: var(--primary-deep);
    color: white;
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
}
.event-date span {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    display: block;
    color: var(--primary-accent);
}
.event-details h3 {
    margin-top: 0;
    margin-bottom: 10px;
}
.event-details p {
    color: #6c757d;
}

/* ===================================================================
   STYLING FOR AFFILIATIONS DIRECTORY PAGE
=================================================================== */

.affiliations-directory {
    background: #f4f6f9;
}

/* --- Filter Panel (Left Column) --- */
.filter-panel {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.07);
    position: sticky; /* Makes the panel stick on scroll */
    top: 100px;
}
.filter-panel h4 {
    color: var(--primary-deep);
    margin-bottom: 0;
}
.filter-panel hr {
    margin: 15px 0 25px 0;
}
.filter-panel .filter-group {
    margin-bottom: 25px;
}
.filter-panel .form-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
}
.filter-panel .form-control,
.filter-panel .form-select {
    border-color: #ddd;
}
.filter-panel .form-control:focus,
.filter-panel .form-select:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}
.filter-panel .form-check-input:checked {
    background-color: var(--primary-deep);
    border-color: var(--primary-deep);
}

/* --- Results Panel (Right Column) --- */
.results-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.07);
}
.results-header {
    padding: 15px 25px;
    border-bottom: 1px solid #eee;
    color: #6c757d;
}

.club-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.3s ease;
}
.club-list-item:last-child {
    border-bottom: none;
}
.club-list-item:hover {
    background-color: var(--light-bg);
}
.club-list-item .club-name {
    margin: 0 0 5px 0;
    font-family: 'Lato', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-deep);
}
.club-list-item .club-location {
    margin: 0;
    color: #6c757d;
}
.club-list-item .btn-details {
    background: transparent;
    border: 2px solid var(--primary-deep);
    color: var(--primary-deep);
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 50px;
    padding: 8px 20px;
    transition: all 0.3s ease;
}
.club-list-item:hover .btn-details {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: var(--primary-deep);
}

/* --- Details Modal Styling --- */
.club-modal-content {
    border-radius: 12px;
    border: none;
    background: #f8f9fa;
}
.club-modal-header {
    background: var(--primary-deep);
    color: white;
    padding: 20px 25px;
    border-bottom: 4px solid var(--primary-accent);
}
.club-modal-header .modal-title {
    font-family: 'Lato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}
.club-modal-body {
    padding: 40px;
}
.club-modal-body h2 {
    font-family: 'Lato', sans-serif;
}
.modal-details-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    font-size: 1.1rem;
}
.modal-details-list li i {
    font-size: 1.5rem;
    color: var(--primary-accent);
    margin-right: 20px;
    margin-top: 0;
    width: 25px;
    text-align: center;
}
.modal-details-list li strong {
    display: block;
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 0;
    /*text-transform: uppercase;*/
    letter-spacing: 0.5px;
}
.modal-details-list li span {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 0;
    margin-left: 5px;
    /*text-transform: uppercase;*/
}
.modal-details-list li span a {
    color: var(--primary-deep);
    font-weight: bold;
    text-decoration: none;
}
.modal-details-list li span a:hover {
    color: var(--primary-accent);
}

/* --- 5. Gallery Page (Masonry) --- */
.gallery-item-masonry {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
}
.gallery-item-masonry img {
    display: block;
    width: 100%;
    transition: transform 0.5s ease;
}
.gallery-item-masonry:hover img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(93, 26, 42, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.gallery-item-masonry:hover .gallery-overlay {
    opacity: 1;
}
.gallery-overlay-content {
    color: white;
    transform: translateY(20px);
    transition: transform 0.5s ease;
}
.gallery-item-masonry:hover .gallery-overlay-content {
    transform: translateY(0);
}
.gallery-overlay-content h5 {
    color: white;
    font-family: 'Playfair Display', serif;
    margin-bottom: 5px;
}
.gallery-overlay-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--primary-accent);
}

/* --- 7. Rules Page (Accordion) --- */
.custom-accordion .accordion-item {
    border: 1px solid #e9ecef;
    border-radius: 8px !important;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.custom-accordion .accordion-button {
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--primary-deep);
    background-color: white;
    box-shadow: none;
    border-radius: 8px !important;
}
.custom-accordion .accordion-button:not(.collapsed) {
    color: var(--primary-deep);
    background-color: var(--light-bg);
    box-shadow: inset 0 -1px 0 #e9ecef;
}
.custom-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}
.custom-accordion .accordion-body {
    background-color: white;
    border-radius: 8px;
    padding: 20px 25px;
}
.custom-accordion .accordion-body p:last-child {
    margin-bottom: 0;
}

/* --- 8. Contact Page --- */
.contact-section {
    background-color: var(--light-bg);
}
.contact-info-wrapper, .contact-form-wrapper {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
    height: 100%;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}
.contact-info-item .icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: var(--primary-accent);
    color: var(--primary-deep);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-right: 20px;
}
.contact-info-item h4 {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
}
.contact-info-item p {
    margin: 0;
    color: #6c757d;
}
.contact-form-wrapper .form-control {
    height: 45px;
    border-color: #ddd;
    border-radius: 4px;
}
.contact-form-wrapper textarea.form-control {
    height: auto;
}
.contact-form-wrapper .form-control:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
}
.map-section {
    padding: 0;
}

/* === 9. New Styles for Facilities & Facility Detail Pages === */

/* Updated Facility Card on facilities.php */
.facility-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.facility-card .facility-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(93, 26, 42, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.facility-card:hover .facility-card-overlay {
    opacity: 1;
}
.facility-card-overlay .overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.facility-card:hover .overlay-content {
    transform: translateY(0);
}

/* Facility Detail Page */
.facility-detail-section .facility-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.facility-detail-section .facility-content h1,
.facility-detail-section .facility-content h2,
.facility-detail-section .facility-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-deep);
}

.facility-detail-section .facility-content p {
    margin-bottom: 1.5rem;
}

.facility-detail-section .facility-content ul {
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

.facility-detail-section .facility-content ul li {
    margin-bottom: 0.5rem;
}

/* Sidebar Gallery on Detail Page */
.facility-gallery-sidebar {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: sticky;
    top: 120px;
}

.facility-gallery-sidebar h4 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-deep);
    border-bottom: 2px solid var(--primary-accent);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.facility-gallery-carousel .gallery-slide {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.facility-gallery-carousel .gallery-slide img {
    display: block;
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* Owl Carousel styling for this specific carousel */
.facility-gallery-carousel .owl-dots {
    margin-top: 15px;
}
.facility-gallery-carousel .owl-dots .owl-dot span {
    background: #ccc;
}
.facility-gallery-carousel .owl-dots .owl-dot.active span {
    background: var(--primary-accent);
}


/* --- 10. NEW STYLES FOR REDESIGNED ABOUT US PAGE --- */

/* Genesis Section */
.genesis-section .genesis-content h2.h1 {
    font-size: 3rem;
    line-height: 1.2;
}
.genesis-image-collage {
    position: relative;
    height: 450px;
}
.genesis-image-collage .image-c1,
.genesis-image-collage .image-c2 {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
    border: 8px solid white;
}
.genesis-image-collage .image-c1 {
    width: 70%;
    height: 70%;
    top: 0;
    left: 0;
    z-index: 1;
}
.genesis-image-collage .image-c2 {
    width: 60%;
    height: 60%;
    bottom: 0;
    right: 0;
    z-index: 2;
}
.genesis-image-collage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Story Timeline */
.story-timeline {
    position: relative;
    padding: 2em 0;
    margin-top: 2em;
}
.story-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 4px;
    background: #e9ecef;
    transform: translateX(-50%);
}
.timeline-item {
    position: relative;
    margin-bottom: 2em;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 40px;
    text-align: right;
}
.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 40px;
}
.timeline-item .timeline-icon {
    position: absolute;
    top: 15px;
    width: 50px;
    height: 50px;
    background: var(--primary-accent);
    color: var(--primary-deep);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1;
    border: 4px solid #e9ecef;
}
.timeline-item:nth-child(odd) .timeline-icon {
    right: -25px;
}
.timeline-item:nth-child(even) .timeline-icon {
    left: -25px;
}
.timeline-panel {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.07);
    position: relative;
}
/* Triangle arrow for panels */
.timeline-panel::after {
    content: '';
    position: absolute;
    top: 20px;
    border-style: solid;
    border-width: 10px;
}
.timeline-item:nth-child(odd) .timeline-panel::after {
    right: -20px;
    border-color: transparent transparent transparent white;
}
.timeline-item:nth-child(even) .timeline-panel::after {
    left: -20px;
    border-color: transparent white transparent transparent;
}
.timeline-title {
    color: var(--primary-deep);
    font-size: 1.4rem;
}
.timeline-body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .story-timeline::before { left: 25px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 0; }
    .timeline-item:nth-child(odd), .timeline-item:nth-child(even) { left: 0; text-align: left; }
    .timeline-item .timeline-icon { left: 0; }
    .timeline-item:nth-child(odd) .timeline-panel::after, .timeline-item:nth-child(even) .timeline-panel::after {
        left: -20px;
        border-color: transparent white transparent transparent;
    }
}

/* Pillars Section */
.pillar-card {
    background: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
}
.pillar-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(93, 26, 42, 0.1);
}
.pillar-card .pillar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 25px auto 0 auto;
    border: 4px solid var(--primary-accent);
}
.pillar-card .pillar-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pillar-card .pillar-info {
    padding: 20px;
}
.pillar-card .pillar-info h4 {
    font-size: 1.3rem;
    color: var(--primary-deep);
    margin-bottom: 5px;
}
.pillar-card .pillar-info span {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: bold;
    margin-bottom: 15px;
}
.pillar-card .pillar-info p {
    font-style: italic;
    color: #777;
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    position: relative;
    padding: 100px 0;
    color: white;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(93, 26, 42, 0.8);
}
.cta-section .container {
    position: relative;
    z-index: 2;
}
.cta-section h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 15px;
}
.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* --- 12. NEW STYLES FOR REDESIGNED RULES PAGE --- */
.rules-section {
    background-color: var(--light-bg);
}

.rules-nav-wrapper {
    position: sticky;
    top: 120px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

.rules-section .nav-pills .nav-link {
    font-family: var(--font-primary); /* USES LATO */
    font-weight: 700;                 /* BOLD */
    font-size: 0.95rem;
    text-transform: uppercase;        /* PROFESSIONAL LOOK */
    letter-spacing: 0.5px;
    padding: 15px 20px;
    color: var(--dark-text);
    border-radius: 6px;
    margin-bottom: 5px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.rules-section .nav-pills .nav-link:hover {
    background-color: var(--section-bg);
    border-color: var(--border-color);
}

.rules-section .nav-pills .nav-link.active {
    background-color: var(--primary-deep);
    color: var(--light-text);
    box-shadow: 0 5px 15px rgba(93, 26, 42, 0.2);
    transform: translateX(5px);
}

.rule-content-wrapper {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    min-height: 400px;
}

.rule-content-wrapper h3 {
    font-family: var(--font-primary); /* USES LATO */
    font-weight: 900;                 /* EXTRA BOLD for hierarchy */
    font-size: 2rem;
    color: var(--primary-deep);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rule-content-wrapper .rule-divider {
    width: 80px;
    border-top: 3px solid var(--primary-accent);
    opacity: 1;
    margin: 1.5rem 0;
}

.rule-content {
    line-height: 1.8;
}

.rule-content ul {
    list-style-type: none;
    padding-left: 0;
}

.rule-content ul li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 10px;
}

.rule-content ul li::before {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--primary-accent);
}