/* ACE Health Website Styles - Enhanced Dynamic Version */

/* Brand Colors */
:root {
    --black-sand: #1D2225;
    --health-blue: #0C6FFF;
    --white: #FFFFFF;
    --bold-yellow: #FFFE86;
    --fysiologic-blue: #18388D;
    --fysiologic-green: #90B260;
    --sand: #FFF9F2;
    --seamless: #DBDBDB;
    --patient: #F6C6CB;
    --helpful: #FF874F;
    --edgy: #EB4946;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: var(--black-sand);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    color: var(--white);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--health-blue);
    margin-bottom: 1.5rem;
}

h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--black-sand);
    margin-bottom: 1rem;
}

p {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
    color: var(--black-sand);
}

.subheadline {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.lead-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--health-blue);
    margin-bottom: 1.5rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(29, 34, 37, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.938rem;
    color: var(--black-sand);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--health-blue);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--health-blue);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--black-sand);
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background-color: var(--health-blue);
    color: var(--white);
    border-color: var(--health-blue);
    box-shadow: 0 4px 15px rgba(12, 111, 255, 0.3);
}

.btn-primary:hover {
    background-color: var(--fysiologic-blue);
    border-color: var(--fysiologic-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(12, 111, 255, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--health-blue);
    transform: translateY(-3px);
}

.nav-cta {
    padding: 0.625rem 1.5rem;
    font-size: 0.938rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 4rem;
    overflow: hidden;
}

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

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 20s ease-out infinite alternate;
}

@keyframes zoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(12, 111, 255, 0.85) 0%, 
        rgba(24, 56, 141, 0.75) 50%,
        rgba(12, 111, 255, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    color: var(--white);
}

.hero-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--white);
    opacity: 0.95;
}

.hero-ctas {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* Fade-in animations for hero */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.fade-in-up.delay-1 {
    animation-delay: 0.2s;
}

.fade-in-up.delay-2 {
    animation-delay: 0.4s;
}

.fade-in-up.delay-3 {
    animation-delay: 0.6s;
}

.fade-in-up.delay-4 {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--health-blue), var(--fysiologic-blue));
    border-radius: 2px;
}

/* Section Grid Layout */
.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.section-grid.reverse {
    direction: rtl;
}

.section-grid.reverse > * {
    direction: ltr;
}

.section-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(12, 111, 255, 0.15);
}

.section-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.section-image:hover img {
    transform: scale(1.05);
}

/* Reveal Animations */
.reveal-left,
.reveal-right,
.reveal-title,
.reveal-scale {
    opacity: 0;
}

.reveal-left.revealed {
    animation: revealLeft 1s ease forwards;
}

.reveal-right.revealed {
    animation: revealRight 1s ease forwards;
}

.reveal-title.revealed {
    animation: revealTitle 1s ease forwards;
}

.reveal-scale.revealed {
    animation: revealScale 0.8s ease forwards;
}

.reveal-scale.delay-1.revealed {
    animation: revealScale 0.8s ease 0.2s forwards;
}

.reveal-scale.delay-2.revealed {
    animation: revealScale 0.8s ease 0.4s forwards;
}

@keyframes revealLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealTitle {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* About Section */
.about-section {
    background-color: var(--white);
}

.section-content {
    text-align: left;
}

/* Services Section */
.services-section {
    background: linear-gradient(180deg, var(--sand) 0%, var(--white) 100%);
}

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

.service-card {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(29, 34, 37, 0.06);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--health-blue), var(--fysiologic-blue));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 40px rgba(12, 111, 255, 0.18);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(12, 111, 255, 0.1), rgba(24, 56, 141, 0.1));
    border-radius: 16px;
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--health-blue), var(--fysiologic-blue));
    transform: rotateY(180deg);
}

.service-card:hover .service-icon svg path {
    fill: var(--white);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--health-blue);
    transition: color 0.3s ease;
}

.service-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--black-sand);
    opacity: 0.85;
}

