/* The Rise Theme - Custom Overrides & Color Presets
 * Controlled via back-end theme settings (preset_theme: dubai-summit | rise-classic)
 */

/* ============================================
   1. 17th Dubai Summit Theme Preset (dubai-summit)
   Rich UAE Emerald & Dubai Gold Palette Variations
   ============================================ */

/* Light Mode Variables Override */
html[data-color-preset="dubai-summit"],
html[data-color-preset="dubai-summit"][data-theme="light"] {
    --tr-bg: #FAFBF8;
    --tr-bg-elevated: #ffffff;
    --tr-bg-muted: #EAF2EC;
    --tr-bg-inverse: #062016;

    --tr-text: #1C2B23;
    --tr-text-strong: #062016;
    --tr-text-muted: #4A6357;
    --tr-text-inverse: #ffffff;

    --tr-gold: #D4AF37;
    --tr-gold-light: #F3C623;
    --tr-gold-dark: #B8942D;
    
    --tr-emerald: #0b6e38;
    --tr-emerald-light: #0d8a47;
    --tr-emerald-dark: #074a25;

    --tr-crimson: #e52027;
    --tr-crimson-dark: #c0141b;

    /* Deep Forest Emerald Variations */
    --tr-midnight: #062016;
    --tr-slate: #0C3325;
    --tr-slate-light: #144A36;

    --tr-accent: #e52027;
    --tr-accent-contrast: #ffffff;
    --tr-link: #0b6e38;
    --tr-link-hover: #074a25;

    --tr-nav-bg: rgba(250, 251, 248, 0.97);
    --tr-nav-border: rgba(11, 110, 56, 0.1);
}

/* Dark Mode Variables Override */
html[data-color-preset="dubai-summit"][data-theme="dark"],
html[data-color-preset="dubai-summit"].dark {
    --tr-bg: #062016;
    --tr-bg-elevated: #0C3325;
    --tr-bg-muted: #144A36;
    --tr-bg-inverse: #FAFBF8;

    --tr-text: #E2EFE8;
    --tr-text-strong: #F4FBF7;
    --tr-text-muted: #8FB4A2;
    --tr-text-inverse: #062016;

    --tr-gold: #F59E0B;
    --tr-gold-light: #FCD34D;
    --tr-gold-dark: #D4AF37;

    --tr-emerald: #10B981;
    --tr-emerald-light: #34D399;
    --tr-emerald-dark: #059669;

    --tr-crimson: #ef4444;

    --tr-midnight: #03140D;
    --tr-slate: #062016;
    --tr-slate-light: #0C3325;

    --tr-accent: #f59e0b;
    --tr-accent-contrast: #062016;
    --tr-link: #F59E0B;
    --tr-link-hover: #FCD34D;

    --tr-nav-bg: rgba(6, 32, 22, 0.97);
    --tr-nav-border: rgba(245, 158, 11, 0.15);
}

/* Modern Summit Hero Layout with Very Low Opacity Pattern Overlay */
.hero-modern {
    position: relative;
    padding: clamp(3.5rem, 7vw, 6.5rem) 0;
    background-color: var(--tr-bg);
    background-image: 
        /* Subtle geometric low-opacity background pattern */
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23D4AF37' fill-opacity='0.035' fill-rule='evenodd'%3E%3Cpath d='M30 30L0 0h60L30 30zM0 60l30-30 30 30H0z'/%3E%3Ccircle cx='30' cy='30' r='1.5' fill='%230b6e38' fill-opacity='0.04'/%3E%3C/g%3E%3C/svg%3E"),
        radial-gradient(circle at 50% -10%, rgba(212, 175, 55, 0.12) 0%, transparent 65%),
        radial-gradient(circle at 85% 60%, rgba(11, 110, 56, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 15% 60%, rgba(229, 32, 39, 0.05) 0%, transparent 50%);
    border-bottom: 1px solid var(--tr-divider);
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -60px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-modern::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -60px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(11, 110, 56, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-modern-wrapper {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-modern-logo {
    max-width: 400px;
    width: 90%;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.06));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-modern-logo:hover {
    transform: scale(1.03);
}

.modern-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tr-text-strong);
    background: var(--tr-bg-elevated);
    border: 1px solid var(--tr-gold);
    border-radius: var(--tr-radius-full);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.1);
}

.hero-glass-card {
    background: var(--tr-bg-elevated);
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-xl);
    padding: clamp(1.75rem, 4vw, 2.5rem);
    box-shadow: var(--tr-shadow-lg);
}

