/* ==========================================================================
   1. CSS Variables & Global Setup
   ========================================================================== */

:root {
    /* Color Palette (Neutral) */
    --primary-color: #A0522D; /* Sienna - warm, earthy */
    --primary-color-dark: #8B4513; /* SaddleBrown */
    --accent-color: #D2B48C; /* Tan */
    --text-dark: #222222;
    --text-light: #f5f5f5;
    --text-body: #333333;
    --bg-light: #FDFBF8; /* Off-white, slightly warm */
    --bg-dark: #363636;
    --border-color: #dbdbdb;

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;

    /* Transitions */
    --transition-fast: 0.2s ease-in-out;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Spacing & Radius */
    --section-padding: 6rem 1.5rem;
    --card-radius: 8px;
    --button-radius: 50px;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-light);
}

body {
    font-family: var(--font-body);
    color: var(--text-body);
    font-size: clamp(1rem, 1.5vw, 1.125rem); /* Adaptive Typography */
    line-height: 1.7;
    overflow-x: hidden;
}

/* ==========================================================================
   2. Typography & Base Elements
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.title, .subtitle {
    font-family: var(--font-heading);
    color: var(--text-dark);
}

.title {
    font-weight: 800;
}

.subtitle {
    font-weight: 400;
}

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

a:hover {
    color: var(--primary-color-dark);
}

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

.section-title {
    margin-bottom: 1.5rem !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dark);
}

.has-text-white, .has-text-white .title, .has-text-white .subtitle {
    color: var(--text-light) !important;
}

/* ==========================================================================
   3. Reusable Components
   ========================================================================== */

/* Buttons */
.button, button, input[type='submit'] {
    font-family: var(--font-heading);
    border-radius: var(--button-radius);
    font-weight: 700;
    transition: all var(--transition-smooth);
    border-width: 2px;
}

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

.button.is-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.button.is-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Cards */
.card {
    border-radius: var(--card-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}

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

.card .card-image {
    margin: 0 auto;
}

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

.card .card-content {
    text-align: left;
    flex-grow: 1;
}

/* Form inputs */
.custom-input {
    border-radius: var(--card-radius);
    border-color: var(--border-color);
    box-shadow: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.custom-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.125em rgba(160, 82, 45, 0.25);
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */

.navbar.is-fixed-top {
    transition: background-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.navbar.is-transparent {
    background-color: transparent;
}

.navbar.is-scrolled {
    background-color: rgba(253, 251, 248, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-item, .navbar-link {
    font-family: var(--font-heading);
    font-weight: 700;
}

.navbar-item:hover, .navbar-item.is-active {
    background-color: transparent !important;
    color: var(--primary-color) !important;
}

.site-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
}

.navbar.is-scrolled .site-title,
.navbar.is-scrolled .navbar-item,
.navbar.is-scrolled .navbar-burger {
    color: var(--text-dark);
}

.navbar.is-transparent .site-title,
.navbar.is-transparent .navbar-item,
.navbar.is-transparent .navbar-burger {
     color: var(--text-light);
     text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.navbar.is-transparent .navbar-item:hover {
    color: var(--accent-color) !important;
}

@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: var(--bg-light);
    }
    .navbar.is-transparent .navbar-item,
    .navbar-item {
        color: var(--text-dark) !important;
    }
}


/* ==========================================================================
   5. Section Specific Styles
   ========================================================================== */

/* Hero Section */
#hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    color: var(--text-light);
}
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}
#hero .hero-body {
    position: relative;
    z-index: 2;
}
#hero .hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
}
#hero .hero-subtitle {
    font-size: clamp(1.2rem, 4vw, 1.75rem);
    font-weight: 400;
}

/* Parallax Sections */
.parallax-container {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}
.parallax-container .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}
.parallax-container .container {
    position: relative;
    z-index: 2;
}

/* Events Section */
#events .event-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--card-radius);
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

#events .event-card .title,
#events .event-card .subtitle,
#events .event-card p {
    color: var(--text-light);
}

/* Statistics Widget */
.stats-widget .heading {
    color: var(--accent-color);
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.stats-widget .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-light);
}

/* Pricing Section */
#pricing .pricing-card {
    text-align: center;
}
#pricing .pricing-card.is-featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(160, 82, 45, 0.2);
}
#pricing .pricing-card ul {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}
#pricing .pricing-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}
#pricing .pricing-card li .fa-check-circle {
    color: var(--primary-color);
    margin-right: 0.5rem;
}
.price-tag {
    color: var(--primary-color);
    font-weight: 800;
    margin: 1rem 0 !important;
}

/* Pricing Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
  vertical-align: middle;
}
.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--accent-color);
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}
input:checked + .slider {
  background-color: var(--primary-color);
}
input:checked + .slider:before {
  transform: translateX(26px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}

/* Press Section */
#press img {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter var(--transition-smooth), opacity var(--transition-smooth);
}
#press img:hover {
    filter: grayscale(0%);
    opacity: 1;
}
#press .message {
    border-left-color: var(--primary-color);
    border-left-width: 4px;
    background-color: #fff;
}
#press blockquote {
    font-style: italic;
    font-size: 1.2rem;
}
#press cite {
    display: block;
    text-align: right;
    margin-top: 1rem;
    font-weight: bold;
    color: var(--text-body);
}

/* Resources Section */
.resource-list ul {
    list-style: none;
    margin: 0;
}
.resource-list li {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.resource-list li:last-child {
    border-bottom: none;
}
.resource-list a {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
}
.resource-list a::after {
    content: ' →';
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.resource-list a:hover::after {
    opacity: 1;
}

/* ==========================================================================
   6. Footer
   ========================================================================== */

.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 4rem 1.5rem 2rem;
}

.footer .title {
    color: var(--text-light);
}

.footer .footer-title {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.footer a {
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: var(--accent-color);
}

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

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

/* ==========================================================================
   7. Specific Page Styles
   ========================================================================== */

/* For success.html */
.success-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    background-color: var(--bg-light);
    padding: 2rem;
}

/* For terms.html & privacy.html */
.legal-content-page {
    padding-top: 100px; /* Offset for fixed navbar */
}

.legal-content-page .content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.legal-content-page .content p {
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   8. Animations & Media Queries
   ========================================================================== */

/* Scroll Animation Initial State */
[data-scroll-anim] {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

[data-scroll-anim].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries */
@media screen and (max-width: 768px) {
    .section {
        padding: 4rem 1rem;
    }
    .title.is-1 {
        font-size: 2.2rem;
    }
    .title.is-2 {
        font-size: 1.8rem;
    }
    .footer {
        text-align: center;
    }
}