/*
 Theme Name: Divi Child - UPATH
 Template: Divi
 Version: 1.1
 Description: UPATH SG child theme — palette restored to original brand colours
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
    --pink: #ff304f;
    --pink-light: #fff0f2;
    --teal: #00798c;
    --teal-light: #e6f4f6;
    --dark: #173f5f;
    --blue: #20639B;
    --blue-light: #497fad;
    --gray: #999999;
    --light-gray: #efefef;
    --border: #e8e8e8;
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Lato', sans-serif;
    --max-width: 1100px;
    --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    color: var(--dark);
    background: #fff;
    line-height: 1.6;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ============================================================
   HEADER
   ============================================================ */
.upath-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
}

.upath-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.upath-logo img { height: 52px; width: auto; display: block; }

.upath-nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

.upath-nav ul li a {
    color: var(--dark);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.upath-nav ul li a:hover {
    background: var(--teal-light);
    color: var(--teal);
    text-decoration: none;
}

.upath-nav .has-dropdown { position: relative; }

.upath-nav .has-dropdown .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
}

.upath-nav .has-dropdown:hover .dropdown { display: flex; }
.upath-nav .has-dropdown .dropdown li a {
    padding: 8px 16px;
    border-radius: 0;
    display: block;
    font-size: 0.85rem;
}

.upath-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.upath-btn-primary {
    display: inline-block;
    background: transparent;
    color: var(--pink);
    border: 2px solid var(--pink);
    padding: 12px 32px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.upath-btn-primary:hover {
    background: var(--pink);
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   HERO
   ============================================================ */
.upath-hero {
    padding: 80px 24px 64px;
    text-align: center;
    background: #fff;
}

.upath-hero-inner { max-width: 700px; margin: 0 auto; }

.upath-hero-sub {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pink);
    font-weight: 700;
    margin-bottom: 16px;
}

.upath-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.1;
}

.upath-hero-desc {
    font-size: 1.05rem;
    color: var(--gray);
    margin-bottom: 36px;
    line-height: 1.7;
}

/* ============================================================
   MISSION
   ============================================================ */
.upath-mission { padding: 60px 24px; background: var(--light-gray); }

.upath-mission-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.upath-mission-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    border: 1px solid var(--border);
}

.upath-mission-icon { font-size: 2rem; margin-bottom: 16px; }

.upath-mission-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.upath-mission-card p { font-size: 0.9rem; color: var(--gray); line-height: 1.7; }

/* ============================================================
   SEARCH
   ============================================================ */
.upath-search-section { padding: 48px 24px; background: #fff; }
.upath-search-inner { max-width: 700px; margin: 0 auto; }

.upath-search-inner form {
    display: flex;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.upath-search-inner input[type="search"] {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
    border: none;
    outline: none;
    font-family: var(--font-body);
}

.upath-search-inner input[type="submit"] {
    padding: 14px 28px;
    background: var(--teal);
    color: #fff;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.upath-search-inner input[type="submit"]:hover {
    background: var(--dark);
}

/* ============================================================
   BROWSE BY COURSES
   ============================================================ */
.upath-browse { padding: 60px 24px; background: var(--light-gray); }
.upath-browse-inner { max-width: var(--max-width); margin: 0 auto; }

.upath-browse-inner h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 36px;
}

.upath-browse-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.upath-browse-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.upath-browse-card:hover {
    box-shadow: 0 8px 24px rgba(0,121,140,0.12);
    transform: translateY(-2px);
}

.upath-browse-icon { font-size: 2.5rem; margin-bottom: 12px; }

.upath-browse-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.upath-browse-link { font-size: 0.85rem; color: var(--teal); font-weight: 600; }

/* ============================================================
   FRESH TAKES
   ============================================================ */
.upath-fresh { padding: 60px 24px; background: #fff; }
.upath-fresh-inner { max-width: var(--max-width); margin: 0 auto; }

.upath-fresh-inner h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 36px;
}

.upath-fresh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.upath-fresh-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
    transition: box-shadow 0.2s;
}

.upath-fresh-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.upath-fresh-cat {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal);
    margin-bottom: 10px;
}

.upath-fresh-card h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.upath-fresh-card h3 a { color: var(--dark); }
.upath-fresh-card h3 a:hover { color: var(--teal); text-decoration: none; }
.upath-fresh-card p { font-size: 0.88rem; color: var(--gray); line-height: 1.6; margin-bottom: 16px; }
.upath-read-more { font-size: 0.85rem; color: var(--teal); font-weight: 600; }

/* ============================================================
   STATS
   ============================================================ */
.upath-stats { padding: 60px 24px; background: var(--dark); }

.upath-stats-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 80px;
    text-align: center;
}

.upath-stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.upath-stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--blue-light);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ============================================================
   CONTACT
   ============================================================ */
.upath-contact { padding: 60px 24px; background: #fff; }
.upath-contact-inner { max-width: 700px; margin: 0 auto; }

.upath-contact-inner h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.upath-contact-inner > p { color: var(--gray); margin-bottom: 32px; }
.upath-form { display: flex; flex-direction: column; gap: 16px; }
.upath-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.upath-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: var(--light-gray);
    color: var(--dark);
    outline: none;
    transition: border-color 0.2s;
}

