/* McFarlane Family Reunion 2026 Website Styles */

:root {
    /* Jamaican flag colors */
    --jamaican-green: #009B3A;
    --jamaican-yellow: #FED100;
    --jamaican-black: #000000;
    
    /* Additional colors */
    --primary-color: #009B3A;
    --secondary-color: #FED100;
    --accent-color: #1A1A1A;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --text-color: #333333;
    --white-color: #ffffff;
    
    /* Font families */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

/* General Styles */
body {
    font-family: var(--body-font);color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
}

.section-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    font-weight: 700;
}

.section-divider {
    height: 3px;
    width: 60px;
    background-color: var(--secondary-color);
    margin: 0 auto 2rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #007c2e;
    border-color: #007c2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero-section {
    position: relative;
    background-image: url('../images/MFR26-MainImg.png');
    background-size: contain; /* was: cover */
    background-repeat: no-repeat;
    background-position: top center; /* changed from center */
    background-color: #000; /* fallback if image doesn't fill */
    color: var(--white-color);
    height: 65vh; /* Try 60–70vh to limit space used */
    display: flex;
    align-items: flex-end; /* pushes countdown lower */
    justify-content: center;
    padding-bottom: 2rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
background: linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15));


}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Countdown Timer */
.countdown-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.countdown-item {
    margin: 0 1rem;
    text-align: center;
    min-width: 80px;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 700;
    background-color: rgba(0, 155, 58, 0.8);
    color: white;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: block;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-date {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.photo-banner {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 65vh; /* Match hero height */
    width: 100%;
    background: #000;
    gap: 1rem;
    padding: 1rem;
}

.banner-image {
    flex: 0 0 auto;
    scroll-snap-align: center;
    position: relative;
    width: 1000px; /* or adjust down for smaller */
    max-width: 90vw;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
/* ------------- */
.photo-slideshow-wrapper {
    position: relative;
    height: 65vh;
    width: 100%;
    overflow: hidden;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
    pointer-events: none;
}


.slideshow-image.active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 2rem;
    color: #000;
    cursor: pointer;
    z-index: 2;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.slideshow-nav:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.slideshow-nav.prev {
    left: 1rem;
}

.slideshow-nav.next {
    right: 1rem;
}

/* ------------- */
.slideshow-image.active {
    opacity: 1;
    z-index: 1;
}

/* ----  Photo-Gallery -- Modular popup */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 5%;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  text-align: center;
}

.image-modal img.modal-content {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.gallery-item {
  position: relative;
}

.inline-modal {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  background: rgba(255,255,255,0.95);
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  width: 100%;
  height: auto;
}

.modal-preview {
  width: 100%;
  border-radius: 6px;
}

.inline-close {
  position: absolute;
  top: 2px;
  right: 8px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}

/* ----  end Photo-Gallery -- Modular popup */

.banner-image.active {
    opacity: 1;
}

/* Updates Section */
.update-card {
    border-radius: 8px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.update-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.update-card .card-title {
    color: var(--primary-color);
    font-weight: 600;
}

.update-card .card-subtitle {
    font-size: 0.9rem;
}

/* Questionnaire Section */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 155, 58, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-control.error, .form-select.error {
    border-color: #dc3545;
}

/* Events Schedule Section */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: var(--secondary-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-icon {
    position: absolute;
    left: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.timeline-content {
    position: relative;
    width: 45%;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timeline-content::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -15px;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 15px solid white;
}

.timeline-content.right {
    margin-left: auto;
}

.timeline-content.right::after {
    right: auto;
    left: -15px;
    border-left: none;
    border-right: 15px solid white;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Contact Section */
.contact-info {
    margin-bottom: 2rem;
}

.contact-info i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* Footer */
.footer {
    background-color: var(--accent-color);
    color: var(--white-color);
}

.footer a {
    color: var(--white-color);
    transition: color 0.3s ease;
}

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

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--secondary-color);
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .countdown-item {
        margin: 0 0.5rem;
        min-width: 60px;
    }
    
    .countdown-number {
        font-size: 1.8rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-icon {
        left: 30px;
        transform: translateX(0);
    }
    
    .timeline-content, .timeline-content.right {
        width: calc(100% - 80px);
        margin-left: 80px;
    }
    
    .timeline-content::after, .timeline-content.right::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .countdown-container {
        flex-wrap: wrap;
    }
    
    .countdown-item {
        margin: 0.5rem;
    }
    
    .photo-banner {
        height: 300px;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .countdown-number {
        font-size: 1.5rem;
        padding: 0.4rem 0.8rem;
    }
    
    .photo-banner {
        height: 250px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

.music-toggle-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  background-color: white;
  color: red;
  border: 2px solid red;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: bold;
  width: auto; /* prevents stretching */
  height: 20px; /* prevents vertical fill */
  white-space: nowrap; /* keeps text in one line */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Add class toggle depending on music state */
.music-playing {
  color: green;
  border-color: green;
}


.music-toggle-btn:hover {
  color: white;
  border-color: green;
  background-color: green;
  cursor: pointer;
}

.custom-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);
}

.custom-modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  width: 80%;
  max-width: 700px;
  text-align: center;
  position: relative;
}

.custom-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

#order-section:target {
  animation: highlightFlash 1s ease-in-out;
}

@keyframes highlightFlash {
  from { background-color: #fff8e1; }
  to { background-color: transparent; }
}

.modal-header .btn-close {
  background-color: white;    /* optional: gives a visible white bg */
  border-radius: 50%;
  filter: invert(1);
  opacity: 1;                 /* ensures it's not semi-transparent */
}
