/**
 * Countdown Timer Styles - Warm Minimal Design
 * Next upcoming service/event banner for GPBC
 * Aligned with homepage warm cream aesthetic
 */

/* Color Palette (matches redesign-styles.css) */
:root {
    --countdown-bg: #faf8f5;
    --countdown-surface: #ffffff;
    --countdown-text: #2c2c2c;
    --countdown-text-light: #6b6b6b;
    --countdown-accent: #ffff80;
    --countdown-accent-solid: #ffff00;
    --countdown-navy: #1e3a5f;
    --countdown-border: #e8e4dd;
    --countdown-shadow: rgba(30, 58, 95, 0.08);
    --countdown-shadow-md: rgba(30, 58, 95, 0.10);
}

/* === Warm Minimal Next Service Card === */
.countdown-hero-banner {
    position: fixed;
    top: 90px;
    right: 30px;
    z-index: 1000;
    width: 380px;
    max-width: 380px;
    padding: 0;
    background: transparent;
}

/* Next Service Title - Warm Minimal Style */
.countdown-hero-banner .services-main-title {
    background: var(--countdown-surface);
    color: var(--countdown-navy);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.65rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--countdown-border);
    margin-bottom: 0.75rem;
    text-align: center;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 
        0 2px 4px var(--countdown-shadow),
        0 4px 12px var(--countdown-shadow-md);
    backdrop-filter: blur(10px);
}

/* Next Event Banner - Warm Minimal Card */
.countdown-hero-banner .next-event-banner,
.next-event-banner {
    background: var(--countdown-surface);
    backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 1.5rem 1.5rem;
    box-shadow: 
        0 4px 6px var(--countdown-shadow),
        0 10px 20px var(--countdown-shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    border: 1px solid var(--countdown-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle gold accent bar on card */
.countdown-hero-banner .next-event-banner::before,
.next-event-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--countdown-accent);
    opacity: 0.6;
}

/* Countdown Top Strip Container (for Next Service section) */
.countdown-top-strip {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown-top-strip .next-event-banner {
    width: 100%;
    max-width: 900px;
}

/* All Services Banner */
.all-services-banner {
    width: 100%;
}

.services-main-title {
    color: var(--countdown-navy);
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

/* Warm Minimal Service Card */
.service-card {
    background: var(--countdown-surface);
    backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 1.75rem;
    border: 1px solid var(--countdown-border);
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 6px var(--countdown-shadow),
        0 10px 20px var(--countdown-shadow-md);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--countdown-accent);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    background: var(--countdown-surface);
    transform: translateY(-4px);
    box-shadow: 
        0 8px 12px rgba(30, 58, 95, 0.12),
        0 16px 32px rgba(30, 58, 95, 0.15);
    border-color: var(--countdown-accent);
}

.service-card:hover::before {
    opacity: 0.8;
}

.service-card.happening-now {
    border-color: rgba(74, 222, 128, 0.4);
    background: var(--countdown-surface);
    animation: pulse-glow 2s ease-in-out infinite;
}

.service-card.happening-now::before {
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
}

.service-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.service-icon {
    display: none;
}

.service-title {
    text-align: center;
    width: 100%;
}

.service-title h3 {
    color: var(--countdown-navy);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    text-align: center;
    line-height: 1.4;
}

/* Warm Minimal Service Badge */
.service-badge {
    display: inline-block;
    background: rgba(255, 255, 0, 0.12);
    color: #808000;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border: 1px solid rgba(255, 255, 0, 0.25);
}

.service-datetime {
    color: var(--countdown-text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 600;
    background: rgba(232, 228, 221, 0.5);
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--countdown-border);
}

.service-countdown {
    display: flex;
    justify-content: center;
}

/* Hover Effects */
.countdown-hero-banner .next-event-banner:hover,
.next-event-banner:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 12px rgba(30, 58, 95, 0.12),
        0 16px 32px rgba(30, 58, 95, 0.15);
    border-color: var(--countdown-accent);
}

/* For About page - warm minimal styling */
#nextServiceCountdown .next-event-banner {
    border-radius: 16px;
    box-shadow: 
        0 4px 6px var(--countdown-shadow),
        0 10px 20px var(--countdown-shadow-md);
}

