@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Outfit:wght@400;600;800;900&display=swap');

:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --color-primary: #1a3c74;
    --color-accent: #c78e11;
    --color-accent-hover: #b07d0f;
}

body {
    font-family: var(--font-body);
    background-color: #ffffff;
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--font-heading);
}

.font-handwritten {
    font-family: var(--font-handwritten);
}

.font-academic {
    font-family: var(--font-academic);
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Redesign: Impact Banner */
.validity-banner {
    background: linear-gradient(135deg, #1a3c74 0%, #2a4c84 100%);
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 15px 30px -5px rgba(26, 60, 116, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.validity-banner .check-icon {
    background: #c78e11;
    border-radius: 99px;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    box-shadow: 0 4px 10px rgba(199, 142, 17, 0.3);
    animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.validity-banner h2 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.1;
    color: white;
}

.validity-banner p {
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #c78e11;
}

/* Info Card Refinement */
.info-card {
    background: #fcfcfc;
    border-radius: 1.25rem;
    padding: 1.25rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: #cbd5e1;
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.info-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 700;
    color: #1a3c74;
    font-size: 1.125rem;
    line-height: 1.2;
}

/* Custom styles for the certificate preview */
#previewCanvas {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background-color: white;
}

/* Scrollbar styling for better aesthetics */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* === Accordion Syllabus Styling === */
.syllabus-module {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.syllabus-module:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.syllabus-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

/* Remove default marker */
.syllabus-summary::-webkit-details-marker {
    display: none;
}

.syllabus-summary {
    list-style: none;
}

.syllabus-summary:hover {
    background: #f1f5f9;
}

.syllabus-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #eff6ff;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.syllabus-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
}

.syllabus-module[open] .syllabus-chevron {
    transform: rotate(180deg);
}

.syllabus-module[open] .syllabus-summary {
    border-bottom: 1px solid #eef2f6;
    background: #ffffff;
}

.syllabus-content {
    padding: 1.25rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.syllabus-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.syllabus-list.level-1 {
    margin-left: 0.5rem;
}

.syllabus-list.level-2 {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #f1f5f9;
}

.syllabus-list.level-3 {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #f1f5f9;
}

/* Responsive Adjustments & Desktop Optimization */
@media (max-width: 640px) {
    .syllabus-summary {
        padding: 0.875rem 1rem;
    }

    .syllabus-content {
        padding: 1rem;
    }

    .syllabus-list.level-2 {
        margin-left: 1rem;
        padding-left: 0.75rem;
    }

    /* Mobile paddings */
    .p-8,
    .p-10,
    .p-6 {
        padding: 1.25rem !important;
    }

    .validity-banner {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .validity-banner h2 {
        font-size: 1.15rem;
    }

    .info-card {
        padding: 1.15rem !important;
    }

    .info-value {
        font-size: 1rem;
    }

    .info-label {
        font-size: 0.625rem;
    }

    #mainContainer {
        border-radius: 2rem;
    }

    header {
        padding: 2.5rem 1.5rem !important;
    }

    #codeInput {
        font-size: 1rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Optimize large screen layout for premium desktop experience */
@media (min-width: 1024px) {
    #mainContainer.max-w-4xl {
        max-width: 64rem !important;
        /* Force 5xl behavior (1024px) on large screens */
    }

    /* Ensure the content split feels balanced on desktop */
    .lg\:w-80 {
        width: 24rem !important;
        /* Slightly wider academic detail column */
    }
}