/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

address {
    font-style: normal;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    /* Define header height as CSS custom property */
    --header-height: auto;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

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

.nav-list {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: #333333;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #5A9B9B;
    background-color: rgba(90, 155, 155, 0.1);
}

.phone-cta {
    display: flex;
    align-items: center;
}

.phone-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #A52A2A, #8B2323);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(165, 42, 42, 0.3);
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
    font-size: 1rem;
}

.phone-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(165, 42, 42, 0.4);
}

.phone-icon {
    font-size: 1.2rem;
}

.phone-text {
    white-space: nowrap;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: #333333;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    overflow: visible; /* Allow content to be visible */
    padding-top: calc(var(--header-height, 120px) + 2rem); /* Dynamic padding based on header height with fallback */
    padding-bottom: 2rem; /* Add bottom padding for content */
    margin-top: 0; /* Ensure no additional margin */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
    z-index: 1;
}

.hero-content {
    color: white;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
    min-height: 52px;
}

.btn-primary {
    background: linear-gradient(135deg, #A52A2A, #8B2323);
    color: white;
    box-shadow: 0 4px 15px rgba(165, 42, 42, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(165, 42, 42, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    min-height: 52px;
}

.btn-secondary:hover {
    background: white;
    color: #333333;
}

/* Ensure hero buttons have consistent width on desktop */
@media (min-width: 769px) {
    .hero-cta .btn {
        min-width: 180px;
    }
    
    .acc-badge {
        max-width: fit-content;
    }
}

.acc-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.acc-text {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    color: #333333;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #F5F5F5;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.about-content h3 {
    color: #5A9B9B;
    margin-bottom: 1rem;
}

.about-story {
    margin-bottom: 2rem;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.mission h3,
.vision h3 {
    color: #A52A2A;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.team-section h3 {
    color: #333333;
    text-align: center;
    margin-bottom: 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.team-member {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.team-photo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.team-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #5A9B9B;
    box-shadow: 0 4px 15px rgba(90, 155, 155, 0.3);
    transition: all 0.3s ease;
}

.team-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(90, 155, 155, 0.4);
}

.team-member h4 {
    color: #5A9B9B;
    margin-bottom: 0.5rem;
}

.team-title {
    color: #A52A2A;
    font-weight: 600;
    margin-bottom: 1rem;
}

.team-credentials {
    color: #666666;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Center the last row when it has fewer than 3 items on desktop */
@media (min-width: 1024px) {
    .services-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
    }
    
    .service-card {
        flex: 0 0 calc(33.333% - 1.333rem);
        max-width: calc(33.333% - 1.333rem);
    }
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid #5A9B9B;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-icon {
    font-size: 2rem;
    display: inline-block;
    flex-shrink: 0;
}

.service-card h3 {
    color: #333333;
    margin-bottom: 0;
    flex: 1;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 1.5rem;
}

.service-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #5A9B9B;
    font-weight: bold;
}

.service-card li:last-child {
    border-bottom: none;
}

/* Conditions Section */
.conditions {
    background: #F5F5F5;
}

.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Center the last row when it has fewer than 3 items on desktop */
@media (min-width: 1024px) {
    .conditions-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .condition-category {
        flex: 0 0 calc(33.333% - 1.333rem);
        max-width: calc(33.333% - 1.333rem);
    }
}

.conditions-show-more {
    text-align: center;
    margin-top: 2rem;
}

.conditions-toggle-btn {
    background: linear-gradient(135deg, #5A9B9B, #4A8B8B);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(90, 155, 155, 0.3);
}

.conditions-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 155, 155, 0.4);
}

/* Show button only on mobile */
.conditions-show-more {
    display: none;
}

@media (max-width: 768px) {
    .conditions-show-more {
        display: block;
    }
    
    .condition-category.hidden-mobile {
        display: none !important;
    }
}

/* Desktop: show all cards */
@media (min-width: 769px) {
    .condition-category.hidden-mobile {
        display: block !important;
    }
}

.condition-category {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.condition-category h3 {
    color: #333333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.condition-category ul {
    list-style: none;
}

.condition-category li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 1.5rem;
}

.condition-category li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #5A9B9B;
    font-weight: bold;
}

.condition-category li:last-child {
    border-bottom: none;
}


/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #5A9B9B, #4A8B8B);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-details h3 {
    color: #333333;
    margin-bottom: 0.5rem;
}

.contact-link {
    color: #5A9B9B;
    font-weight: 600;
}

.contact-link:hover {
    color: #A52A2A;
}

.contact-note {
    font-size: 0.9rem;
    color: #666666;
    margin-top: 0.5rem;
}

.fees-section {
    background: #F5F5F5;
    padding: 2rem;
    border-radius: 10px;
}

.fees-section h3 {
    color: #333333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.fees-category {
    margin-bottom: 2rem;
}

.fees-category:last-of-type {
    margin-bottom: 2rem;
}

.fees-category h4 {
    color: #5A9B9B;
    margin-bottom: 1rem;
}

