/*
Theme Name: NDNurses
Theme URI: https://www.ndnurses.com.au
Author: Jessica Smithers
Description: Custom theme for Neurodiversity in Nursing research site
Version: 1.0
*/

/* ===========================
   CSS VARIABLES
=========================== */
:root {
    --navy: #00102e;
    --teal: #38A99C;
    --teal-light: #47DAC9;
    --light-blue: #EAF1FF;
    --off-white: #F4F5F7;
    --text-dark: #00102e;
    --text-light: #F4F5F7;
    --text-muted: #6D7685;
    --font-main: 'Rokkitt', serif;
    --max-width: 1125px;
    --border-radius: 4px;
}

/* ===========================
   RESET & BASE
=========================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.75;
    letter-spacing: 0.02em;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: var(--teal-light);
    text-decoration: underline;
}

a:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

ul, ol {
    padding-left: 1.5rem;
}

/* ===========================
   TYPOGRAPHY
=========================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--navy);
    margin-bottom: 1rem;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
    margin-bottom: 1.2rem;
}

/* ===========================
   LAYOUT
=========================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
}

/* ===========================
   SKIP LINK (ACCESSIBILITY)
=========================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--teal);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    border-radius: var(--border-radius);
    font-weight: 700;
}

.skip-link:focus {
    top: 1rem;
}

/* ===========================
   HEADER
=========================== */
.site-header {
    background-color: var(--navy);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo img {
    height: 50px;
    width: auto;
}

.site-logo:hover,
.site-logo:focus {
    opacity: 0.85;
    text-decoration: none;
}

/* ===========================
   NAVIGATION
=========================== */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    color: var(--off-white);
    text-decoration: none;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu .current-menu-item > a,
.nav-menu .current-page-ancestor > a {
    color: var(--teal-light);
    text-decoration: none;
}

/* Dropdown */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--navy);
    min-width: 220px;
    border-top: 2px solid var(--teal);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 200;
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu a {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    border-left: 3px solid transparent;
}

.nav-menu .sub-menu a:hover,
.nav-menu .sub-menu a:focus {
    border-left-color: var(--teal);
    background-color: rgba(56, 169, 156, 0.1);
    color: var(--teal-light);
}

/* Dropdown arrow indicator */
.nav-menu .menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 0.75rem;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid var(--off-white);
    color: var(--off-white);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    border-radius: var(--border-radius);
    font-family: var(--font-main);
}

.menu-toggle:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

/* ===========================
   HERO SECTION
=========================== */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, #003366 40%, #004466 70%, #005555 100%);
    color: var(--off-white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(56,169,156,0.15) 0%, rgba(0,16,46,0) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 850px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--teal-light);
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.hero-title {
    font-size: 2.6rem;
    line-height: 1.2;
    color: var(--off-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--teal-light);
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(244,245,247,0.85);
    max-width: 650px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: inline-block;
    background-color: var(--teal);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.hero-cta:hover,
.hero-cta:focus {
    background-color: var(--teal-light);
    color: var(--navy);
    text-decoration: none;
    transform: translateY(-2px);
}

/* ===========================
   PAGE CONTENT
=========================== */
.page-content {
    padding: 4rem 2rem;
}

.page-content .container {
    max-width: 850px;
}

.page-header {
    background-color: var(--navy);
    color: var(--off-white);
    padding: 3rem 2rem;
    text-align: center;
}

.page-header h1 {
    color: var(--off-white);
    margin-bottom: 0;
}

/* ===========================
   ENTRY CONTENT (posts/pages)
=========================== */
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--navy);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.2rem;
}

.entry-content li {
    margin-bottom: 0.4rem;
}

.entry-content blockquote {
    border-left: 4px solid var(--teal);
    padding: 1rem 1.5rem;
    background-color: var(--light-blue);
    margin: 1.5rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.entry-content table th {
    background-color: var(--navy);
    color: var(--off-white);
    padding: 0.75rem 1rem;
    text-align: left;
}

.entry-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ddd;
}

.entry-content table tr:nth-child(even) td {
    background-color: var(--light-blue);
}

/* ===========================
   BLOG / ARCHIVE
=========================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background-color: var(--light-blue);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid #dde6f5;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 4px 16px rgba(0,16,46,0.12);
    transform: translateY(-3px);
}

.post-card-body {
    padding: 1.5rem;
}

.post-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.post-card-title a {
    color: var(--navy);
    text-decoration: none;
}

.post-card-title a:hover {
    color: var(--teal);
}

.post-card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* ===========================
   SINGLE POST
=========================== */
.single-post-header {
    background-color: var(--navy);
    color: var(--off-white);
    padding: 3rem 2rem;
}

.single-post-header h1 {
    color: var(--off-white);
    max-width: 850px;
    margin: 0 auto 0.5rem;
}

.single-post-meta {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(244,245,247,0.75);
    max-width: 850px;
    margin: 0 auto;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: capitalize;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    text-decoration: none;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--teal-light);
    border-color: var(--teal-light);
    color: var(--navy);
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: var(--teal);
    border-color: var(--teal);
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--teal);
    color: #fff;
    text-decoration: none;
}

/* ===========================
   FOOTER
=========================== */
.site-footer {
    background-color: var(--navy);
    color: var(--off-white);
    padding: 3rem 2rem 1.5rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .site-logo img {
    height: 45px;
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9rem;
    color: rgba(244,245,247,0.75);
    max-width: 320px;
}

.footer-nav h3 {
    color: var(--teal-light);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav ul li {
    margin-bottom: 0.5rem;
}

.footer-nav ul a {
    color: rgba(244,245,247,0.8);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav ul a:hover,
.footer-nav ul a:focus {
    color: var(--teal-light);
    text-decoration: underline;
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 1.5rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(244,245,247,0.6);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
    html { font-size: 16px; }

    .header-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .menu-toggle {
        display: block;
    }

    .main-nav {
        width: 100%;
        order: 3;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--navy);
        padding: 0.5rem 0;
        gap: 0;
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        border-left: 3px solid var(--teal);
        padding: 0;
        display: none;
    }

    .nav-menu li.is-open > .sub-menu {
        display: block;
    }

    .nav-menu .sub-menu a {
        padding-left: 2rem;
    }

    .hero {
        padding: 4rem 1.5rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.5rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}