.hero-lead-main {
    font-size: clamp(1.1rem, 2.2vw, 1.35rem);
    font-weight: 600;
    color: var(--tr-text-strong);
    line-height: 1.65;
}

.hero-lead-sub {
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    color: var(--tr-text-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

/* Hero Stats Strip - Summit by the Numbers */
.hero-stats-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: clamp(1.5rem, 4vw, 3rem);
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    position: relative;
    flex: 1 1 0;
}

.hero-stat:not(:first-child)::before {
    content: '';
    position: absolute;
    left: calc(-0.5 * clamp(1.5rem, 4vw, 3rem));
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 70%;
    background: linear-gradient(180deg, transparent 0%, var(--tr-gold) 30%, rgba(212, 175, 55, 0.35) 70%, transparent 100%);
    opacity: 0.5;
}

.hero-stat-number {
    font-size: clamp(1.9rem, 3.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #D4AF37 20%, #B8942D 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.hero-stat-label {
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tr-text-muted);
    text-align: center;
}

@media (max-width: 640px) {
    .hero-stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem 1rem;
    }
    .hero-stat:nth-child(odd)::before {
        display: none;
    }
    .hero-stat:nth-child(3)::before {
        display: block;
    }
}

.text-crimson {
    color: #e52027 !important;
}

.shadow-btn {
    box-shadow: 0 8px 20px rgba(229, 32, 39, 0.25) !important;
}

.btn-outline-modern {
    background: var(--tr-bg-elevated);
    color: var(--tr-text-strong);
    border: 2px solid var(--tr-gold);
    font-weight: 700;
    padding: 0.75rem 1.75rem;
    border-radius: var(--tr-radius-md);
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-outline-modern:hover {
    background: var(--tr-gold);
    color: #062016;
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.22);
    text-decoration: none;
}

/* 17th Dubai Summit Specific Emerald Background & Component Overrides */

/* Body Background */
html[data-color-preset="dubai-summit"] body {
    background-color: var(--tr-bg);
}

/* ============================================
   Official Summit Brochure Section
   (Feature Card + Highlights Carousel)
   ============================================ */
.brochure-split {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}

.brochure-cover-wrap {
    perspective: 1200px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.brochure-cover {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    box-shadow: 
        -18px 22px 40px rgba(6, 32, 22, 0.28),
        0 4px 14px rgba(6, 32, 22, 0.12);
    transform: rotateY(-9deg) rotateX(2deg);
    transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.45s ease;
}

.brochure-cover:hover {
    transform: rotateY(0deg) rotateX(0deg);
    box-shadow: 
        -8px 14px 30px rgba(6, 32, 22, 0.24),
        0 4px 14px rgba(6, 32, 22, 0.1);
}

.brochure-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff;
    background: linear-gradient(135deg, #e52027 0%, #b8141a 100%);
    border-radius: var(--tr-radius-full);
    box-shadow: 0 4px 12px rgba(229, 32, 39, 0.25);
}

.brochure-feature-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--tr-text-strong);
    margin: 0.875rem 0 0.25rem;
}

.brochure-meta {
    color: var(--tr-text-muted);
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 1.25rem;
}

.brochure-note {
    font-size: 0.875rem;
    color: var(--tr-text-muted);
}

/* Carousel */
.brochure-carousel {
    position: relative;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: 16px;
    background: #062016;
    box-shadow: 
        0 20px 40px rgba(6, 32, 22, 0.22),
        0 4px 14px rgba(6, 32, 22, 0.12);
    border-top: 4px solid #D4AF37;
}

.carousel-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.33, 1, 0.68, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    margin: 0;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #062016;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(6, 32, 22, 0.35);
    transition: all 0.22s ease;
}

.carousel-btn:hover {
    background: #D4AF37;
    color: #062016;
    transform: translateY(-50%) scale(1.07);
}

.carousel-btn.prev { left: 14px; }
.carousel-btn.next { right: 14px; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(11, 110, 56, 0.22);
    cursor: pointer;
    transition: all 0.22s ease;
}

.carousel-dot.active {
    background: #D4AF37;
    transform: scale(1.25);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
}

.carousel-caption {
    text-align: center;
    margin-top: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tr-text-muted);
}

@media (max-width: 900px) {
    .brochure-split {
        grid-template-columns: 1fr;
    }
    .brochure-feature {
        order: 2;
    }
    .brochure-carousel {
        order: 1;
    }
    .carousel-btn.prev { left: 8px; }
    .carousel-btn.next { right: 8px; }
    .carousel-btn { width: 38px; height: 38px; }
}