.next-event-banner.happening-now {
    border-color: rgba(74, 222, 128, 0.3);
    background: var(--countdown-surface);
    animation: pulse-glow 2s ease-in-out infinite;
}

.next-event-banner.happening-now::before {
    background: linear-gradient(90deg, #4ade80 0%, #22c55e 100%);
}

.event-info {
    flex: 1;
    width: 100%;
}

/* Warm Minimal Event Type Badge */
.event-type {
    display: inline-block;
    background: rgba(255, 255, 0, 0.12);
    color: #808000;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    box-shadow: 0 2px 4px var(--countdown-shadow);
    border: 1px solid rgba(255, 255, 0, 0.25);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.event-type.live {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.9) 0%, rgba(34, 197, 94, 0.9) 100%);
    color: white;
    animation: pulse-glow 1.5s ease-in-out infinite;
    border-color: rgba(74, 222, 128, 0.4);
}

.event-title-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.event-icon-large {
    font-size: 1.8rem;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.event-title-banner h2 {
    font-size: 1.1rem;
    color: var(--countdown-navy);
    margin: 0;
    font-weight: 700;
    line-height: 1.4;
}

/* Warm Minimal Event DateTime */
.event-datetime {
    color: var(--countdown-text-light);
    font-weight: 600;
    font-size: 0.85rem;
    background: rgba(232, 228, 221, 0.5);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--countdown-border);
}

/* Event Header (for top strip layout) */
.event-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    justify-content: center;
}

.event-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    flex-shrink: 0;
}

.event-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.event-title {
    font-size: 1.25rem;
    color: var(--countdown-navy);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.event-badge {
    display: inline-block;
    background: rgba(255, 255, 0, 0.12);
    color: #808000;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 0, 0.25);
}

/* Event Info (date/location) */
.event-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.event-info p {
    margin: 0;
    color: var(--countdown-text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Live Badge for happening now */
.live-badge {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    animation: pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

.countdown-display {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
}

.countdown-label {
    display: none;
}

/* Warm Minimal Countdown Timer Display */
.countdown-timer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
    width: 100%;
}

.time-unit {
    text-align: center;
    background: rgba(232, 228, 221, 0.4);
    padding: 0.6rem 0.4rem;
    border-radius: 12px;
    border: 1px solid var(--countdown-border);
    transition: all 0.3s ease;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect on hover */
.time-unit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.time-unit:hover::before {
    left: 100%;
}

.time-unit:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 0, 0.4);
    background: rgba(255, 255, 0, 0.1);
    box-shadow: 0 4px 8px var(--countdown-shadow-md);
}

.time-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--countdown-navy);
    line-height: 1;
}

.time-label {
    display: block;
    font-size: 0.6rem;
    color: var(--countdown-text-light);
    margin-top: 0.3rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.8px;
}

