/* Base Styles */
:root {
    --primary-bg: #310326; /* New dark purple background */
    --dark-purple: #310326; /* Updated to match background */
    --medium-purple: #512047; /* Slightly lighter purple */
    --light-purple: #723262; /* Lighter purple */
    --accent-coral: #fbbd81; /* New orange/peach accent */
    --dark-navy: #1D1E33;
    --white: #FFFFFF;
    --light-bg: #FFF5EC;
    --black: #000000;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--primary-bg);
    color: var(--white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: relative;
    margin-bottom: 10px;
    background-color: var(--primary-bg);
    z-index: 10;
}

.logo {
    max-height: 30px;
    width: auto;
    margin-right: 10px;
}

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

/* Navigation Styles */
.desktop-nav ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.desktop-nav .nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 8px;
    height: 50px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 90px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.nav-button.active {
    box-shadow: 0 0 0 2px var(--white), 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Add styling for home button */
.nav-button:not(.heart-health):not(.store):not(.about):not(.privacy):not(.labs) {
    background-color: #da6f48;
}

.nav-button.heart-health {
    background-color: #8d2df7;
}

.nav-button.store {
    background-color: #690b52;
}

.nav-button.about {
    background-color: #9e8a99;
    color: white;
}

.nav-button.privacy {
    background-color: #976d82;
}

.nav-button.labs {
    background: linear-gradient(90deg, #ff3131, #ff914d);
    color: white;
}

.nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: var(--dark-purple);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--dark-navy);
    padding: 20px;
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-nav.active {
    transform: translateY(0);
    display: block;
}

.mobile-nav ul li {
    margin: 15px 0;
}

.mobile-nav ul li a {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    display: block;
    padding: 10px;
}

/* Hero Section */
.hero {
    padding: 20px 5%;
    margin-top: 20px;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
}

.hero-text {
    flex: 1;
    max-width: 650px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    padding-left: 10px;
}

.hero-text.animated {
    opacity: 1;
    transform: translateY(0);
}

.hero-text h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.5px;
    width: 100%;
}

.highlight-ez {
    color: var(--accent-coral);
    font-weight: 800;
    font-size: 3rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

.highlight-beat {
    color: var(--dark-purple);
    font-weight: 800;
    font-size: 3rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

.hero-text p {
    color: var(--dark-navy);
    margin-bottom: 40px;
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 600px;
}

.hero-image {
    flex: 0 0 25%;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
    margin-right: 20px;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
}

.hero-image.animated {
    opacity: 1;
    transform: translateX(0);
}

.hero-image img {
    max-width: 300px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-coral);
    color: var(--white);
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(232, 125, 85, 0.4);
}

.cta-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(232, 125, 85, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(232, 125, 85, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(232, 125, 85, 0);
    }
}

/* Steps Section */
.steps-section {
    padding: 40px 5%;
    background-color: var(--light-bg);
    border-radius: 20px;
    margin: 40px 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.step-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    flex: 1;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 250px;
}

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

.step-image {
    width: 100%;
    height: 280px;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 10px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-image img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.step-number {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent-coral);
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.step-card h3 {
    color: var(--dark-purple);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.step-card p {
    color: var(--dark-navy);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Features Section */
.features-section {
    padding: 60px 5%;
    background-color: #fff;
    border-radius: 20px;
    margin: 40px 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.section-heading h2 {
    color: var(--dark-purple);
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-heading p {
    color: var(--dark-navy);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card:nth-child(2).animated {
    transition-delay: 0.2s;
}

.feature-card:nth-child(3).animated {
    transition-delay: 0.4s;
}

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

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent-coral);
    margin-bottom: 20px;
}

.feature-card h3 {
    color: var(--dark-purple);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: var(--dark-navy);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Newsletter Section */
.newsletter-section {
    padding: 40px 5%;
    margin: 40px 0;
}

.newsletter-container {
    background: linear-gradient(135deg, var(--dark-purple), var(--light-purple));
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.newsletter-container.animated {
    opacity: 1;
    transform: translateY(0);
}

.newsletter-container h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.newsletter-container p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.newsletter-form button {
    background-color: var(--accent-coral);
    color: var(--white);
    border: none;
    padding: 0 30px;
    border-radius: 0 30px 30px 0;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
}

.newsletter-form button:hover {
    background-color: #d06c4a;
}

.newsletter-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.newsletter-success i {
    font-size: 3rem;
    color: var(--white);
}

/* Labs Section */
.labs-section {
    text-align: center;
    padding: 30px 0;
}

.labs-button {
    display: inline-block;
    background-color: var(--accent-coral);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.labs-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(232, 125, 85, 0.3);
}

/* Social Section */
.social-section {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(29, 30, 51, 0.2);
    margin-top: 20px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--primary-bg);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
}

.social-icon.instagram {
    background: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
    color: var(--white);
}

.social-icon.facebook {
    background-color: #3b5998;
    color: var(--white);
}

.social-icon.youtube {
    background-color: #ff0000;
    color: var(--white);
}

.social-icon.whatsapp {
    background-color: #25d366;
    color: var(--white);
}

.social-icon.tiktok {
    background-color: #000000;
    color: var(--white);
}

/* Footer */
footer {
    background-color: var(--dark-navy);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

footer a {
    color: var(--accent-coral);
    transition: color 0.3s ease;
}

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

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .desktop-nav ul {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    header {
        padding: 15px 2%;
    }
    
    .desktop-nav .nav-button {
        font-size: 0.75rem;
        min-width: 80px;
        padding: 6px;
        height: 50px;
    }
}

@media screen and (max-width: 850px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        margin-bottom: 40px;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-form input {
        border-radius: 30px;
    }
    
    .newsletter-form button {
        border-radius: 30px;
        padding: 15px;
    }
}

/* Carousel Section */
.carousel-section {
    padding: 40px 5%;
    background-color: var(--white);
    border-radius: 20px;
    margin: 40px 5%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.carousel-container {
    margin-top: 40px;
    position: relative;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.carousel {
    position: relative;
    width: 100%;
    height: 450px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 100%;
    border-radius: 10px;
    display: block;
    object-fit: contain;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.carousel-prev,
.carousel-next {
    background-color: var(--dark-purple);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: var(--medium-purple);
}

.carousel-dots {
    display: flex;
    gap: 10px;
    margin: 0 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--dark-purple);
    transform: scale(1.2);
}

@media screen and (max-width: 850px) {
    .hero-content {
        flex-direction: column;
    }
    
    .hero-image {
        flex: 0 0 auto;
        margin-bottom: 20px;
        width: 80%;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-card {
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .social-icons {
        flex-wrap: wrap;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Medical disclaimer */
.medical-disclaimer {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 30px;
    padding: 15px;
    background-color: rgba(251, 189, 129, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(251, 189, 129, 0.2);
}

/* Health Impact Summary Styles */
.health-impact-summary {
    background-color: var(--dark-purple); /* Or a slightly different shade if needed */
    border-radius: 15px;
    padding: 30px;
    margin-top: 0; /* No top margin needed if inside grid */
    border: 1px solid rgba(251, 189, 129, 0.2);
}

.summary-title {
    color: var(--accent-coral);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.risk-items-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.risk-item {
    background-color: rgba(251, 189, 129, 0.05); /* Slightly lighter background for items */
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid rgba(251, 189, 129, 0.1);
    transition: transform 0.2s ease-in-out;
}

.risk-item:hover {
    transform: translateY(-5px);
}

.risk-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.risk-icon {
    font-size: 1.5rem;
    color: var(--accent-coral);
}

.risk-type {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
}

.risk-value {
    font-size: 1rem;
    font-weight: 500;
    color: #4cd964; /* Green for decrease */
    margin-left: 30px; /* Align with text */
}

.risk-level {
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 30px; /* Align with text */
}

/* Risk level specific colors (from heart-simulator.js) */
.risk-level[style*="#ff6b6b"] { /* High Risk */
    color: #ff6b6b !important;
}

.risk-level[style*="#ffbe3d"] { /* Medium Risk */
    color: #ffbe3d !important;
}

.risk-level[style*="#4cd964"] { /* Low Risk */
    color: #4cd964 !important;
}

/* Media queries for responsiveness */
@media screen and (max-width: 768px) {
    .health-impact-summary {
        padding: 20px;
        margin-top: 20px;
    }

    .summary-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .risk-items-container {
        grid-template-columns: 1fr;
    }
}

.simulator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 2fr; /* Explicitly define columns */
    grid-template-rows: auto auto; /* Two rows for content and disclaimer */
    gap: 30px;
    align-items: start; /* Align items to the start of their grid areas */
}

#left-panel {
    grid-column: 1 / 2; /* Place in the first column */
    grid-row: 1 / 2; /* Place in the first row */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

#right-panel {
    grid-column: 2 / 3; /* Place in the second column */
    grid-row: 1 / 2; /* Place in the first row */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.score-card {
    background-color: rgba(251, 189, 129, 0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(251, 189, 129, 0.2);
}

/* Medical disclaimer */
.medical-disclaimer {
    grid-column: 1 / -1; /* Make disclaimer span both columns */
    grid-row: 2 / 3; /* Place in the second row */
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 30px;
    padding: 15px;
    background-color: rgba(251, 189, 129, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(251, 189, 129, 0.2);
}

/* Health Impact Summary Styles */
.health-impact-summary {
    background-color: var(--dark-purple);
    border-radius: 15px;
    padding: 30px;
    margin-top: 0; /* No top margin needed if inside grid */
    border: 1px solid rgba(251, 189, 129, 0.2);
}

/* Media queries for responsiveness */
@media screen and (max-width: 768px) {
    .simulator-container {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
        grid-template-rows: auto auto auto; /* Three rows when stacked */
    }
    #left-panel {
        grid-column: 1 / -1; /* Span full width */
        grid-row: 1 / 2; /* First row */
        gap: 20px;
    }
    #right-panel {
        grid-column: 1 / -1; /* Span full width */
        grid-row: 2 / 3; /* Second row */
        margin-top: 20px;
        gap: 20px;
    }
    .medical-disclaimer {
        grid-column: 1 / -1; /* Span full width */
        grid-row: 3 / 4; /* Third row */
        margin-top: 20px;
    }
    .health-impact-summary {
        padding: 20px;
        margin-top: 0;
    }
    .summary-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
}
