/* ========================================
   47-Day SSL/TLS Presentation Styles
   Brand Identity from KICA & Sectigo
======================================== */

/* Import modern Sans-Serif font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Brand Identity */
:root {
    --primary: #0054A6;
    /* KICA Blue - Identitas Utama */
    --accent: #F7941D;
    /* KICA Orange - Highlight Penting */
    --accent-soft: #00B388;
    /* Sectigo Green - Inovasi/Status */
    --text-dark: #001221;
    /* Sectigo Dark - Teks & Judul */
    --bg-light: #FFFFFF;
    /* White - Background Utama */
    --bg-neutral: #F1F1F1;
    /* Gray Light - Background Pendukung */

    /* Additional utility colors */
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Typography Scale */
    --text-xs: 0.75rem;      /* Tags, labels */
    --text-sm: 0.875rem;     /* Secondary text */
    --text-base: 1rem;       /* Body text */
    --text-lg: 1.125rem;     /* Emphasized text */
    --text-xl: 1.25rem;      /* Subtitles */
    --text-2xl: 1.5rem;      /* Small headings */
    --text-3xl: 2rem;        /* Headings */
    --text-4xl: 2.5rem;      /* Slide titles */
    
    /* Line Heights */
    --leading-tight: 1.3;
    --leading-normal: 1.6;
    --leading-relaxed: 1.8;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    height: 100%;
    overflow: hidden;
}

/* ========================================
   Main Viewer Layout - FULL SCREEN
======================================== */
.presentation-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.slide-viewer {
    flex: 1;
    display: flex;
    background: var(--bg-light);
    overflow: hidden;
}

.slide-frame {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
}

.slide-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading Indicator */
.loading-indicator {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-neutral);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Navigation Bar */
.nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bg-light);
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    background: #003d7a;
    transform: translateY(-1px);
}

.nav-btn:disabled {
    background: var(--bg-neutral);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.nav-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.slide-counter {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    min-width: 80px;
    text-align: center;
}

/* ========================================
   Slide Common Styles
======================================== */
.slide {
    width: 100%;
    height: 100%;
    padding: 4rem 6rem;
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
    overflow: hidden;
}

.slide-header {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.slide-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: var(--leading-tight);
}

.slide-subtitle {
    font-size: var(--text-xl);
    font-weight: 400;
    color: var(--text-muted);
    line-height: var(--leading-normal);
}

.slide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ========================================
   Title Slide Specific - FULL SCREEN
======================================== */
.title-slide {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    color: var(--text-dark);
    position: relative;
    padding: 5rem 8rem;
}

/* Add subtle accent decoration */
.title-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--accent-soft) 100%);
}

.title-slide .logos {
    display: flex;
    gap: 5rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 4rem;
}

.title-slide .logos img {
    height: 120px;
    object-fit: contain;
}

.title-slide h1 {
    font-size: 5.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.title-slide h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-dark);
    max-width: 1200px;
    line-height: 1.3;
}

/* ========================================
   Content Elements
======================================== */
.highlight-box {
    background: var(--bg-neutral);
    border-left: 4px solid var(--accent);
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    position: relative;
    padding-left: 3rem;
}

.highlight-box::before {
    content: "💡";
    position: absolute;
    left: 1rem;
    top: 1.25rem;
    font-size: 1.5rem;
}

.key-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.key-points li {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    font-size: var(--text-xl);
    padding: 1.25rem 1.5rem;
    background: var(--bg-neutral);
    border-radius: 12px;
    transition: transform 0.2s ease;
    line-height: var(--leading-normal);
}

.key-points li:hover {
    transform: translateX(8px);
}

.key-point-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--bg-light);
    border-radius: 12px;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.key-point-icon.warning {
    background: var(--accent);
}

.key-point-icon.success {
    background: var(--accent-soft);
}

.key-point-text strong {
    color: var(--primary);
}

/* ========================================
   Section Header
======================================== */
.section-label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: rgba(247, 148, 29, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

/* ========================================
   Timeline & Quote
======================================== */
.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
    border-left: 2px solid var(--primary);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-content {
    font-size: var(--text-xl);
    color: var(--text-dark);
    line-height: var(--leading-normal);
}

blockquote {
    font-size: 1.1rem;
    font-style: normal;
    font-weight: 500;
    color: var(--text-dark);
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--accent-soft);
    background: rgba(0, 179, 136, 0.08);
    border-radius: 8px;
    margin-top: 1rem;
    line-height: var(--leading-normal);
}

