/* Variables for consistent design */
:root {
    --color-primary: #2C3E50; /* Dark Professional Blue */
    --color-secondary: #3498DB; /* Lighter Blue Accent */
    --color-accent: #E6B34B; /* Gold/Bronze for highlight */
    --color-light-background: #ECF0F1; /* Soft Grey Background */
    --color-dark-text: #222222;
    --color-light-text: #FDFDFD;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
    --padding-section: 6rem 0;
    --border-radius-soft: 10px;
    --shadow-subtle: 0 5px 20px rgba(0, 0, 0, 0.07);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Base Styles & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base for rem units */
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-dark-text);
    background-color: var(--color-light-text);
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

h1 { font-size: 3.8rem; line-height: 1.1; }
h2 { font-size: 3rem; line-height: 1.2; }
h3 { font-size: 2.2rem; }
p { margin-bottom: 1rem; }

a {
    text-decoration: none;
    color: var(--color-secondary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: var(--padding-section);
}

.bg-light {
    background-color: var(--color-light-background);
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 3.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-accent) 100%);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.section-description {
    text-align: center;
    font-size: 1.3rem;
    margin-bottom: 3.5rem;
    color: #555;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Header */
.main-header {
    background-color: var(--color-primary);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-subtle);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--color-light-text);
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.main-nav .nav-list {
    list-style: none;
    display: flex;
}

.main-nav .nav-list li {
    margin-left: 2.8rem;
}

.main-nav .nav-link {
    color: var(--color-light-text);
    font-size: 1.15rem;
    font-weight: 400;
    padding: 0.75rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--color-light-text);
    position: relative;
    transition: background-color 0.3s ease;
    border-radius: 2px;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--color-light-text);
    left: 0;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.hamburger::before {
    top: -9px;
}

.hamburger::after {
    top: 9px;
}

/* Nav toggle animation */
.nav-toggle.active .hamburger {
    background-color: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    transform: translateY(-9px) rotate(-45deg);
}


/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-light-text);
    text-align: center;
    overflow: hidden;
    padding: 2rem; /* Ensure content is not cut off on small screens */
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.75) saturate(1.1); /* Slightly brighter and more saturated */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(52, 152, 219, 0.6) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    padding: 2.5rem;
    position: relative;
    z-index: 1;
    animation: fadeInScale 1.2s ease-out forwards;
    background: rgba(0, 0, 0, 0.1); /* Subtle background for content */
    border-radius: var(--border-radius-soft);
    backdrop-filter: blur(5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 4.8rem;
    margin-bottom: 1.8rem;
    color: var(--color-light-text);
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.85rem;
    font-weight: 300;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    padding: 1.2rem;
    background-color: var(--color-light-text);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
    transform: perspective(1000px) rotateY(0deg); /* Initial 3D transform */
    transition: transform 0.6s ease-in-out;
}

.about-image-wrapper:hover {
    transform: perspective(1000px) rotateY(5deg) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.about-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-soft);
    transition: transform 0.5s ease;
}

.about-image-wrapper:hover .about-image {
    transform: scale(1.03);
}

.about-content p {
    font-size: 1.15rem;
    margin-bottom: 1.6rem;
    color: #444;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards per row */
    gap: 2.8rem;
}

.service-card {
    background-color: var(--color-light-text);
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
    position: relative;
    border: 1px solid rgba(0,0,0,0.05); /* Subtle border */
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-secondary); /* Highlight border on hover */
}

.service-card .card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 3px solid var(--color-secondary);
    transition: border-bottom-color 0.3s ease;
}

.service-card:hover .card-image {
    border-bottom-color: var(--color-accent);
}

.service-card .card-title {
    font-size: 1.6rem;
    padding: 1.8rem 1.8rem 0.6rem;
    color: var(--color-primary);
    margin-bottom: 0;
}

.service-card .card-description {
    padding: 0 1.8rem 1.8rem;
    font-size: 1.05rem;
    color: #555;
    flex-grow: 1; /* Pushes content down, good for varying text length */
}

/* Approach Section */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    text-align: center;
}

.approach-item {
    background: linear-gradient(145deg, var(--color-primary) 0%, rgba(44, 62, 80, 0.95) 100%);
    color: var(--color-light-text);
    padding: 3rem;
    border-radius: var(--border-radius-soft);
    box-shadow: var(--shadow-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.approach-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
    background: linear-gradient(145deg, var(--color-secondary) 0%, var(--color-primary) 100%);
}

.approach-title {
    color: var(--color-accent);
    font-size: 1.85rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.7px;
}

.approach-item p {
    font-size: 1.1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.9);
}

/* Wellness Section (using card-overlay style) */
.wellness-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.8rem;
}

.wellness-article {
    position: relative;
    border-radius: var(--border-radius-soft);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%; /* Ensure balanced height */
    border: 1px solid rgba(0,0,0,0.05);
}

.wellness-article:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-secondary);
}

.wellness-article .article-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.wellness-article:hover .article-image {
    transform: scale(1.08) rotateZ(1deg); /* Subtle rotate on hover */
}

.wellness-article .article-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    color: var(--color-light-text);
    padding: 1.8rem;
    padding-top: 4rem; /* More space for the gradient */
}

.wellness-article .article-title {
    font-size: 1.7rem;
    color: var(--color-light-text);
    margin-bottom: 0.7rem;
}