/* Product Carousel */
.product-carousel {
    margin-top: 4rem;
    padding: 2rem 0;
}

.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(29, 34, 37, 0.15);
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(29, 34, 37, 0.2);
    transition: all 0.3s ease;
    z-index: 10;
    color: var(--health-blue);
}

.carousel-btn:hover {
    background-color: var(--health-blue);
    color: var(--white);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(12, 111, 255, 0.3);
}

.carousel-btn.prev {
    left: -28px;
}

.carousel-btn.next {
    right: -28px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--seamless);
    cursor: pointer;
    transition: all 0.4s ease;
}

.indicator.active {
    background-color: var(--health-blue);
    width: 40px;
    border-radius: 6px;
}

/* How We Work Section */
.how-section {
    background-color: var(--white);
}

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

.value-card {
    position: relative;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, var(--sand) 0%, rgba(255, 249, 242, 0.5) 100%);
    border-radius: 16px;
    transition: all 0.4s ease;
    border-left: 4px solid transparent;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--health-blue), var(--fysiologic-blue));
    border-radius: 4px 0 0 4px;
    transition: height 0.4s ease;
}

.value-card:hover::before {
    height: 100%;
}

.value-card:hover {
    transform: translateX(12px);
    box-shadow: 0 8px 30px rgba(12, 111, 255, 0.15);
    background: linear-gradient(135deg, rgba(12, 111, 255, 0.05) 0%, var(--sand) 100%);
}

.value-number {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 4rem;
    background: linear-gradient(135deg, var(--health-blue), var(--fysiologic-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 1rem;
    transition: opacity 0.3s ease;
}

.value-card:hover .value-number {
    opacity: 0.5;
}

.value-card h3 {
    color: var(--health-blue);
    margin-bottom: 1rem;
}

.value-card p {
    font-size: 1rem;
    line-height: 1.7;
}

/* Trust Section */
.trust-section {
    background: linear-gradient(180deg, var(--white) 0%, var(--sand) 100%);
    padding: 5rem 0;
}

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

.trust-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(29, 34, 37, 0.1);
    height: 350px;
}

.trust-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.trust-item:hover img {
    transform: scale(1.1);
}

.trust-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(12, 111, 255, 0.95), transparent);
    color: var(--white);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.trust-item:hover .trust-overlay {
    transform: translateY(0);
}

.trust-overlay h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.trust-overlay p {
    color: var(--white);
    opacity: 0.95;
    margin: 0;
}

/* History Section */
.history-section {
    background: linear-gradient(180deg, var(--sand) 0%, var(--white) 100%);
}

.history-content {
    text-align: left;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--sand) 100%);
    padding: 6rem 0;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.125rem;
    color: var(--black-sand);
    padding: 1.5rem;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(29, 34, 37, 0.08);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(12, 111, 255, 0.15);
}

.contact-item svg {
    flex-shrink: 0;
}

.contact-item a {
    color: var(--health-blue);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.contact-item a:hover {
    color: var(--fysiologic-blue);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--black-sand) 0%, #0d1012 100%);
    color: var(--white);
    padding: 4rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--health-blue), transparent);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo img {
    height: 60px;
    filter: brightness(0) invert(1);
    margin-bottom: 2rem;
    opacity: 0.9;
}

.footer-tagline {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-copyright {
    font-size: 0.875rem;
    opacity: 0.6;
    margin-top: 2rem;
    color: var(--seamless);
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .section-grid.reverse {
        direction: ltr;
    }

    .carousel-btn.prev {
        left: 8px;
    }

    .carousel-btn.next {
        right: 8px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .section {
        padding: 4rem 0;
    }

    .hero {
        padding-top: 120px;
        min-height: auto;
    }

    .service-card,
    .value-card {
        padding: 2rem 1.5rem;
    }

    .carousel-slide img {
        max-height: 300px;
    }

    .trust-item {
        height: 280px;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

a:focus,
button:focus {
    outline: 2px solid var(--health-blue);
    outline-offset: 2px;
}

/* Smooth Scrolling Enhancement */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