.fees-grid {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.fees-grid th,
.fees-grid td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.fees-grid th {
    background: #5A9B9B;
    color: white;
    font-weight: 600;
}

.fees-grid tr:hover {
    background: rgba(90, 155, 155, 0.1);
}

/* Fees section CTA styling */
.fees-cta {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

/* Make the Book Now button feel consistent with the fees palette */
.fees-cta .btn-primary {
    background: linear-gradient(135deg, #5A9B9B, #4A8B8B) !important;
    box-shadow: 0 4px 15px rgba(90, 155, 155, 0.25) !important;
}

.fees-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 155, 155, 0.35) !important;
}

/* Prevent full-width button on mobile in this specific spot */
@media (max-width: 768px) {
    .fees-cta .btn {
        width: auto;
        max-width: 260px;
    }
}

.booking-info {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.booking-info h3 {
    color: #333333;
    text-align: center;
    margin-bottom: 2rem;
}

.booking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.booking-item h4 {
    color: #A52A2A;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: #333333;
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-info {
    text-align: right;
}

.footer-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-info address {
    font-style: normal;
}

.footer-info a {
    color: #5A9B9B;
}

.footer-info a:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-list {
        display: none;
        position: fixed;
        top: var(--header-height, 120px);
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        z-index: 999;
    }
    
    .nav-list.mobile-open {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }
    
    .mobile-menu-btn {
        display: flex;
        flex-shrink: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(0, 10px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(0, -10px);
    }
    
    .nav-link {
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(90, 155, 155, 0.2);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-wrapper {
        gap: 0.5rem;
    }
    
    .phone-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        background: linear-gradient(135deg, #A52A2A, #8B2323);
        box-shadow: 0 4px 15px rgba(165, 42, 42, 0.3);
    }
    
    .phone-btn:hover {
        box-shadow: 0 6px 20px rgba(165, 42, 42, 0.4);
    }
    
    .hero {
        padding-top: calc(var(--header-height, 120px) + 1.5rem); /* Dynamic padding based on header height */
        min-height: 100vh;
        height: auto; /* Allow height to grow with content */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .acc-badge {
        width: 100%;
        max-width: 300px;
        box-sizing: border-box;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .mission-vision {
        grid-template-columns: 1fr;
    }
    
    /* Center align Our Story, Our Mission, and Our Vision on mobile */
    .about-story,
    .mission,
    .vision {
        text-align: center;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .team-img {
        width: 120px;
        height: 120px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-header {
        gap: 0.75rem;
    }
    
    .service-icon {
        font-size: 1.75rem;
    }
    
    .conditions-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column-reverse;
    }
    
    .booking-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 3rem 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: calc(var(--header-height, 120px) + 1rem); /* Dynamic padding for very small screens */
        min-height: 100vh;
        height: auto; /* Allow height to grow with content */
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .phone-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        gap: 0.3rem;
        background: linear-gradient(135deg, #A52A2A, #8B2323);
        box-shadow: 0 4px 15px rgba(165, 42, 42, 0.3);
    }
    
    .phone-icon {
        font-size: 1rem;
    }
    
    .service-card,
    .condition-category,
    .team-member {
        padding: 1.5rem;
    }
    
    .team-img {
        width: 100px;
        height: 100px;
    }
    
    .service-header {
        gap: 0.5rem;
    }
    
    .service-icon {
        font-size: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        align-self: center;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .hero {
        padding-top: calc(var(--header-height, 120px) + 1rem); /* Dynamic padding for extra small screens */
        min-height: 100vh;
        height: auto; /* Allow height to grow with content */
    }
}

/* Smooth animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.condition-category,
.team-member {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus styles for accessibility */
.nav-link:focus,
.btn:focus,
.phone-btn:focus,
.contact-link:focus {
    outline: 2px solid #5A9B9B;
    outline-offset: 2px;
}

/* Large text accessibility support */
@media (prefers-reduced-motion: no-preference) {
    @media (min-resolution: 2dppx) and (min-width: 768px) {
        /* High DPI displays with large text */
        .nav-wrapper {
            gap: 1.5rem;
        }
        
        .phone-btn {
            padding: 1rem 2rem;
            font-size: 1.1rem;
        }
        
        .hero-subtitle {
            white-space: normal;
            overflow: visible;
            text-overflow: unset;
        }
    }
}

/* Large text size accessibility - handles when user increases system font size */
@media screen and (min-width: 1px) {
    /* This media query will always apply, but we use it to override large text issues */
    html {
        /* Ensure minimum spacing between elements */
        --text-scale: max(1, env(text-size-adjust, 1));
    }
    
    .nav-wrapper {
        min-height: 80px; /* Ensure header has enough height for large text */
    }
    
    /* Dynamic hero padding based on header height */
    .hero {
        padding-top: calc(var(--header-height, 80px) + 2rem); /* Header min-height + some buffer */
        min-height: 100vh;
        height: auto; /* Allow height to grow with content */
    }
    
    .phone-btn {
        /* Ensure phone button can accommodate larger text */
        min-height: 44px; /* Touch target minimum */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-menu-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent text wrapping in header elements */
    .logo {
        flex-shrink: 0;
    }
    
    .phone-cta {
        flex-shrink: 0;
    }
}

/* Print styles */
@media print {
    .header,
    .hero,
    .footer {
        display: none;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .service-card,
    .condition-category,
    .team-member {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