/* Hero Banners (Inner Page Headers with Background Images) */
.hero,
.hero-fullwidth,
.hero-compact,
.hero-medium {
    position: relative;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    border-bottom: 3px solid #D4AF37;
    overflow: hidden;
}

.hero-compact {
    background-image: url('../images/backgrounds/hotel.avif');
}

.hero-medium {
    background-image: url('../images/backgrounds/sangam5.png');
}

.hero-fullwidth {
    background-image: url('../images/backgrounds/hero-bg.jpg');
}

html[data-color-preset="dubai-summit"] .hero-overlay,
.hero-overlay {
    background: linear-gradient(135deg, rgba(4, 24, 16, 0.82) 0%, rgba(12, 51, 37, 0.78) 100%) !important;
}

/* Section Backgrounds - Forest Emerald Variations */
html[data-color-preset="dubai-summit"] .bg-midnight,
html[data-color-preset="dubai-summit"] .section-midnight {
    background: linear-gradient(135deg, #03140D 0%, #0A2B1F 100%) !important;
    border-top: 1px solid rgba(212, 175, 55, 0.18);
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
}

.event-highlights .card-text,
.event-highlights .lead {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 400;
    line-height: 1.7;
}

.event-placeholder {
    cursor: default;
}

.event-placeholder:hover {
    transform: none;
}

.is-disabled {
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.strategic-pillar-grid {
    align-items: stretch;
}

.strategic-pillar-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.strategic-pillar-card .icon-lg {
    margin-bottom: 0.25rem;
}

.strategic-pillar-card .card-title {
    margin: 0;
}

.strategic-pillar-card .card-text {
    margin-bottom: 0;
}

.summit-final-word {
    max-width: 900px;
    margin: 3rem auto 0;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--tr-gold);
    border-bottom: 1px solid var(--tr-gold);
}

.fta-section {
    background: var(--tr-bg-elevated);
}

.fta-section .split-layout {
    align-items: center;
}

.fta-section p {
    line-height: 1.75;
}

.fta-section .btn {
    margin-top: 0.75rem;
}

.fta-focus-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.fta-focus-card {
    padding: 1.5rem;
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-lg);
    background: var(--tr-bg);
    box-shadow: var(--tr-shadow-sm);
}

.fta-focus-card h3 {
    font-size: 1.1rem;
    margin: 0.75rem 0 0.5rem;
}