/* Live Now Message (Green kept for urgency/status) */
.live-now-message {
    text-align: center;
    font-size: 1.1rem;
    color: white;
    font-weight: 700;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(74, 222, 128, 0.3),
        0 0 20px rgba(74, 222, 128, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.live-dot {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* Warm Minimal Animations */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 
            0 4px 6px var(--countdown-shadow),
            0 10px 20px rgba(74, 222, 128, 0.15);
    }
    50% {
        opacity: 0.95;
        box-shadow: 
            0 4px 6px var(--countdown-shadow),
            0 10px 20px rgba(74, 222, 128, 0.25),
            0 0 30px rgba(74, 222, 128, 0.15);
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Responsive Design - Mobile Optimized */
@media (max-width: 768px) {
    /* Mobile: Position countdown at top, not fixed */
    .countdown-hero-banner {
        position: relative;
        top: auto;
        right: auto;
        max-width: 100%;
        width: 100%;
        padding: 0.75rem 1rem 1rem; /* Refined top spacing for composition */
        background: transparent;
    }
    
    .countdown-hero-banner .services-main-title {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        text-align: center;
        padding: 0.4rem 0.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon {
        font-size: 2rem;
    }
    
    .service-title h3 {
        font-size: 1rem;
    }
    
    .service-datetime {
        font-size: 0.85rem;
        padding: 0.5rem 0.6rem;
    }
    
    /* Brand-integrated countdown banner */
    .countdown-hero-banner .next-event-banner,
    .next-event-banner {
        padding: 1.5rem; /* More breathing room */
        gap: 1rem;
        margin: 0;
        border-radius: 16px; /* Softer corners */
        border: 1px solid rgba(255, 255, 0, 0.15); /* Subtle gold tint */
        box-shadow: 
            0 2px 8px rgba(0, 0, 0, 0.04),
            0 8px 24px rgba(0, 0, 0, 0.06); /* Subtle depth */
    }
    
    /* Brand-integrated accent bar with fade edges */
    .countdown-hero-banner .next-event-banner::before,
    .next-event-banner::before {
        height: 4px; /* Slightly thicker */
        opacity: 0.7; /* More visible */
        background: linear-gradient(90deg, 
            transparent 0%, 
            var(--countdown-accent) 50%, 
            transparent 100%); /* Fade edges */
    }
    
    .event-header {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 0.85rem;
    }
    
    .event-icon {
        font-size: 1.75rem;
    }
    
    .event-title {
        font-size: 1.2rem;
        color: #000000;
        font-weight: 900;
        text-shadow: none;
        opacity: 1;
    }
    
    .event-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
        background: rgba(255, 255, 0, 0.2);
        color: #000000;
        font-weight: 700;
    }
    
    .event-info {
        gap: 0.4rem;
        margin-bottom: 0.85rem;
    }
    
    .event-info p {
        font-size: 0.85rem;
        color: #000000;
        font-weight: 600;
    }
    
    .live-badge {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .event-title-banner h2 {
        font-size: 1rem;
    }
    
    .event-icon-large {
        font-size: 1.6rem;
    }
    
    .event-datetime {
        font-size: 0.8rem;
        padding: 0.45rem 0.65rem;
    }
    
    .countdown-timer {
        gap: 0.5rem;
    }
    
    /* Polished time units with micro-depth */
    .time-unit {
        padding: 0.65rem 0.4rem; /* More space */
        min-width: 56px; /* Wider units */
        border-radius: 12px; /* Softer */
        border: 1px solid rgba(255, 255, 0, 0.1); /* Subtle gold border */
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); /* Micro-depth */
        transition: transform 0.2s ease, border-color 0.2s ease;
    }
    
    /* Premium tap feedback for time units */
    .time-unit:active {
        transform: scale(0.96);
        border-color: rgba(255, 255, 0, 0.3);
    }
    
    .time-value {
        font-size: 1.4rem;
        color: #000000;
        font-weight: 800;
    }
    
    .time-label {
        font-size: 0.6rem;
        margin-top: 0.25rem;
        color: #000000;
        font-weight: 700;
    }
    
    .live-now-message {
        font-size: 1rem;
        padding: 0.7rem 1.2rem;
        border-radius: 10px;
    }
    
    .live-dot {
        width: 9px;
        height: 9px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .countdown-hero-banner {
        width: 340px;
        max-width: 340px;
        right: 20px;
    }
    
    .time-unit {
        min-width: 55px;
    }
    
    .time-value {
        font-size: 1.4rem;
    }
}

/* ============================================================================
   DARK MODE — Next Service Countdown Section
   ============================================================================
   Enhanced readability and contrast for countdown timers in dark mode
   ========================================================================== */

body.dark .countdown-hero-banner .services-main-title,
body[data-theme="dark"] .countdown-hero-banner .services-main-title {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dark .countdown-hero-banner .next-event-banner,
body.dark .next-event-banner,
body[data-theme="dark"] .countdown-hero-banner .next-event-banner,
body[data-theme="dark"] .next-event-banner {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.25);
}

/* Accent bar stays golden/yellow */
body.dark .countdown-hero-banner .next-event-banner::before,
body.dark .next-event-banner::before,
body[data-theme="dark"] .countdown-hero-banner .next-event-banner::before,
body[data-theme="dark"] .next-event-banner::before {
    background: #fbbf24;
    opacity: 0.8;
}

/* Event icon - bright and clear emoji */
body.dark .event-icon,
body[data-theme="dark"] .event-icon {
    filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.2));
    opacity: 1;
}

/* Event title - bright and clear */
body.dark .event-title,
body[data-theme="dark"] .event-title {
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Service type badge */
body.dark .service-type-badge,
body[data-theme="dark"] .service-type-badge {
    background: #3b82f6;
    color: #ffffff;
    border-color: #2563eb;
    font-weight: 600;
}

/* Event info items */
body.dark .event-info-item,
body[data-theme="dark"] .event-info-item {
    color: #cbd5e1;
    background: #0f172a;
    border-color: #334155;
}

body.dark .event-info-item svg,
body.dark .event-info-emoji,
body[data-theme="dark"] .event-info-item svg,
body[data-theme="dark"] .event-info-emoji {
    color: #fbbf24;
    opacity: 1;
}

/* Countdown timer boxes */
body.dark .time-unit,
body[data-theme="dark"] .time-unit {
    background: #1e293b;
    border-color: #475569;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark .time-unit:hover,
body[data-theme="dark"] .time-unit:hover {
    background: #1e293b;
    border-color: #3b82f6;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

/* Time values - large and clear */
body.dark .time-value,
body[data-theme="dark"] .time-value {
    color: #f1f5f9;
    font-weight: 700;
}

/* Time labels */
body.dark .time-label,
body[data-theme="dark"] .time-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* All Services Banner */
body.dark .all-services-banner,
body[data-theme="dark"] .all-services-banner {
    background: #1e293b;
    border-color: #334155;
}

body.dark .services-banner-title,
body[data-theme="dark"] .services-banner-title {
    color: #f1f5f9;
}

/* Service Cards in All Services */
body.dark .service-card,
body[data-theme="dark"] .service-card {
    background: #0f172a;
    border-color: #334155;
}

body.dark .service-card:hover,
body[data-theme="dark"] .service-card:hover {
    background: #1e293b;
    border-color: #3b82f6;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.15);
}

body.dark .service-title,
body[data-theme="dark"] .service-title {
    color: #f1f5f9;
}

body.dark .service-datetime,
body.dark .service-location,
body[data-theme="dark"] .service-datetime,
body[data-theme="dark"] .service-location {
    color: #cbd5e1;
}

/* Countdown Separator */
body.dark .countdown-separator,
body[data-theme="dark"] .countdown-separator {
    color: #64748b;
}

/* Empty State */
body.dark .no-services-message,
body[data-theme="dark"] .no-services-message {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark .no-services-message h3,
body[data-theme="dark"] .no-services-message h3 {
    color: #f1f5f9;
}

/* Next Service Section Background */
body.dark .next-service-section,
body[data-theme="dark"] .next-service-section {
    background: linear-gradient(135deg, #0b1220 0%, #111827 100%);
}

body.dark .next-service-content h2,
body[data-theme="dark"] .next-service-content h2 {
    color: #f1f5f9;
}

body.dark .next-service-intro,
body[data-theme="dark"] .next-service-intro {
    color: #cbd5e1;
    opacity: 1;
}

/* Mobile dark mode text color fixes */
@media (max-width: 768px) {
    body.dark .event-info p,
    body[data-theme="dark"] .event-info p {
        color: #e2e8f0;
        font-weight: 600;
    }
    
    body.dark .event-title,
    body[data-theme="dark"] .event-title {
        color: #ffffff;
        font-weight: 800;
    }
    
    body.dark .event-badge,
    body[data-theme="dark"] .event-badge {
        background: rgba(251, 191, 36, 0.25);
        color: #fbbf24;
        font-weight: 700;
    }
    
    body.dark .time-value,
    body[data-theme="dark"] .time-value {
        color: #ffffff;
        font-weight: 800;
    }
    
    body.dark .time-label,
    body[data-theme="dark"] .time-label {
        color: #cbd5e1;
        font-weight: 600;
    }
}