/* ====================== */
/* ✅ Bekryl Custom Styles */
/* ====================== */

/* Header hardware-acceleration fix */
#main-header {
    top: 0;
    left: 0;
    right: 0;
    transform: translateZ(0);
}

/* Custom variables */
:root {
    --color-brand-accent: #EE3224;
}

.bg-brand-accent {
    background-color: var(--color-brand-accent);
}

.text-brand-accent {
    color: var(--color-brand-accent);
}

.hover\:bg-brand-accent:hover {
    background-color: var(--color-brand-accent);
}

.focus-border-brand-accent:focus {
    border-color: var(--color-brand-accent);
}

.focus-ring-brand-accent:focus {
    --tw-ring-color: var(--color-brand-accent);
}

/* Typography */
body {
    font-family: 'Inter', sans-serif;
    color: #212121;
}

/* Underline hover effect */
.underline-on-hover {
    position: relative;
    padding-bottom: 2px;
}
.underline-on-hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-brand-accent);
    transition: width 0.3s ease-in-out;
}
.underline-on-hover:hover::after {
    width: 100%;
}
a:hover {
    color: var(--color-brand-accent) !important;
}

.mega-menu-panel {
    border-bottom: 4px solid var(--color-brand-accent);
}

/* ====================== */
/* ✅ Search Overlay       */
/* ====================== */

#search-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;

    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    opacity: 0 !important;
    visibility: hidden !important;

    transition: opacity 0.35s ease, visibility 0.35s ease;
}

#search-overlay.is-open {
    opacity: 1 !important;
    visibility: visible !important;
}

#search-overlay .search-container {
    width: 90% !important;
    max-width: 600px !important;
    text-align: center !important;
    padding: 2rem !important;
}

/* ====================== */
/* ✅ Form Styles          */
/* ====================== */

form input[type="text"]:not([readonly]),
form input[type="email"],
form select,
form textarea {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

form input[type="text"]:not([readonly]):focus,
form input[type="email"]:focus,
form select:focus,
form textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--color-brand-accent);
    box-shadow: 0 0 0 2px rgba(238, 50, 36, 0.3);
}

form select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

form input[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* ====================== */
/* ✅ Logo Switching Logic */
/* ====================== */

.logo-dark {
    display: none;
}
.logo-white {
    display: block;
}

#main-header.bg-white .logo-dark,
#main-header.scrolled .logo-dark {
    display: block;
}
#main-header.bg-white .logo-white,
#main-header.scrolled .logo-white {
    display: none;
}

#main-header.scrolled {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

#main-header.scrolled a {
    color: #000 !important;
}

#main-header.scrolled a:hover {
    color: var(--color-brand-accent) !important;
}

/* ✅ Ensure search button changes color on scroll */
#main-header.scrolled button,
#main-header.scrolled button svg {
    color: #000 !important;
    stroke: #000 !important;
}

/* ====================== */
/* ✅ Content Gap Fix      */
/* ====================== */

main:not([class*="pt-0"]) {
    padding-top: 48px !important;
}
@media (min-width: 768px) {
    main:not([class*="pt-0"]) { padding-top: 56px !important; }
}
@media (min-width: 1024px) {
    main:not([class*="pt-0"]) { padding-top: 64px !important; }
}

/* ====================== */
/* ✅ Reports Card Blur Fix (Highly Aggressive Overrides) */
/* ====================== */

/* 🎯 FIX: Explicitly enforce the blur filter */
.backdrop-blur-md-custom {
    backdrop-filter: blur(12px) !important; 
    -webkit-backdrop-filter: blur(12px) !important;
}

/* 🎯 FIX: Force white background with 60% opacity using a stronger, specific selector */
.group .report-card-bg {
    background-color: rgba(255, 255, 255, 0.60) !important; 
    opacity: 1 !important; 
    /* ❌ remove transition here so Tailwind's transition-all can do its job  */
}

/* 🎯 FIX: Explicitly define the hover state */
.group:hover .report-card-bg {
    background-color: rgba(255, 255, 255, 0.95) !important;
}


/* ================================
   ✅ CMS / CKEditor Content Styles
   ================================ */

.cms-content {
    /* nothing here on purpose */
}

/* Paragraph spacing */
.cms-content p {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Headings spacing */
.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* Lists */
.cms-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.cms-content ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.cms-content li {
    margin-bottom: 0.5rem;
}

/* Links inside content */
.cms-content a {
    color: var(--color-brand-accent);
    text-decoration: underline;
}

.cms-content a:hover {
    text-decoration: none;
}


/* ============================
   Global Button Interactivity
   ============================ */

button {
    cursor: pointer;
}

/* Disabled buttons should not look clickable */
button:disabled,
button[disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Optional: prevent pointer on aria-disabled buttons */
button[aria-disabled="true"] {
    cursor: not-allowed;
}



/* ============================
   Global Wide Padding Utility
   ============================ */

/* Mobile first */
.section-padding {
    padding-left: 1rem;
    padding-right: 1rem;
}
/* Tablet */
@media (min-width: 768px) {
    .section-padding {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Desktop (THIS is what you need) */
@media (min-width: 1280px) {
    .section-padding {
        padding-left: 6rem;
        padding-right: 6rem;
    }
}

/* ✅ Clean content flow (no scroll, no fixed height) */
.content-block-inner .grid {
    height: auto;
}

.content-block-inner .cms-content {
    height: auto;
    overflow: visible;
}

/* Fix image alignment in report detail layout */
.image-slider-container {
    align-self: flex-start;
}

/* ============================
   ✅ FORCE DISABLE TIMELINE ON MOBILE
   ============================ */

@media (max-width: 767px) {

    .timeline-container {
        padding-left: 0 !important;
    }

    .timeline-container::before {
        display: none !important;
    }

    .content-block-wrapper::before {
        display: none !important;
    }
}

/* Expand container on desktop */
@media (min-width: 1280px) {
    .container {
        max-width: 1500px;
    }

    .section-padding {
        padding-left: 6rem;
        padding-right: 6rem;
    }
}