/*******************************************************
 MAIN AND GLOBAL
*******************************************************/
* { font-family: system-ui, sans-serif; margin:0; padding:0; box-sizing:border-box; }
.body { 
    min-width: 320px; 
    margin: 0; 
    padding: 0; 
    font-size: clamp(0.92rem, 1.5vw, 1.15rem); /* Scaled down base font */
    color: #333333; 
    font-weight: 400; 
    text-align: center; 
    height: 100%; 
    overflow-x: hidden; 
    position: relative; 
    line-height: 1.62;
}
a { 
    font-size: inherit; 
    color: #1f5979; 
    text-decoration: none;
}
a:hover { color: #103142; }
* { box-sizing: border-box; }
.ignore-border-box { box-sizing: content-box; }
.small_box { width: 85%; max-width: 780px; margin: 0 auto; }

:root {
    --hero-size: clamp(1.6rem, 2vw, 2.8rem);
    --heading-size: clamp(1.2rem, 4cqi, 1.4rem);
    --font-main: clamp(1.1rem, 1.6vw, 1.2rem);
}

/*******************************************************
 TEXT AND FONT FORMATTING
*******************************************************/

.number { font-family: system-ui, sans-serif; }
.text-label { color: #9E9E9E !important; }
.red { color: #BA2323 !important; }
.dark_blue { color: #173e53 !important; }
.blue { color: #1f5979 !important; }
.light_blue { color: #4cbeff !important; }
.green { color: #166534 !important; }
.white { color: #FFFFFF !important; }
.light_gray { color: #999 !important; }
.gray { color: #656565 !important; }
.dark_gray { color: #343538 !important; }
.orange { color: #e67e22 !important; }
.light-orange { color: rgba(230, 126, 34, 0.80) !important; font-weight: 700 !important; }
.pop { color: #d35400 !important; font-weight: 700; }


.left { text-align: left; }
.right { text-align: right; }
.center { text-align: center; }

.link-blue {
    display:inline-block;
    position:relative;
    font-size:15.5px; /* Slightly reduced */
    font-weight:600;
    color:#1f5979;
    text-decoration:none;
    padding-bottom:3px;
    background-image:linear-gradient(currentColor,currentColor);
    background-size:0% 2px;
    background-position:0 100%;
    background-repeat:no-repeat;
    transition:color .28s ease,background-size .32s ease,text-shadow .28s ease,transform .18s ease;
}
.link-blue:hover,.link-blue:focus{
    color:#0e4a68;
    text-shadow:0 1px 2px rgba(31,89,121,.25);
    background-size:100% 2px;
    outline:none;
}
.link-blue:focus{text-shadow:0 1px 3px rgba(31,89,121,.3)}
.link-blue:active{color:#0c3d59;transform:translateY(1px)}
.link-blue:visited{color:#1a5370}
.link-blue.plain,.link-blue[aria-current="page"]{background-image:none;padding-bottom:0}
.link-blue.plain:hover,.link-blue[aria-current="page"]:hover{background-size:0% 2px}

.justify-modern {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  hyphenate-limit-chars: 6 3 2;
  line-height: 1.62;
  text-align-last: left;
  font-kerning: normal;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "pnum" 1, "tnum" 0;
  hanging-punctuation: first last;
  letter-spacing: 0.01em;
  orphans: 3;
  widows: 3;
  text-wrap: pretty;
  text-balance: pretty;
}

.prose {
  font-family: "Inter", "Fraunces", "Charter", system-ui, serif;
  font-variation-settings: "opsz" 14, "GRAD" 0;
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 1rem;
  font-size: clamp(1rem, 1.8vw, 1.2rem); /* Scaled down */
}

.font-heading { 
    font-size: 18px;
    font-weight: 600; 
    /* margin: 12px auto 20px;  */
}
.font-main-small { 
    font-size: calc(var(--font-main) * 0.8) !important; 
    margin: 10px auto 20px; 
}
.verification-code { 
    font-family: 'Courier New', monospace; 
    background: #e3f2fd; 
    color: #1565c0; 
    padding: 0px 14px; 
    border-radius: 8px; 
    font-weight: bold; 
    letter-spacing: 1.5px; 
    font-size: 1.1rem; /* Reduced */
    display: inline-block; 
}
.font-small { 
    font-size: calc(var(--font-main) * 0.9) !important; 
}

/*******************************************************
 SPACERS
*******************************************************/
.page-spacer { padding-top: 30px; }
.spacer-large { padding-top: 25px; }
.spacer { padding-top: 20px; }
.spacer-small { padding-top: 15px; }
.spacer-tiny { padding-top: 10px; }

.spacer-margin-large { padding-top: 25px; padding-bottom: 25px; }
.spacer-margin { padding-top: 20px; padding-bottom: 20px; }
.spacer-margin-small { padding-top: 15px; padding-bottom: 15px; }
.spacer-maring-tiny { padding-top: 10px; padding-bottom: 10px; }

.status-completed   { background: #e8f5e8; color: #2e7d32; border: 1px solid #a5d6a7; }
.status-inprogress  { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe082; }
.status-notstarted  { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

/*******************************************************
 BOXES
*******************************************************/
.course-section-container { max-width: 1350px; margin: 0 auto; text-align: center; }
.course-grid { display: grid; grid-template-columns: 1fr; gap: 35px; max-width: 1350px; margin: 0 auto 0px auto; }
.course-column { display: flex; flex-direction: column; gap: 35px; }

.course-list-box { background: #f8fafc; border-radius: 11px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,0.06); margin-top: 12px; }
.course-row-link { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #fff; 
    text-decoration: none; 
    color: #1e293b; 
    transition: all .25s ease; 
    border-bottom: 2px solid #f1f5f9; 
    flex-wrap: nowrap; 
    gap: 10px; 
    padding: 0px 0px; 
}
.course-row-link:last-child { border-bottom: none; }
.course-row-link:hover { background: #f0f9ff; transform: translateX(4px); }
.course-row-title, .course-item-price { 
    font-size: 16px;
    font-weight: 500; 
    white-space: normal; 
    line-height: 1; 
}
.course-row-title { 
    flex: 1; 
    min-width: 0; 
    padding-right: 0px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    overflow-wrap: break-word; 
    word-wrap: break-word; 
    word-break: break-word; 
    hyphens: auto; 
}
.course-item-price { 
    flex-shrink: 0; 
    color: #e67e22; 
    text-align: right; 
}
.price {
   color: #e67e22;
    font-size: 16px;
    font-weight: 500; 
    white-space: normal; 
    line-height: 1;
    flex-shrink: 0; 
    color: #e67e22; 
}
.page-wrapper { max-width: 1350px; margin: 0 auto; text-align: center; }
.page-wrapper-small { width: 90%; max-width: 720px; margin: 0 auto; }

.email_message { 
    height: 0; 
    max-height: 0; 
    overflow: hidden; 
    transition: all 0.35s ease-out; 
    opacity: 0; 
    margin: 0; 
    padding: 0 0; 
    line-height: 1.4; 
    font-size: 13.5px; 
}
.email_message.email_message_show { 
    height: auto; 
    max-height: 110px; 
    margin-bottom: 20px; 
    opacity: 1; 
}

.card {
    background: #FFFFFF;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.grid-2, .grid-3 { padding: 0px; margin: 0px; }

@media (min-width: 768px) {
    .grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.9rem;
    }
    .grid-3 {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.9rem;
    }
}

@media (min-width: 1921px) {
    .course-row-link { padding: 16px 20px; min-height: 70px; }
}
@media (min-width: 1621px) {
    .course-row-link { padding: 16px 20px; min-height: 55px; }
}
@media (max-width: 1920px) {
    .course-section-container { max-width: 1300px; }
    .course-row-link { padding: 16px 20px; min-height: 50px; }
}
@media (max-width: 900px) {
    .page-wrapper-small { width: 100%; max-width: 550px; margin: 0 auto; }
}
@media (max-width: 768px) {
    .course-row-link {
        padding: 10px 20px 10px 20px;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 5px;

    }
    .course-row-title {
        margin: 0;
        justify-content: left;
        padding-right: 0;
        text-align: left;
    }
    .course-item-price {
        padding-left: 5px;
        text-align: right;
    }
}
@media (max-width: 500px) {
    .welcome-grid { gap: 25px; padding: 0; }
    .course-group-minimal:nth-child(n+2) { padding: 0px; }
}
@media (max-width: 480px) {
    .welcome-grid { padding: 0px 12px; gap: 25px; }
}

/*******************************************************
 DIALOGS AND OVERLAYS
*******************************************************/
@keyframes fadeInScale {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.heading-dialog { font-size: var(--heading-size); font-weight: 600; line-height: 1.2; }
.heading-dialog-large { font-size: clamp(1.3rem, 4vw, 1.8rem); font-weight: 600; line-height: 1.2; }

.dialog, .dialog2 {
    height: auto;
    max-width: 95%;
    max-height: 90%;
    background-color: #fff;
    padding: 18px 20px 18px 20px;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11001;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: visible;
    overflow: visible !important;
    contain: none !important;
    display: none;
    opacity: 0;
    border-radius: 18px;
    box-shadow: 0 9px 28px rgba(0, 0, 0, 0.14);
    transition: opacity 0.6s;
}
.dialog_show { display: block !important; animation: fadeInScale 0.5s ease-out forwards; }
.dialog-inner {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;

    /* Always reserve space → no content jump when scrollbar appears */
    scrollbar-gutter: stable both-edges;

    /* Nice thin scrollbar (Firefox) */
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 100, 100, 0.5) transparent;

    /* Default: no extra padding (clean look when no scrollbar) */
    padding-right: 0;
}

/* Custom scrollbar style (Chrome/Edge/Safari) */
.dialog-inner::-webkit-scrollbar {
    width: 12px;
}

.dialog-inner::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
}

/* Apply padding ONLY when vertical scrollbar is visible */
@supports selector(::-webkit-scrollbar) {
    .dialog-inner:has(::-webkit-scrollbar:vertical) {
        padding-right: 20px;  /* Your desired inset — only when needed */
    }
}

.dialog_no_effect { 
    background-color: #fff; 
    padding: 25px 18px; 
    text-align: center; 
    min-width: 280px; 
    min-height: 160px; 
    position: fixed; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    z-index: 11001; 
    overflow-y: auto; 
    display: none; 
    opacity: 0; 
}

.dialog_close_button {
    position: absolute;
    top: -75px;
    right: -12px;
    z-index: 99999;
    background: none;
    border: none;
    font-size: 48px;
    font-weight: 100;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    cursor: pointer;
    width: 75px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    line-height: 1;
}

.loader {
  width: 55px;
  height: 55px;
  border: 7px solid #f0f0f0;
  border-top: 7px solid #4a90e2;
  border-radius: 50%;
  animation: calm-spin 1.8s linear infinite;
  margin: auto;
  box-shadow: 0 0 18px rgba(74, 144, 226, 0.2);
}
.loader-small {
  width: 36px;
  height: 36px;
  border: 7px solid #f0f0f0;
  border-top: 7px solid #4a90e2;
  border-radius: 50%;
  animation: calm-spin 1.8s linear infinite;
  margin: auto;
  box-shadow: 0 0 18px rgba(74, 144, 226, 0.2);
}
.loader-tiny {
  width: 18px;
  height: 18px;
  border: 7px solid #f0f0f0;
  border-top: 7px solid #4a90e2;
  border-radius: 50%;
  animation: calm-spin 1.8s linear infinite;
  margin: auto;
  box-shadow: 0 0 18px rgba(74, 144, 226, 0.2);
}

@keyframes calm-spin {
  0% { transform: rotate(0deg); border-top-color: #4a90e2; }
  50% { border-top-color: #a0c4ff; }
  100% { transform: rotate(360deg); border-top-color: #4a90e2; }
}

@media (max-width: 799px) {
    .dialog, .dialog2 { 
        padding: 18px 18px 28px 18px; 
        max-width: 92%; 
        max-height: calc(100vh - 140px); 
    }
    .dialog_no_effect { padding: 18px; min-width: 280px; min-height: 160px; }
}

@media (min-width: 1080px) { 
    .course-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
    .gray-page-grid { grid-template-columns: 1fr 1fr; gap: 35px;}
}
@media (max-width: 380px) { 
    .contact-lang-container { display: none; }
}

@supports not (text-wrap: balance) {
    .box_header p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
}

/*******************************************************
BOXES (below-the-fold)
*******************************************************/
.welcome-grid h2 { font-size: 1.35rem; margin-bottom: 14px; color: #1e293b; }
.welcome-grid { max-width: 1350px; margin: 0 auto; padding: 0px 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 35px; text-align: center; }
.box-xlarge { width: 100% !important; }
.box-huge { max-width: 1600px !important; margin: auto; }
.box-large { max-width: 1350px !important; margin: auto;}
.box-normal { max-width: 1050px !important; margin: auto; }
.box-small { max-width: 780px !important; margin: auto; }
.box-xsmall { max-width: 520px !important; margin: auto; }
.box-tiny { max-width: 340px !important; margin: auto; }

.box-item { background: rgba(255,255,255,0.88); backdrop-filter: blur(12px); border-radius: 8px; padding: clamp(24px, 3.5vw, 34px) clamp(20px, 3.5vw, 30px); box-shadow: 0 6px 10px rgba(0,0,0,0.08); transition: transform 0.35s ease; container-type: inline-size; }
.box-item-small { background: rgba(255,255,255,0.88); backdrop-filter: blur(12px); border-radius: 26px; padding: 16px; box-shadow: 0 22px 65px rgba(0,0,0,0.08); transition: transform 0.35s ease; container-type: inline-size; }

.box-item-title { display: block; margin: 0 0 clamp(0.6rem, 3cqi, 1.6rem) 0; font-weight: 700; line-height: 1.2; font-size: clamp(1.2rem, 4cqi, 1.6rem); text-shadow: 0 2px 4px rgba(0,0,0,0.1); text-align: center; }
.box-item-title-small { display: block; margin: 0 0 clamp(0.6rem, 3cqi, 1.6rem) 0; font-weight: 700; line-height: 1.2; font-size: clamp(1.15rem, 3.5cqi, 1.45rem); text-shadow: 0 2px 4px rgba(0,0,0,0.1); text-align: center; }
.box-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }

@media (max-width: 1620px) { .welcome-grid { grid-template-columns: 1fr 1fr; gap: 45px 30px; } }
@media (max-width: 1200px) and (min-width: 801px) {
    .welcome-grid { grid-template-columns: 1fr 1fr; gap: 45px 30px; }
    .welcome-grid > .seal-item { grid-column: 1 / -1; order: -1; margin-bottom: 30px; }
    .course-section-container { max-width: 100%; margin: 0 auto; text-align: center; }
}
@media (max-width: 900px) {
    .welcome-grid { grid-template-columns: 1fr; gap: 30px; padding: 0px 20px; }
    .welcome-grid > .seal-item { order: -1; margin-bottom: 22px; }
    .box-grid { grid-template-columns: 1fr; }
    .page-wrapper-small { width: 100%; max-width: 520px; margin: 0 auto; }
}

/*******************************************************
ADDITIONAL SECTION STYLES & MEDIA QUERIES
*******************************************************/
.heading-section { font-size: var(--heading-size); font-weight: 700; line-height: 1.2; margin: 0 0 42px 0; display: inline-block; }
.box-heading-margin { margin: 0 0 16px 0 !important; }
.heading-section-medium { font-size: calc(var(--hero-size) * 0.66); font-weight: 700; line-height: 1.2; margin: 0 0 42px 0; display: inline-block; max-width: 1200px; }
.heading-section-small { font-size: calc(var(--hero-size) * 0.46); font-weight: 700; line-height: 1.2; margin: 0 0 42px 0; display: inline-block; }
.box-light-blue { background: linear-gradient(135deg, #3a91c4 0%, #4cbeff 100%); color: white; }
.box-green { background: #f0fdfa; color: #166534; }
.box-gray { background: linear-gradient(135deg, #a5a5a5 0%, #f0f9ff 100%); }
.box-light-gray { background: linear-gradient(135deg, #f5f7fa 0%, #eef2f7 100%); }
.box-red { background: linear-gradient(135deg, #faeaea 0%, #fffcfc 100%); }
.box-orange { background: linear-gradient(135deg, #fff3e0 0%, #fffaf0 100%); }
.box-top-padding { padding-top: 28px; }

@media (min-width: 1921px) { .hero h1 { max-width: 1700px; } }
@media (max-width: 1920px) { .hero, .hero-course { padding: 30px 10px 30px; } .hero h1 { max-width: 85%; } .hero p, .verify-box p, .account-cta p { font-size: clamp(0.92rem, 1.05rem + 0.25vw, 1.1rem); } }
@media (max-width: 1200px) { .hero h1 { max-width: 85%; } }
@media (max-width: 768px) { .hero, .hero-course { padding: 45px 10px 45px; } }
@media (max-width: 640px) { .hero h1 { max-width: 100%; } .hero p, .verify-box p, .account-cta p { max-width: 90%; font-size: clamp(1rem, 3.5vw, 1.35rem); line-height: 1.42; } }
@media (max-width: 480px) { .hero, .hero-course { padding: 30px 10px 30px; } }

/* Clear button variants (rarely used above fold) */
.button-clear { position: relative; display: inline-block; width: auto; min-width: 160px; text-align: center; font-weight: 700; border-radius: 50px; cursor: pointer; transition: background 0.35s ease; box-shadow: 0 3px 9px rgba(0,0,0,0.1); text-decoration: none; overflow: hidden; }
.clear-button { position: relative; display: inline-block; width: auto; min-width: 160px; padding: 11px 24px; text-align: center; font-weight: 700; font-size: 0.96rem; line-height: 1.2; border-radius: 50px; cursor: pointer; transition: background 0.35s ease; box-shadow: 0 3px 9px rgba(0,0,0,0.1); text-decoration: none; overflow: hidden; }
.clear-dark-blue { border:2.2px solid #0A5A82; color:#0A5A82; }
.clear-dark-blue:hover { background:#0A5A82; color:white; }
.clear-black { border:2.2px solid #343538; color:#343538; }
.clear-black:hover { background:#343538; color:white; }
.clear-orange { border:2.2px solid #d15921; color:#d15921; }
.clear-orange:hover { background:#d15921; color:white; }
.clear-green { border:2.2px solid #428000; color:#428000; }
.clear-green:hover { background:#428000; color:white; }
.clear-red { border:2.2px solid #751719; color:#751719; }
.clear-red:hover { background:#751719; color:white; }
.clear-clear-black { color:#343538; }
.clear-clear-black:hover { color:#0A5A82; }
.wide_button { width: 340px; }
@media (max-width: 480px) { .wide_button { width: 100%; } }

.box-main {
    width: 100%;
    background: white; 
    border-radius: 12px; 
    box-shadow: 0 6px 25px rgba(0,0,0,0.1); 
}

/* Compact Course Progress Card — 3-column layout with middle badge */
.course-progress-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    padding: 1rem 1.1rem;
    margin: 0.75rem 0;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.course-progress-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0,0,0,0.10);
}

.course-progress-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.course-progress-link:hover .course-progress-card {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.11);
}

.course-progress-title {
    font-size: clamp(1.1rem, 3.2vw, 1.28rem);
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.8rem 0;
    line-height: 1.25;
    text-align: center;
}

.course-progress-meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;     /* left | center (badge) | right */
    align-items: center;                      /* vertical alignment */
    gap: 0.8rem 1.2rem;                       /* column gap a bit wider for badge breathing room */
    font-size: 0.92rem;
    row-gap: 0.6rem;                          /* if it wraps on narrow tablets */
}

.course-progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.course-progress-item.centered {
    text-align: center;
}

.course-progress-label {
    font-weight: 500;
    color: #666;
    font-size: 0.84rem;
}

.course-progress-value {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.course-badge {
    display: inline-block;
    padding: 0.42em 1em;
    border-radius: 1.5rem;
    font-weight: 600;
    font-size: 0.86rem;
    letter-spacing: 0.25px;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
}

/* Status colors */
.course-badge.status-completed   { background: #e8f5e8; color: #2e7d32; border: 1px solid #a5d6a7; }
.course-badge.status-inprogress  { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe082; }
.course-badge.status-notstarted  { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }

/* Mobile: stack everything vertically */
@media (max-width: 720px) {           /* breakpoint a bit higher so 3-col feels good longer */
    .course-progress-meta {
        grid-template-columns: 1fr;
        gap: 0.9rem;
        row-gap: 1rem;
    }
    
    .course-progress-item,
    .course-progress-item.centered {
        text-align: center;
    }
    
    .course-progress-title {
        margin-bottom: 0.7rem;
    }
    
    .course-progress-card {
        padding: 0.95rem 1rem;
        margin: 0.6rem 0;
    }
}