/* ==========================================================================
   1. CSS Variables & Theming
   ========================================================================== */

:root {
    /* Color Palette (Monochrome) */
    --primary-color: #222222;
    --primary-color-hover: #444444;
    --background-color: #FFFFFF;
    --surface-color: #F7F7F7;
    --border-color: #E0E0E0;
    --text-color: #555555;
    --heading-color: #222222;
    --white-color: #FFFFFF;
    --subtle-text-color: #777777;

    /* Typography */
    --font-family-heading: 'Roboto', sans-serif;
    --font-family-body: 'Lato', sans-serif;

    /* Spacing & Sizing */
    --section-padding: 5rem 1.5rem;
    --container-width: 1140px;
    --navbar-height: 80px;

    /* Biomorphic Design Elements */
    --border-radius-soft: 12px;
    --border-radius-hard: 20px;

    /* Transitions */
    --transition-fast: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================================
   2. Global Styles & Resets
   ========================================================================== */

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

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

body {
    font-family: var(--font-family-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-color-hover);
    text-decoration: underline;
}

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

/* ==========================================================================
   3. Layout & Helpers
   ========================================================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.has-background-light {
    background-color: var(--surface-color);
}

.has-text-centered {
    text-align: center;
}

/* Simple Columns System */
.columns {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.column {
    padding: 0 0.75rem;
    flex-basis: 100%;
    flex-grow: 1;
}

.columns.is-centered {
    justify-content: center;
}

.columns.is-multiline {
    flex-wrap: wrap;
}

@media screen and (min-width: 769px) {
    .column.is-one-third {
        flex: none;
        width: 33.3333%;
    }
    .column.is-half {
        flex: none;
        width: 50%;
    }
    .column.is-two-thirds {
        flex: none;
        width: 66.6666%;
    }
}

/* ==========================================================================
   4. Component Styles
   ========================================================================== */

/* Header & Navbar */
.site-header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--navbar-height);
}

.navbar-logo {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--heading-color);
}
.navbar-logo:hover {
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-end {
    display: flex;
    gap: 1.5rem;
}

.navbar-item {
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-item:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-burger {
    display: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    position: relative;
    background: none;
    border: none;
}

.navbar-burger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background-color: var(--heading-color);
    border-radius: 2px;
    left: 0;
    transition: all 0.3s ease-in-out;
}

.navbar-burger span:nth-child(1) { top: 0.5rem; }
.navbar-burger span:nth-child(2) { top: 1rem; }
.navbar-burger span:nth-child(3) { top: 1.5rem; }

.navbar-burger.is-active span:nth-child(1) { transform: translateY(0.5rem) rotate(45deg); }
.navbar-burger.is-active span:nth-child(2) { opacity: 0; }
.navbar-burger.is-active span:nth-child(3) { transform: translateY(-0.5rem) rotate(-45deg); }


/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.hero-body {
    padding: 2rem;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--white-color);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    line-height: 1.5;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* Buttons */
.button {
    display: inline-block;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius-soft);
    font-family: var(--font-family-heading);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    font-size: 1rem;
    text-decoration: none;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.button.is-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.button.is-primary:hover {
    background-color: var(--primary-color-hover);
    color: var(--white-color);
}

.button.is-large {
    font-size: 1.2rem;
    padding: 1.2rem 3rem;
}

.button.is-link {
    background-color: transparent;
    color: var(--primary-color);
    padding: 0.5rem 0;
    border-radius: 0;
}
.button.is-link:hover {
    background-color: transparent;
    box-shadow: none;
    transform: none;
    text-decoration: underline;
}

/* Cards */
.card {
    background-color: var(--background-color);
    border-radius: var(--border-radius-hard);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition-fast);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--subtle-text-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.profile-card .card-image {
    height: auto;
    padding: 2rem 2rem 0 2rem;
}

.profile-card .card-image img {
    border-radius: 50%;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border: 5px solid var(--surface-color);
}

.profile-card .card-content {
    text-align: center;
}

/* Accordion */
.accordion-container {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-soft);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}
.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    background-color: transparent;
    border: none;
    padding: 1.5rem;
    text-align: left;
    font-family: var(--font-family-heading);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
}

.accordion-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 1.5rem;
}
.accordion-content p { margin-bottom: 1rem; }

/* Contact Form */
.contact-form .field {
    margin-bottom: 1.5rem;
}

.contact-form .label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--heading-color);
}

.contact-form .input,
.contact-form .textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-soft);
    background-color: var(--surface-color);
    font-family: var(--font-family-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.contact-form .input:focus,
.contact-form .textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.1);
}

.contact-form .textarea {
    min-height: 150px;
    resize: vertical;
}

/* External Links Section */
.external-links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.external-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-soft);
    background-color: var(--surface-color);
    color: var(--text-color);
    font-weight: 700;
    transition: var(--transition-fast);
}

.external-link:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    border-color: var(--primary-color);
    text-decoration: none;
}


/* Footer */
.site-footer {
    background-color: var(--heading-color);
    color: var(--subtle-text-color);
    padding: 4rem 1.5rem 2rem 1.5rem;
}

.site-footer a {
    color: var(--white-color);
}
.site-footer a:hover {
    color: var(--white-color);
    text-decoration: underline;
}

.footer-title {
    color: var(--white-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.site-footer ul {
    list-style: none;
}

.site-footer ul li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid #444;
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   5. Page-Specific Styles
   ========================================================================== */
   
/* success.html */
body.success-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    background-color: var(--surface-color);
}
.success-content {
    max-width: 600px;
}
.success-content h1 { font-size: 3rem; margin-bottom: 1rem; }

/* privacy.html & terms.html */
body.legal-page main {
    padding-top: var(--navbar-height);
}
.legal-page .container {
    max-width: 800px;
    padding-top: 4rem;
    padding-bottom: 4rem;
}
.legal-page h1 { font-size: 2.5rem; margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.8rem; margin-top: 2.5rem; margin-bottom: 1rem; }

/* ==========================================================================
   6. Animation Styles
   ========================================================================== */

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.fade-in {
    transform: scale(0.95);
}

.animate-on-scroll.fade-in-up {
    transform: translateY(50px);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   7. Media Queries
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.2rem; }
}

@media screen and (max-width: 768px) {
    html { font-size: 15px; }
    .section { padding: 4rem 1rem; }

    /* Columns stacking */
    .column.is-one-third,
    .column.is-half,
    .column.is-two-thirds {
        width: 100%;
        margin-bottom: 2rem;
    }
    .columns .column:last-child {
        margin-bottom: 0;
    }
    
    .footer-title { margin-top: 2rem; }
    .footer-title:first-of-type { margin-top: 0; }
    
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    
    /* Navbar Mobile */
    .navbar-burger { display: block; }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        background-color: var(--background-color);
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        flex-direction: column;
        align-items: stretch;
    }
    
    .navbar-menu.is-active { display: flex; }
    
    .navbar-end {
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
    }

    .navbar-item {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    .navbar-item:last-child {
        border-bottom: none;
    }
}