:root {
    --primary-color: #FD600F;
    /* Updated to match logo background */
    --primary-hover: #E0550D;
    --secondary-color: #FFF0E5;
    /* Light Orange Tint */
    --text-dark: #1A1A1A;
    --text-light: #666666;
    --white: #FFFFFF;
    --bg-light: #FAFAFA;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(255, 102, 0, 0.15);
    --border-radius: 12px;
    --container-width: 1200px;
    --bg-teal: #308f91;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-teal);
    overflow-x: hidden;
    width: 100%;
}

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

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-primary {
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-white:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

/* Navbar */
.navbar {
    background-color: rgba(255, 102, 0, 0.95);
    /* Primary color with slight transparency */
    backdrop-filter: blur(10px);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

/* Language Switcher */
.language-switcher {
    margin-left: 1rem;
}

.language-select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background-color: white;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.brand {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--white);
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 50px;
    width: auto;
    margin-right: 15px;
}

.brand .text-primary {
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--white);
}

.nav-links a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0 150px;
    /* Extra padding bottom for curve */
    background: transparent;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: var(--white) !important;
}

.hero-text p {
    font-size: 1.125rem;
    color: var(--white);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--white);
    font-weight: 500;
}

.stars {
    color: #FFB800;
    letter-spacing: 2px;
}

.hero-image-container {
    flex: 1;
    position: relative;
}

.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: #ddd;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

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


/* Hero Slider */
.hero-slider-container {
    position: relative;
    min-height: 600px;
    /* Flexible height */
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    /* 70% opacity */
    backdrop-filter: blur(10px);
    /* Glass effect */
    border-radius: 30px;
    /* Rounded corners */
    padding: 3rem;
    /* Internal spacing */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    /* Depth shadow */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle border */
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
    display: grid;
    grid-template-areas: "slide";
}

.hero-slide {
    grid-area: slide;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    display: flex;
    align-items: center;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* Ensure slide content matches original hero layout */
.hero-slide .hero-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.slide-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: var(--white);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 50;
    /* Ensure on top */
    pointer-events: auto;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    /* Lighter for visibility on black */
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.dot.active,
.dot:hover {
    background-color: var(--primary-color);
    transform: scale(1.2);
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
}

/* Curve Divider */
.hero-curve {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 0;
}

/* Info Section */
.section-light {
    padding: 100px 0;
    background-color: var(--white);
}

.split-layout {
    display: flex;
    align-items: center;
    gap: 60px;
}

.info-image {
    flex: 1;
}

.info-content {
    flex: 1;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.info-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.feature-list {
    margin-bottom: 30px;
}

.feature-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
    color: var(--white);
}

.feature-list li::before {
    content: '•';
    color: var(--white);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

.link-arrow {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.link-arrow:hover {
    text-decoration: underline;
}

/* Treatments / Cards */
.section-white {
    padding: 100px 0;
    background-color: transparent;
}

.section-header h2,
.section-header p {
    color: var(--white);
}

.section-header {
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
}

.card-icon svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.35rem;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Custom Override for Features Section Cards */
#funcionalidades .card {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#funcionalidades .card h3,
#funcionalidades .card p {
    color: var(--white);
}

#funcionalidades .card p {
    opacity: 0.9;
}

#funcionalidades .card:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-10px);
}

/* CTA Banner */
.cta-banner {
    background: transparent;
    color: var(--white);
    padding: 40px 0;
    /* Reduced padding since box has padding */
    text-align: center;
}

.cta-box {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 4rem 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
}

.cta-banner h2 {
    /* Fluid typography: Min 1.5rem, Preferred 5vw, Max 3.5rem */
    font-size: clamp(2rem, 5vw + 1rem, 3.5rem);
    margin-bottom: 15px;
    letter-spacing: -1px;
    line-height: 1.1;
    /* Prevent wrapping unless absolutely necessary */
    width: 100%;
}

/* Role Selection Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--primary-color);
    /* Orange background due to user request, assuming primary is orange */
    padding: 2rem;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.3s ease-out;
    color: var(--white);
    /* White text */
}

.modal-content h3,
.modal-content p {
    color: var(--white);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--white);
    /* White close icon */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: rgba(255, 255, 255, 0.8);
}

