/* Root variables */
:root {
    --primary: #CCAB3F;
    --secondary: #1A242C;
}

/* Preloader Base */
.preloader {
  position: fixed;
  inset: 0;
  background-color: #1A242C; /* Embo Films background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Circular Loader */
.loader {
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(farthest-side, #CCAB3F 94%, #0000) top/8px 8px no-repeat,
    conic-gradient(#0000 30%, #CCAB3F);

  mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);

  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Typography */
body {
    font-family: 'Roboto', sans-serif;
    color: #212529;
    background-color: #fff;
}

/* Hero background */
.hero-bg {
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Update this section in main.css */
.event-hero-bg {
    background-image: url('../img/event-hero-bg.jpg'); 
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    background-color: transparent; /* Ensures no color overlay from the CSS class */
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary);
    color: var(--secondary);
    border: none;
    border-radius: 8px;
}

/* Button hover animation */
.button-hover {
    transition: all .3s cubic-bezier(.4,0,.2,1);
}
.button-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(204,171,63,.4);
}

/* Rounded buttons */
.rounded-button { border-radius: 8px; }

/* Cards (Services, Portfolio, Awards) */
.card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all .3s ease;
}
.card:hover { border-color: var(--primary); }

/* Card titles and descriptions */
.card-title { font-size: 1.5rem; font-weight: bold; color: var(--secondary); margin-bottom: 0.5rem; }
.card-desc { font-size: 1rem; color: #4B5563; line-height: 1.6; }

/* Pattern overlay */
.pattern-overlay {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M30 0l15 15-15 15-15-15z M0 30l15 15-15 15-15-15z M60 30l15 15-15 15-15-15z M30 60l15 15-15 15-15-15z" fill="none" stroke="rgba(204,171,63,0.1)" stroke-width="1"/></svg>');
}

/* Section titles & description */
.section-title { font-size: 2.5rem; font-weight: bold; color: var(--secondary); margin-bottom: 1rem; }
.section-desc { font-size: 1.25rem; color: #4B5563; max-width: 48rem; margin: 0 auto; }

/* Subtitles */
.sub-title { font-size: 1.875rem; font-weight: bold; color: var(--secondary); margin-bottom: 0.5rem; }

/* Nav links */
.nav-link { color: #fff; font-weight: 500; transition: color .3s; }
.nav-link:hover { color: var(--primary); }
.social-icon { color: #fff; font-size: 1.25rem; transition: color .3s; }
.social-icon:hover { color: var(--primary); }

/* Active PageSection */
.active-nav {
  color: var(--primary) !important;
  position: relative;
}

.active-nav::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
}

/* Contdown */
/* Ensure countdown numbers are perfectly centered */
#days, #hours, #minutes, #seconds {
    display: block;
    line-height: 1; /* Removes extra vertical space that causes shifting */
    text-align: center;
    width: 100%; /* Ensures it uses the full width of the flex-center container */
}

/* Responsive box sizing to prevent overflow on very small phones */
@media (max-width: 380px) {
    .grid-cols-4 {
        gap: 0.25rem !important;
    }
    .w-14 {
        width: 3.25rem !important;
        height: 3.25rem !important;
    }
}

/* ===== Scroll Reveal Animation ===== */
.reveal {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children inside a reveal-group */
.reveal-group > * {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.reveal-group.revealed > *:nth-child(1) { transition-delay: 0s;   opacity: 1; transform: translateY(0); }
.reveal-group.revealed > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal-group.revealed > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.reveal-group.revealed > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-group.revealed > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.reveal-group.revealed > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