.fta-focus-card p {
    color: var(--tr-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

.summit-speakers .lead {
    color: rgba(255, 255, 255, 0.8) !important;
}

.speaker-grid,
.mini-summit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.speaker-card,
.mini-summit-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: var(--tr-radius-lg);
    background: rgba(255, 255, 255, 0.06);
}

.speaker-card img {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    object-fit: contain;
    border-radius: var(--tr-radius-md);
    background: #ffffff;
}

.speaker-card h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.mini-summit-card h4 {
    color: var(--tr-text-strong) !important;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.speaker-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.mini-summit-card p {
    color: var(--tr-text-muted) !important;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.mini-summit-card {
    background: var(--tr-bg-elevated);
    border-color: var(--tr-border);
}

.mini-summit-card img {
    width: 120px;
    height: 82px;
    flex: 0 0 120px;
    object-fit: contain;
    border-radius: var(--tr-radius-md);
    background: #ffffff;
}

.mini-summit-card .mini-summit-leader {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 50%;
}

@media (max-width: 700px) {
    .speaker-grid,
    .mini-summit-grid {
        grid-template-columns: 1fr;
    }

    .speaker-card,
    .mini-summit-card {
        align-items: flex-start;
    }

    .fta-focus-grid {
        grid-template-columns: 1fr;
    }
}

html[data-color-preset="dubai-summit"] .bg-slate {
    background-color: #0C3325 !important;
}

html[data-color-preset="dubai-summit"] .bg-light {
    background-color: var(--tr-bg-elevated) !important;
}

html[data-color-preset="dubai-summit"] .bg-white,
html[data-color-preset="dubai-summit"] .section-white {
    background-color: var(--tr-bg) !important;
}

/* Split Section Overlays */
html[data-color-preset="dubai-summit"] .split-overlay {
    background: linear-gradient(135deg, rgba(250, 251, 248, 0.97) 0%, rgba(234, 242, 236, 0.94) 100%) !important;
}

html[data-color-preset="dubai-summit"][data-theme="dark"] .split-overlay,
html[data-color-preset="dubai-summit"].dark .split-overlay {
    background: linear-gradient(135deg, rgba(6, 32, 22, 0.97) 0%, rgba(12, 51, 37, 0.94) 100%) !important;
}

/* Cards & Content Containers */
html[data-color-preset="dubai-summit"] .card {
    background-color: var(--tr-bg-elevated);
    border: 1px solid var(--tr-border);
    transition: all 0.25s ease;
}

html[data-color-preset="dubai-summit"] .card:hover {
    border-color: #D4AF37 !important;
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.15) !important;
}

html[data-color-preset="dubai-summit"] .card-dark {
    background-color: #0C3325 !important;
    border: 1px solid rgba(212, 175, 55, 0.22) !important;
    color: #ffffff !important;
}

/* Primary & Action Buttons */
html[data-color-preset="dubai-summit"] .btn-primary {
    background: linear-gradient(135deg, #e52027 0%, #b8141a 100%) !important;
    color: #ffffff !important;
    border-color: #e52027 !important;
    box-shadow: 0 4px 12px rgba(229, 32, 39, 0.25);
    font-weight: 700;
}

html[data-color-preset="dubai-summit"] .btn-primary:hover {
    background: linear-gradient(135deg, #c0141b 0%, #900c11 100%) !important;
    border-color: #c0141b !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(229, 32, 39, 0.35);
}

html[data-color-preset="dubai-summit"] .btn-ghost {
    color: #0b6e38 !important;
    border-color: #0b6e38 !important;
}

html[data-color-preset="dubai-summit"] .btn-ghost:hover {
    background: #0b6e38 !important;
    color: #ffffff !important;
}

/* Badges & Highlights */
html[data-color-preset="dubai-summit"] .badge-gold {
    background: linear-gradient(135deg, #D4AF37 0%, #B8942D 100%) !important;
    color: #062016 !important;
}

html[data-color-preset="dubai-summit"] .badge-green {
    background: #0b6e38 !important;
    color: #ffffff !important;
}

html[data-color-preset="dubai-summit"] .badge-red {
    background: #e52027 !important;
    color: #ffffff !important;
}

html[data-color-preset="dubai-summit"] .stat-number {
    color: #D4AF37 !important;
}

/* Footer Styling */
html[data-color-preset="dubai-summit"] #footer {
    background: #03140D !important;
    border-top: 2px solid #D4AF37;
}


/* ============================================
   2. Rise Classic Theme Preset (rise-classic)
   ============================================ */
html[data-color-preset="rise-classic"],
html[data-color-preset="rise-classic"][data-theme="light"] {
    --tr-bg: #ffffff;
    --tr-bg-elevated: #f8fafc;
    --tr-bg-muted: #f1f5f9;
    --tr-bg-inverse: #0f172a;

    --tr-text: #1e293b;
    --tr-text-strong: #0f172a;
    --tr-text-muted: #64748b;
    --tr-text-inverse: #ffffff;

    --tr-gold: #D4AF37;
    --tr-gold-light: #E8C84A;
    --tr-gold-dark: #B8942D;
    --tr-emerald: #10B981;
    --tr-emerald-light: #34D399;
    --tr-emerald-dark: #059669;

    --tr-midnight: #0f172a;
    --tr-slate: #1e293b;

    --tr-accent: #D4AF37;
    --tr-accent-contrast: #ffffff;
    --tr-link: #D4AF37;

    --tr-nav-bg: rgba(255, 255, 255, 0.95);
}

html[data-color-preset="rise-classic"][data-theme="dark"],
html[data-color-preset="rise-classic"].dark {
    --tr-bg: #0f172a;
    --tr-bg-elevated: #1e293b;
    --tr-bg-muted: #334155;
    --tr-bg-inverse: #ffffff;

    --tr-text: #e2e8f0;
    --tr-text-strong: #f8fafc;
    --tr-text-muted: #94a3b8;
    --tr-text-inverse: #0f172a;

    --tr-gold: #E8C84A;
    --tr-gold-light: #F0D85C;
    --tr-gold-dark: #D4AF37;
    --tr-emerald: #34D399;

    --tr-accent: #E8C84A;
    --tr-accent-contrast: #0f172a;
    --tr-link: #E8C84A;

    --tr-nav-bg: rgba(15, 23, 42, 0.95);
}