.role-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Specific styling for role buttons as requested */
#btnPatient,
#btnProfessional {
    background-color: #308f91;
    /* Custom Teal */
    color: var(--white);
    border: none;
    transition: background-color 0.3s;
}

#btnPatient:hover,
#btnProfessional:hover {
    background-color: #267274;
    /* Darker shade of teal for hover */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@media (max-width: 768px) {
    .cta-banner h2 {
        font-size: 2.5rem;
        /* Fallback for older browsers if needed, though clamp works well */
    }
}

.cta-banner p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.email-signup-form {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.email-signup-form input {
    padding: 15px 24px;
    border-radius: 50px;
    border: none;
    font-size: 1.2rem;
    width: 360px;
    max-width: 100%;
    outline: none;
}

.email-signup-form .btn {
    padding: 15px 34px;
    font-size: 1.2rem;
}

.form-feedback {
    margin-top: 15px;
    font-weight: 500;
    min-height: 1.5em;
    /* Prevent layout shift */
}

/* Footer */
.footer {
    background-color: #111;
    color: #888;
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 968px) {

    .hero-slide .hero-content,
    .split-layout {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-image-container {
        width: 100%;
        height: 300px;
        /* Fixed height for mobile */
        flex: none;
        margin-top: 20px;
    }

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

    .hero-slider-container {
        display: block;
        min-height: 600px;
        /* Restore height to avoid collapse */
        padding: 2rem 1rem 5rem;
        height: auto;
    }

    .hero-slider {
        /* Remove display: flex to restore desktop grid layout */
        /* display: flex; -> REMOVED */
        /* flex-direction: column; -> REMOVED */
        height: 100%;
        /* Ensure it takes full height of container */
    }

    .hero-slide {
        /* Position is handled by grid-area: slide from desktop styles */
        /* Just ensure internal content flows correctly */
        display: flex;
        align-items: center;
        padding-bottom: 20px;
    }

    /* Override the loop/js logic? No, just style. */
    /* Ensure only active slide is seen is handled by base CSS opacity. */

    .hero-slide .hero-content {
        flex-direction: column-reverse;
        /* Image top, text bottom? Or Text top?
           User mockup had Text top.
           Standard mobile: Image Top usually looks better?
           User said "misaligned". Let's stick to Text Top (column) as per previous code. */
        flex-direction: column;
        gap: 30px;
        justify-content: flex-start;
        height: auto;
    }

    .hero-text h1 {
        font-size: 2rem;
        word-wrap: break-word;
        line-height: 1.2;
    }

    .hero-buttons {
        justify-content: center;
    }

    .trust-badge {
        justify-content: center;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: var(--primary-color);
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

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

    .nav-links a {
        color: var(--white) !important;
        font-size: 1.1rem;
        display: block;
    }

    .nav-links .btn {
        width: 100%;
        margin-top: 10px;
    }

    .mobile-toggle {
        display: flex;
    }

    /* Mobile specific adjustments for containers */
    .hero-slider-container,
    .cta-box {
        padding: 2rem 1rem !important;
        /* Reduce padding on mobile */
    }

    .hero-buttons {
        flex-wrap: wrap;
        /* Allow buttons to stack */
        gap: 10px;
    }

    .hero-buttons .btn {
        width: 100%;
        /* Full width buttons on mobile */
        text-align: center;
    }

    .email-signup-form {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .email-signup-form input {
        width: 100%;
        /* Full width input */
        margin-bottom: 10px;
    }

    .email-signup-form .btn {
        width: 100%;
        /* Full width button */
    }

    .hero-image-container img {
        max-width: 100%;
        height: auto;
    }
}

/* Testimonials Section */
.section-gray {
    background-color: var(--primary-color);
    /* Was #f7f9fa */
    padding: 5rem 0;
}

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

.testimonial-card {
    background: rgba(0, 0, 0, 0.7);
    /* 70% opacity */
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.testimonial-content {
    margin-bottom: 0;
}

.testimonial-content p {
    font-style: italic;
    color: var(--white);
    /* Changed to white */
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* order: -1;  Alternatively we could use flex order, but we changed HTML */
}

.testimonial-author .avatar {
    width: 120px;
    /* Increased by 30% (90px -> 120px) */
    height: 120px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-author .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 0.2rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.author-info span {
    font-size: 0.85rem;
    color: #ccc;
    /* Lighter gray for visibility on black */
}