.wellness-article .article-excerpt {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* Footer */
.main-footer {
    background-color: var(--color-primary);
    color: var(--color-light-text);
    padding: 3.5rem 0;
    font-size: 1rem;
    border-top: 5px solid var(--color-secondary); /* Accent border */
}

.main-footer .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.main-footer .footer-brand {
    flex-shrink: 0; /* Prevents shrinking */
}

.main-footer .footer-brand .logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-light-text);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    display: block;
}

.main-footer .footer-brand p {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
}

.main-footer .footer-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.main-footer .footer-nav li {
    margin-left: 2.2rem;
}

.main-footer .footer-nav a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    padding: 0.5rem 0;
    position: relative;
}

.main-footer .footer-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.main-footer .footer-nav a:hover::after {
    width: 100%;
}
.main-footer .footer-nav a:hover {
    color: var(--color-accent);
}


/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 1;
        transform: scale(0.95);
        filter: blur(5px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.reveal {
    opacity: 1;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.reveal.fade-left {
    transform: translateX(-60px);
}
.reveal.fade-left.fade-in {
    transform: translateX(0);
}

.reveal.fade-right {
    transform: translateX(60px);
}
.reveal.fade-right.fade-in {
    transform: translateX(0);
}

/* Animation delays for staggered effects */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
/* Add more delays as needed */


/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    h3 { font-size: 1.8rem; }
    .hero-title { font-size: 3.8rem; }
    .hero-subtitle { font-size: 1.5rem; }
    .section-title { font-size: 2.8rem; }
    .section-description { font-size: 1.15rem; }
    .section-padding { padding: 5rem 0; }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .about-image-wrapper {
        max-width: 700px;
        margin: 0 auto;
    }
    .about-content {
        padding-top: 1rem;
    }


    .services-grid,
    .approach-grid,
    .wellness-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row on tablets */
        gap: 2.5rem;
    }
    .service-card .card-image { height: 180px; }
    .wellness-article .article-image { height: 220px; }

    .main-footer .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .main-footer .footer-brand {
        margin-bottom: 2rem;
    }
    .main-footer .footer-nav ul {
        justify-content: center;
        width: 100%;
    }
    .main-footer .footer-nav li {
        margin: 0 1rem;
        margin-bottom: 0.8rem;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }
    .nav-toggle {
        display: block;
        order: 1; /* Puts toggle on left */
        position: absolute; /* Position relative to header */
        right: 1.5rem;
        top: 1.1rem;
    }
    .main-header .logo {
        order: 2; /* Puts logo in center */
        margin: 0 auto;
    }

    .main-nav {
        width: 100%;
        order: 3; /* Puts nav below logo/toggle */
        transition: transform 0.3s ease-in-out;
    }

    .main-nav .nav-list {
        flex-direction: column;
        width: 100%;
        background-color: var(--color-primary);
        position: absolute;
        top: 70px; /* Adjust based on header height */
        left: 0;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out, opacity 0.3s ease;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        opacity: 1;
        pointer-events: none;
        max-height: calc(100vh - 70px); /* Limit height for scrollable menu */
        overflow-y: auto; /* Allow scrolling for many menu items */
    }

    .main-nav .nav-list.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .main-nav .nav-list li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .main-nav .nav-link {
        display: block;
        padding: 1.2rem 1.5rem;
        text-align: center;
        width: 100%;
        font-size: 1.2rem;
    }

    .main-nav .nav-link::after {
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 1px;
    }
    .main-nav .nav-link:hover::after,
    .main-nav .nav-link.active::after {
        width: 60%; /* Adjusted width for mobile hover */
    }

    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    .hero-title { font-size: 3rem; margin-bottom: 1.2rem; }
    .hero-subtitle { font-size: 1.3rem; }
    .section-title { font-size: 2.5rem; }
    .section-description { font-size: 1.05rem; }
    .hero-content { padding: 1.8rem; }

    .services-grid,
    .approach-grid,
    .wellness-grid {
        grid-template-columns: 1fr; /* 1 card per row on mobile */
        gap: 2rem;
    }
    .service-card .card-title { font-size: 1.45rem; }
    .service-card .card-description { font-size: 1rem; }
    .wellness-article .article-title { font-size: 1.5rem; }
    .wellness-article .article-excerpt { font-size: 0.9rem; }
    .approach-item { padding: 2.5rem; }
    .approach-title { font-size: 1.6rem; }
    .approach-item p { font-size: 1rem; }
}

@media (max-width: 480px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    .hero-title { font-size: 2.5rem; margin-bottom: 1rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .section-title { font-size: 2.2rem; }
    .section-padding { padding: 4rem 0; }
    .main-header .logo { font-size: 1.9rem; }
    .nav-toggle { top: 0.9rem; right: 1rem; }
    .hero-section { height: 80vh; }
    .hero-content { padding: 1.5rem; }
    .main-footer .footer-nav li { margin: 0 0.5rem; margin-bottom: 0.5rem; }
}

/* Visible state helpers */
+ .animate-fade-in-up.visible,
+ .animate-fade-in-left.visible,
+ .animate-fade-in-right.visible,
+ .animate-bounce-y.visible,
+ .section-scroll-animate.visible,
+ .text-animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}