blockquote strong {
    color: var(--accent-soft);
    font-weight: 700;
}

/* ========================================
   Tags
======================================== */
.tag {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-right: 0.5rem;
}

.tag-blue {
    background: rgba(0, 84, 166, 0.1);
    color: var(--primary);
}

.tag-orange {
    background: rgba(247, 148, 29, 0.15);
    color: #C96510;
    font-weight: 600;
}

.tag-green {
    background: rgba(0, 179, 136, 0.1);
    color: var(--accent-soft);
}

/* ========================================
   Logo Standardization
======================================== */
.slide-logos {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.slide-logos img {
    height: 30px;
    object-fit: contain;
}

.title-slide .slide-logos img {
    height: 120px;
}

/* ========================================
   Hover States & Interactions
======================================== */
.feature-item,
.benefit-card,
.comparison-box {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover,
.benefit-card:hover,
.comparison-box:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow);
}

/* ========================================
   Animations
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide {
    animation: fadeIn 0.3s ease-in;
}

.slide-content > * {
    animation: fadeIn 0.4s ease-in;
    animation-fill-mode: both;
}

.slide-content > *:nth-child(1) {
    animation-delay: 0.1s;
}

.slide-content > *:nth-child(2) {
    animation-delay: 0.2s;
}

.slide-content > *:nth-child(3) {
    animation-delay: 0.3s;
}

/* ========================================
   ASCII Diagram Standardization
======================================== */
.ascii-diagram {
    background: var(--bg-neutral);
    border-radius: 12px;
    padding: 2rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.68rem;
    line-height: 1.8;
    white-space: pre;
    overflow-x: auto;
    margin: 0;
    max-width: 100%;
    min-width: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.ascii-diagram:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow);
}

/* Click indicator for diagrams */
.ascii-diagram::after {
    content: '🔍 Klik untuk memperbesar';
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 84, 166, 0.9);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-family: 'Inter', system-ui, sans-serif;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ascii-diagram:hover::after {
    opacity: 1;
}

/* ========================================
   Modal for Full-Screen Diagrams
======================================== */
.diagram-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.2s ease;
}

.diagram-modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 3rem;
    max-width: 95%;
    max-height: 95%;
    overflow: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg-neutral);
}

/* Custom scrollbar for webkit browsers */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-neutral);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #003d7a;
}

.modal-diagram {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 1rem;
    line-height: 1.8;
    white-space: pre;
    margin: 0;
    color: var(--text-dark);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.modal-close:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-family: 'Inter', system-ui, sans-serif;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 1600px) {
    .ascii-diagram {
        font-size: 0.63rem;
        padding: 1.75rem;
    }
}

@media (max-width: 1400px) {
    .ascii-diagram {
        font-size: 0.6rem;
        padding: 1.5rem;
    }
}

@media (max-width: 1200px) {
    .ascii-diagram {
        font-size: 0.57rem;
        padding: 1rem;
    }
}

@media (max-width: 1024px) {
    .slide {
        padding: 2rem 3rem;
    }
    
    .slide-title {
        font-size: clamp(1.75rem, 3vw, 2rem);
    }
    
    .slide-subtitle {
        font-size: 1rem;
    }
    
    .title-slide {
        padding: 3rem 4rem;
    }
    
    .title-slide h1 {
        font-size: 4rem;
    }
    
    .title-slide h2 {
        font-size: 2rem;
    }
    
    .key-points li {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .key-point-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .slide {
        padding: 1.5rem 2rem;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slide-subtitle {
        font-size: 0.9rem;
    }
    
    .title-slide {
        padding: 2rem 2rem;
    }
    
    .title-slide h1 {
        font-size: 3rem;
    }
    
    .title-slide h2 {
        font-size: 1.5rem;
    }
    
    .title-slide .logos {
        flex-direction: column;
        gap: 2rem;
    }
    
    .slide-logos {
        flex-direction: column;
        gap: 0.5rem;
    }
}