/* --- Color Palette & Variables --- */
:root {
    --sage-green: #8A9A86;
    --sage-light: #F4F6F4;
    --ocean-blue: #708090;
    --ocean-light: #EBF0F2;
    --earth-green: #14595D;
    --text-dark: #3A4138;
    --white: #FFFFFF;
    --black: #000000;
    
    /* Typography Variables */
    --font-artistic: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

/* --- Reset & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: url('img/gradient.png') no-repeat center center fixed;
    background-size: cover;
    line-height: 1.6;
}

body.modal-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Global Typography Consistency Upgrades --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-artistic);
}

input, textarea, button, select {
    font-family: var(--font-body);
}

/* --- Header Layout --- */
header {
    background-color: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: center; 
}

.header-container {
    max-width: 800px; 
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center; 
    width: 100%;
}

.logo a {
    display: block;
    cursor: pointer; 
}

.logo img {
    height: 140px; 
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    gap: 1.5rem; 
    list-style: none;
    align-items: center;
}

nav li {
    display: flex;
    align-items: center;
}

nav li:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 20px; 
    background-color: var(--ocean-blue); 
    opacity: 0.55; 
    margin-left: 1.5rem; 
    pointer-events: none;
}

nav a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--earth-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--sage-green);
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(44, 53, 41, 0.45), rgba(80, 95, 110, 0.35)), url('img/mournes.jpg') no-repeat center center/cover;
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
}

.hero p {
    font-family: var(--font-artistic);
    font-size: 2.6rem;
    color: var(--white);
    text-shadow: 0 2px 14px rgba(0,0,0,0.6);
    font-style: italic;
    max-width: 800px;
}

/* --- Section Shared Styles --- */
section {
    padding: 2.5rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    scroll-margin-top: 150px; 
}

.section-title {
    text-align: center;
    font-size: 2.6rem;
    color: var(--earth-green);
    margin-bottom: 3rem;
    position: relative;
    font-weight: 500;
}

.section-title:focus {
    outline: none;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background-color: var(--sage-green);
    margin: 0.6rem auto 0;
}

.welcome-logo {
    max-width: 100%;
    height: auto;
    max-height: 1.7em;
    vertical-align: bottom;
    display: inline-block;
    margin: 0 0.2em;
}

/* --- About Section --- */
.about-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-header-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.about-header-inline h3 {
    font-size: 2.4rem;
    color: var(--earth-green);
    font-style: italic;
    margin: 0;
    font-weight: 500;
}

.profile-pic-container {
    width: 120px; 
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.profile-pic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-text p {
    max-width: 650px;       
    margin: 0 auto 1.2rem auto; 
    font-size: 1.05rem;
    color: var(--text-dark);
    text-align: left;    
}

/* --- Dynamic View/Close Containers Layout --- */
.trigger-wrapper {
    text-align: center;
    margin-top: 1.5rem;
}

.custom-crisis-trigger {
    margin: -1rem auto 2.5rem auto;
}

.credential-segment {
    margin-bottom: 2rem;
}

.credential-segment:last-child {
    margin-bottom: 0;
}

.credential-segment h4 {
    font-family: var(--font-artistic);
    font-size: 1.4rem;
    color: var(--earth-green);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.credential-segment p {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    max-width: 100% !important;
}

.credential-segment ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}

.credential-segment li {
    font-size: 1.05rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.2rem;
}

.credential-segment li:last-child {
    margin-bottom: 0;
}

.credential-segment li::before {
    content: "•";
    color: var(--sage-green);
    font-size: 1.3rem;
    position: absolute;
    left: 0;
    top: -2px;
}

.credential-link {
    color: var(--earth-green);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.credential-link:hover {
    color: var(--sage-green);
}

/* --- Services Section --- */
#services {
    background-color: transparent;
    max-width: 100%;
}

.services-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 2rem;
}

.service-card {
    position: relative;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    width: 100%;
    display: block;
    text-align: left;
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, rgba(58, 65, 56, 0.6));
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.service-overlay h3 {
    color: var(--white);
    font-size: 1.6rem;
    font-style: normal;
    text-transform: none;
    font-weight: 500;
}

/* --- Section: Understanding Counselling --- */
#understanding-counselling {
    background-color: transparent;
    max-width: 1100px; 
}

.subtitle-text {
    max-width: 650px; 
    margin: -1.5rem auto 3.5rem auto;
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.7;
    text-align: left; 
}

.list-section-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--earth-green);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