.upath-input:focus { border-color: var(--teal); background: #fff; }
.upath-textarea { resize: vertical; }

/* ============================================================
   FOOTER
   ============================================================ */
.upath-footer { background: var(--dark); color: #ccc; padding: 48px 24px 32px; }

.upath-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.upath-footer-logo img { height: 44px; opacity: 0.85; }
.upath-footer-links { display: flex; gap: 24px; }
.upath-footer-links a { color: #ccc; font-size: 0.9rem; transition: color 0.2s; }
.upath-footer-links a:hover { color: var(--teal); text-decoration: none; }
.upath-footer-disclaimer { font-size: 0.8rem; color: #aaa; max-width: 600px; line-height: 1.6; }
.upath-footer-copy { font-size: 0.8rem; color: #888; }
.upath-footer-copy a { color: #aaa; }

/* ============================================================
   ARTICLE TEMPLATE
   ============================================================ */
body.single-post { background: #fff; }
body.single-post #sidebar,
body.single-post .et_pb_widget_area_right { display: none !important; }

.upath-article-wrap {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 24px;
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.upath-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.upath-sidebar .click-to-section {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.upath-sidebar .click-to-section h4 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--dark);
    margin: 0 0 14px 0;
}

.upath-sidebar .click-to-section ol { margin: 0; padding-left: 18px; }
.upath-sidebar .click-to-section ol li { margin-bottom: 8px; }

.upath-sidebar .click-to-section ol li a {
    color: var(--teal);
    font-size: 0.85rem;
    text-decoration: none;
    line-height: 1.4;
    font-weight: 600;
}

.upath-sidebar .click-to-section ol li a:hover { text-decoration: underline; }

.upath-dropdown {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.upath-dropdown summary {
    padding: 14px 16px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    color: var(--dark);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upath-dropdown summary::-webkit-details-marker { display: none; }
.upath-dropdown summary::after { content: '+'; font-size: 1.2rem; color: var(--teal); }
.upath-dropdown[open] summary::after { content: '−'; }

.upath-dropdown-content {
    padding: 4px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upath-dropdown-content a {
    display: block;
    padding: 5px 0;
    color: var(--teal);
    font-size: 0.8rem;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
}

.upath-dropdown-content a:last-child { border-bottom: none; }
.upath-dropdown-content a:hover { text-decoration: underline; }

.upath-content { flex: 1; min-width: 0; }

.upath-content h1.entry-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.upath-content .entry-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 32px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.upath-content .entry-content h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    margin: 48px 0 16px 0;
    padding-top: 16px;
    border-top: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.upath-content .entry-content h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--teal);
    margin: 24px 0 10px 0;
    line-height: 1.5;
}

.upath-content .entry-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
    margin: 16px 0 6px 0;
}

.upath-content .entry-content p {
    font-size: 1rem;
    line-height: 1.85;
    color: #333 !important;
    margin-bottom: 16px;
}

.upath-content .entry-content li {
    color: #333 !important;
    line-height: 1.8;
    margin-bottom: 6px;
}

.upath-content .entry-content ul,
.upath-content .entry-content ol { padding-left: 24px; margin-bottom: 16px; }

.upath-content .entry-content blockquote {
    border-left: 4px solid var(--teal);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--teal-light);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: var(--gray);
}

.upath-disclaimer {
    margin-top: 60px;
    padding: 24px;
    background: var(--teal-light);
    border-left: 4px solid var(--teal);
    border-radius: 0 8px 8px 0;
    font-size: 0.88rem;
    color: var(--gray);
    line-height: 1.7;
}

.upath-disclaimer strong {
    display: block;
    margin-bottom: 8px;
    color: var(--teal);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .upath-mission-inner,
    .upath-browse-grid,
    .upath-fresh-grid { grid-template-columns: repeat(2, 1fr); }
    .upath-stats-inner { gap: 40px; }
}

@media (max-width: 768px) {
    .upath-article-wrap { flex-direction: column; gap: 24px; }
    .upath-sidebar { width: 100%; position: static; }
    .upath-mission-inner,
    .upath-browse-grid,
    .upath-fresh-grid { grid-template-columns: 1fr; }
    .upath-stats-inner { flex-direction: column; gap: 32px; }
    .upath-form-row { grid-template-columns: 1fr; }
    .upath-nav { display: none; }
    .upath-nav.open { display: flex; position: absolute; top: var(--header-height); left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 16px; }
    .upath-nav.open ul { flex-direction: column; width: 100%; }
    .upath-menu-toggle { display: block; }
    .upath-footer-links { flex-direction: column; gap: 12px; }
}

/* ============================================================
   HERO SEARCH (moved inside hero section)
   ============================================================ */
.upath-search-hero {
    margin-top: 28px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.upath-search-hero form {
    display: flex;
    border: 2px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.upath-search-hero input[type="search"] {
    flex: 1;
    padding: 12px 20px;
    font-size: 0.95rem;
    border: none;
    outline: none;
    font-family: var(--font-body);
}

.upath-search-hero input[type="submit"] {
    padding: 12px 24px;
    background: var(--teal);
    color: #fff;
    border: none;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.upath-search-hero input[type="submit"]:hover {
    background: var(--dark);
}
