/**
 * ==================================================================================
 * MASTER.CSS (GLOBAL)
 * This file contains the core layout, shared components, and styles
 * needed for every page on the site.
 * ==================================================================================
 */

/*
 * ==================================================================================
 * SECTION 1: BASE & TYPOGRAPHY
 * ==================================================================================
 */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; font-family: 'Inter', sans-serif; background-color: #0B0B0F; color: #E5E7EB; }
body { overscroll-behavior-y: contain; transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1); }

/*
 * ==================================================================================
 * SECTION 2: UNIVERSAL LAYOUT SYSTEM
 * ==================================================================================
 */
html, body { overflow: hidden; }
.site-wrapper { display: flex; flex-direction: column; height: 100%; width: 100%; position: relative; z-index: 2; }
.main-content-area { flex-grow: 1; min-height: 0; overflow-y: auto; }
/* ADD THIS NEW, SMARTER RULE */
body.page-is-scrollable #nav-placeholder,
body.grid-view-active #nav-placeholder {
    min-height: 70px;
}
body.grid-view-active #headline-container {
    margin-top: -70px;
}
/***********************************************************************************/
/* START: DEFINITIVE FOOTER SOLUTION                               */
/***********************************************************************************/

/* STEP 1: By default, the footer is fixed to the bottom. This is for the carousel. */
footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* STEP 2: On mobile, the default fixed footer is hidden in carousel mode. */
@media (max-width: 768px) {
    footer {
        display: none;
    }
}

/* STEP 3: THE FIX. This powerful rule un-fixes the footer in ALL scrollable modes. */
/* It targets both your content pages AND the index page in grid mode. */
body.page-is-scrollable footer,
body.grid-view-active footer {
    display: block !important; /* Use !important for safety */
    position: static;
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/***********************************************************************************/
/* END: DEFINITIVE FOOTER SOLUTION                                 */
/***********************************************************************************/

/*
 * ==================================================================================
 * SECTION 3: SHARED COMPONENTS (NAV, MODALS, ETC.)
 * ==================================================================================
 */
nav { background-color: rgba(17, 24, 39, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 1rem 2rem; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); z-index: 100; position: fixed; width: 100%; top: 0; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.view-switcher { position: fixed; top: 15vh; right: 2rem; transform: translateY(-50%); z-index: 50; background-color: rgba(31, 41, 55, 0.8); backdrop-filter: blur(5px); color: white; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 0.25rem; cursor: pointer; transition: background-color 0.3s ease, padding 0.3s ease; display: flex; align-items: center; justify-content: center; padding: 0.3rem; }
.view-switcher:hover { background-color: rgba(55, 65, 81, 0.9); }
.view-switcher svg { width: 24px; height: 24px; }
.view-switcher-tooltip { position: absolute; right: 110%; top: 50%; transform: translateY(-50%); background-color: #1f2937; color: white; padding: 0.25rem 0.75rem; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 600; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; pointer-events: none; }
.view-switcher:hover .view-switcher-tooltip { opacity: 1; visibility: visible; }
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal.active { opacity: 1; pointer-events: auto; }
.modal-content { position: relative; width: 90%; max-width: 50rem; aspect-ratio: 16 / 9; }
.modal-content iframe, .modal-content video { width: 100%; height: 100%; border: none; }

.message-modal-content { background-color: #1F2937; padding: 2rem; border-radius: 1rem; max-width: 500px; width: 90%; text-align: center; position: relative; box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.message-modal-text { line-height: 1.6; }
/* This rule targets the buttons by their ID, which is correct. */
/* ADD THIS RULE for the VIDEO PLAYER modal */
#modal-close-button {
    position: absolute;
    top: -40px;  /* This moves it ABOVE the video frame */
    right: 0;
    font-size: 2.5rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    color: #dd7d23;
}

/* ADD THIS RULE for the 'Coming Soon' and MESSAGE modals */
#message-modal-close-button {
    position: absolute;
    top: 0.50rem;
    right: 1rem;
    font-size: 1.5rem; /* A little smaller so it's not so "big" */
    color: #9ca3af; /* A softer color to blend in better */
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    /* color: #c0352b; */
    color: #dd7d23;
}
/* Add this to master.css to remove the focus outline on all modal close buttons */
#modal-close-button:focus,
#message-modal-close-button:focus,
#modal-close-btn:focus {
    outline: none;
}
/*
 * ==================================================================================
 * SECTION 4: ENHANCEMENTS (SCROLLBAR)
 * ==================================================================================
 */
* { scrollbar-width: thin; scrollbar-color: #4A5568 #1F2937; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: #1F2937; }
::-webkit-scrollbar-thumb { background-color: #4A5568; border-radius: 20px; border: 3px solid #1F2937; }
::-webkit-scrollbar-thumb:hover { background-color: #6B7280; }

/*
 * ==================================================================================
 * SECTION 5: RESPONSIVE STYLES (GLOBAL)
 * ==================================================================================
 */
@media (max-width: 768px) {
    nav { padding: 0.75rem 1rem; }
    .view-switcher { top: 12vh; right: 1rem; }
    .view-switcher-tooltip { display: none; }
}

/* --- NEON GLOW EFFECT STYLES --- */

/* 1. Defines the custom property for the animation */
@property --gradient-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* 2. Defines the rotation animation */
@keyframes rotate-gradient {
  0% {
    --gradient-angle: 0deg;
  }
  100% {
    --gradient-angle: 360deg;
  }
}

/* 3. The class that creates the glowing frame */
.neon-glow-frame {
    position: relative;
    padding: 3px;
    border-radius: 1rem;
    background: conic-gradient(
        from var(--gradient-angle),
        #00e1ff, #ff00c8, #00e1ff
    );
    animation: rotate-gradient 4s linear infinite;
    box-shadow: 0 0 15px rgba(255, 0, 200, 0.4), 0 0 25px rgba(0, 225, 255, 0.4);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.active .neon-glow-frame {
    transform: scale(1);
}