/* --- Misconceptions Single-Column Container --- */
.side-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.side-list-item {
    background-color: var(--sage-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border-left: 4px solid var(--earth-green);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.side-list-item div {
    text-align: left;
}

.item-misconception {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--earth-green);
}

.item-reality {
    font-size: 1.05rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(140, 122, 107, 0.15);
}

.reality-label {
    font-family: var(--font-artistic);
    font-size: 1.15rem;
    color: var(--earth-green);
    font-style: italic;
    display: block;
    margin-bottom: 0.2rem;
}

.toggle-section-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
    background-color: var(--earth-green);
    color: var(--white);
    border: 2px solid var(--white);
    padding: 0.85rem 2.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-section-btn:hover {
    background-color: var(--white);
    color: var(--earth-green);
}

.toggle-section-btn .arrow-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

/* Unified Earth Green styling for the Crisis Button trigger */
.toggle-section-btn.crisis-btn {
    background-color: var(--earth-green);
}

.toggle-section-btn.crisis-btn:hover {
    background-color: var(--white);
    color: var(--earth-green);
    border-color: var(--earth-green);
}

/* --- Premium Modal Windows --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(58, 65, 56, 0.5);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background-color: var(--white);
    border-radius: 12px;
    max-width: 850px;
    width: 90%;
    padding: 3.5rem 3rem 3rem 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-window {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--ocean-blue);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--earth-green);
}

.modal-window h3 {
    font-size: 2.2rem;
    color: var(--earth-green);
    margin-bottom: 1.5rem;
    padding-right: 1.5rem;
    text-align: center;
}

.modal-window p, .modal-window li {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    text-align: left; 
}

.modal-window ul {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.modal-window li {
    margin-bottom: 0.5rem;
}

.btn-modal-action {
    display: block; 
    max-width: 260px;
    background-color: var(--earth-green);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin: 0.5rem auto 0 auto;
    text-align: center;
}

.btn-modal-action:hover {
    background-color: #768572;
}

/* --- Section 3: Contact Form --- */
.form-group input:required, 
.form-group textarea:required {
    border-left: 3px solid var(--earth-green);
}
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--earth-green);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--sage-light);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--sage-green);
}

button.btn-submit {
    background-color: var(--earth-green);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}

button.btn-submit:hover {
    background-color: #768572;
}
.textarea-group {
    display: flex;
    flex-direction: column;
}

.form-helper-text {
    font-size: 0.85rem;
    color: var(--ocean-blue); 
    font-style: italic;
    margin-top: 0.4rem;
    display: block;
}

/* --- Footer Layout Upgrades --- */
footer {
    background-color: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-dark);
    padding: 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.footer-logos img {
    height: 50px;
    width: auto;  
    display: block;
    object-fit: contain;
}

.footer-text {
    text-align: center;
}

footer a {
    color: var(--text-dark);
    text-decoration: underline;
    cursor: pointer;
}

footer a:hover {
    color: var(--sage-green);
}

/* --- Privacy Policy View Styles --- */
#privacy-view {
    display: none;
    padding: 4rem 2rem;
    background-color: transparent;
    min-height: 100vh;
}

.privacy-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.privacy-container h1, .privacy-container h2 {
    color: var(--earth-green);
}

.privacy-container h1 {
    border-bottom: 2px solid var(--earth-green);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    font-size: 2.2rem;
}

.privacy-container h2 {
    color: var(--earth-green);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.privacy-container p, .privacy-container li {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

.privacy-container ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.btn-back {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--ocean-blue);
    font-weight: 600;
    cursor: pointer;
    font-size: 1.05rem;
    transition: color 0.3s ease;
}

.btn-back:hover {
    color: var(--sage-green);
}

/* --- Inline Style Migrations --- */
#thanks-modal .modal-window {
    text-align: center;
    max-width: 500px;
}

#thanks-modal h3 {
    color: var(--earth-green);
}

#thanks-modal p {
    text-align: center;
    font-size: 1.15rem;
    margin-bottom: 2rem;
}

#thanks-modal .close-modal-link {
    border: none;
    cursor: pointer;
}

/* --- Crisis Modal Specific Styles (Updated to Earth Green) --- */
#crisis-modal .modal-window {
    max-width: 600px;
    border-top: 4px solid var(--earth-green);
}

#crisis-modal h3 {
    color: var(--earth-green); 
}

.crisis-modal-text {
    text-align: center !important;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

/* --- Global Unified Responsive Design --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column; 
        gap: 1rem;
    }
    
    .logo img {
        height: 85px; 
    }
    
    section {
        padding: 1.5rem 1rem;
        scroll-margin-top: 170px; 
    }
    
    nav li:not(:last-child)::after {
        margin-left: 0.8rem;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.8rem;
    }

    .about-header-inline {
        flex-direction: column-reverse; 
        gap: 1rem;
    }
    .profile-pic-container {
        width: 130px;
        height: 130px;
    }
    .hero p {
        font-size: 1.5rem;
    }
    .contact-form {
        padding: 1.5rem;
    }
    .modal-window {
        padding: 2.5rem 1.5rem 2rem 1.5rem;
        width: 95%;
    }
    .modal-window h3 {
        font-size: 1.8rem;
    }
    .privacy-container {
        padding: 2rem 1.5rem;
    }
    #privacy-view {
        padding: 2rem 1rem;
    }
    .footer-container {
        gap: 1.2rem;
    }
    .subtitle-text {
        margin: -0.5rem auto 2rem auto;
    }
}