/* ============================================================
   Texas ServSafe — Theme Stylesheet
   All glassmorphism, animations, and custom component styles.
   Tailwind handles utility classes; this file handles custom.
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --navy: #1A2B45;
    --navy-light: #243654;
    --navy-dark: #111D30;
    --gold: #D4AF37;
    --gold-light: #E8CC6A;
    --gold-dark: #B8941E;
    --forest: #2D5A27;
}

/* --- Base Reset & Typography --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-family: 'DM Sans', system-ui, sans-serif; scroll-behavior: smooth; }
body { background: #1c375d; color: #E2E8F0; overflow-x: hidden; }

/* ============================================================
   GLASSMORPHISM UTILITIES
   ============================================================ */
.glass {
    background: rgba(26, 43, 69, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.08);
}
.glass-light {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.glass-gold {
    background: rgba(212, 175, 55, 0.06);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.12);
}

/* ============================================================
   HEADER TRANSITIONS
   ============================================================ */
.header-transparent {
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.header-solid {
    background: rgba(13, 21, 32, 0.92) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.animate-fade-up  { animation: fadeUp 0.8s ease-out forwards; }
.animate-fade-in  { animation: fadeIn 0.6s ease-out forwards; }
.animate-float    { animation: float 6s ease-in-out infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* ============================================================
   GOLD SHIMMER TEXT
   ============================================================ */
.text-shimmer {
    /* 1. The Colors */
    background: linear-gradient(110deg, #D4AF37 30%, #F5E6A3 50%, #D4AF37 70%);
    background-size: 200% auto;
    
    /* 2. THE MAGIC LINES (Must be active!) */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* 3. The Animation */
    animation: shimmer 4s linear infinite;

    /* 4. The Descender Fix */
    display: inline-block; 
    padding-bottom: 0.15em; 
    margin-bottom: -0.15em; 
    vertical-align: bottom; /* Keeps it aligned with the 'Texas Food Safety' text */
}

/* ============================================================
   SERVICE PILLAR CARDS
   ============================================================ */
.service-card {
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212,175,55,0.08), transparent 60%);
    opacity: 0;
    transition: opacity 0.45s ease;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.06);
}
.service-card .card-icon {
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card:hover .card-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 0 12px rgba(212, 175, 55, 0.4));
}

/* ============================================================
   TRUST BAR LOGOS
   ============================================================ */
.trust-logo {
    filter: grayscale(1) brightness(1.8);
    opacity: 0.5;
    transition: all 0.4s ease;
}
.trust-logo:hover {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}

/* ============================================================
   CUSTOM LOGO - ADDED BY YOURS TRULY
   ============================================================ */
.custom-logo {
    max-height: 200px;
    width: auto;
}

/* ============================================================
   HERO BACKGROUND
   ============================================================ */
.hero-bg {
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(26, 43, 69, 0.3), transparent),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(45, 90, 39, 0.08), transparent),
        radial-gradient(ellipse 50% 40% at 20% 70%, rgba(212, 175, 55, 0.04), transparent),
        linear-gradient(180deg, #0D1520 0%, #1A2B45 50%, #0D1520 100%);
}

/* ============================================================
   WIDGET SELECT DROPDOWNS
   ============================================================ */
.widget-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { transform: translateX(0); }

/* ============================================================
   DECORATIVE ELEMENTS
   ============================================================ */
.geo-line {
    position: absolute;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.1), transparent);
    width: 1px;
}
.gold-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,175,55,0.3), transparent);
}
.noise-overlay {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================================
   CUSTOM SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0D1520; }
::-webkit-scrollbar-thumb { background: #1A2B45; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #243654; }

/* ============================================================
   BUY BUTTON PULSE (Food Handler CTA)
   ============================================================ */
.buy-pulse {
    position: relative;
}
.buy-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(212,175,55,0.4), transparent, rgba(212,175,55,0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}
.buy-pulse:hover::after {
    opacity: 1;
}

/* ============================================================
   PRODUCT TOGGLE SWITCH (Manager Certification Page)
   ============================================================ */
.toggle-btn {
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    background: transparent;
    border: none;
}
.toggle-btn.active {
    color: #D4AF37;
}
.toggle-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 0.7);
}
.toggle-panel.hidden {
    display: none;
}

/* ============================================================
   FAQ ACCORDION (Manager Certification Page)
   ============================================================ */
.faq-item {
    transition: border-color 0.3s ease;
}
.faq-item:hover {
    border-color: rgba(212, 175, 55, 0.15);
}
.faq-trigger {
    cursor: pointer;
    border: none;
    background: none;
}
.faq-chevron {
    transition: transform 0.3s ease;
}
.faq-answer {
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .schedule-grid { overflow-x: auto; }
}

/* ============================================================
   QUIZ OPTIONS (Resources Page)
   ============================================================ */
.quiz-option {
    transition: all 0.3s ease;
}
.quiz-option:hover {
    border-color: rgba(212, 175, 55, 0.25) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}
.quiz-option:active {
    transform: scale(0.98);
}

/* ============================================================
   MANAGER PAGE TABS
   ============================================================ */
.mgr-tab {
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    background: transparent;
    border: none;
}
.mgr-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.03);
}
.mgr-tab.active {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ============================================================
   NAVIGATION DROPDOWNS
   ============================================================ */
.txss-dropdown {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.txss-dropdown li {
    list-style: none;
}
.txss-dropdown a {
    display: block;
    white-space: nowrap;
}

/* ============================================================
   Texas Cards Home Page
   ============================================================ */
.txfs-card {
    background: #1A2B45;
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 16px;
    color: #E2E8F0;
}
.txfs-card h2,
.txfs-card h3,
.txfs-card strong {
    color: #FFFFFF;
}
.txfs-card ul li {
    color: rgba(255, 255, 255, 0.6);
}
.txfs-card .text-gray-400,
.txfs-card .text-gray-500,
.txfs-card .text-gray-600 {
    color: rgba(255, 255, 255, 0.5) !important;
}
.txfs-card .text-navy {
    color: #FFFFFF !important;
}
.txfs-card .bg-gray-50,
.txfs-card .bg-gray-100 {
    background: rgba(255, 255, 255, 0.06) !important;
}
.txfs-card .bg-blue-50 {
    background: rgba(59, 130, 246, 0.15) !important;
}
.txfs-card .bg-amber-50 {
    background: rgba(212, 175, 55, 0.15) !important;
}
