/* Font Face Declarations */
@font-face {
    font-family: 'Lexend';
    src: url('assets/fonts/lexend-static/Lexend-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lexend';
    src: url('assets/fonts/lexend-static/Lexend-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Lexend';
    src: url('assets/fonts/lexend-static/Lexend-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Lexend';
    src: url('assets/fonts/lexend-static/Lexend-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Lexend';
    src: url('assets/fonts/lexend-static/Lexend-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Tenor Sans';
    src: url('assets/fonts/TenorSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* CSS Variables */
:root {
    --color-dark-green: #284619;
    --color-medium-green: #506E41;
    --color-light-beige: #d2dcc3;
    --color-very-light-beige: #EBEBE0;
    --color-white: #ffffff;
    --color-black: #1a1a1a;
    
    --font-primary: 'Lexend', sans-serif;
    --font-heading: 'Tenor Sans', serif;
    
    --transition: all 0.3s ease;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-dark-green);
    background-color: var(--color-very-light-beige);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-very-light-beige);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    /* Convert logo to dark green color */
    filter: brightness(0) saturate(100%) invert(17%) sepia(89%) saturate(1352%) hue-rotate(71deg) brightness(91%) contrast(97%);
}

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

.nav-link {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-dark-green);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-medium-green);
    transition: var(--transition);
}

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-dark-green);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 4vh 0;
    background-color: var(--color-very-light-beige);
    position: relative;
    overflow: hidden;
    min-height: 600px;
    height: calc(100vh - 80px); /* Full viewport height minus header */
    display: flex;
    align-items: center;
}

/* Use dynamic viewport height where supported */
@supports (height: 100dvh) {
    .hero {
        height: calc(100dvh - 80px);
    }
}

/* Leaf illustration background */
.hero::after {
    content: '';
    position: absolute;
    bottom: -3vw;
    right: -3vw;
    width: 14vw;
    height: 14vw;
    background-image: url('./assets/illustration/illustration.svg');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 1;
    /* transform: rotate(-15deg); */
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 3vw;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--color-dark-green);
    margin-bottom: clamp(1rem, 2vh, 1.5rem);
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--color-medium-green);
    margin-bottom: clamp(1.5rem, 3vh, 2rem);
    font-weight: 300;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--color-medium-green);
    color: var(--color-white);
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.cta-button:hover {
    background-color: var(--color-dark-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 2;
    width: clamp(250px, 35vw, 500px);
    height: auto;
    max-height: 70vh;
    object-fit: cover;
    object-position: center;
}

@supports (height: 100dvh) {
    .hero-image img {
        max-height: 70dvh;
    }
}


/* About Section */
.about {
    padding: 80px 0;
    background-color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--color-dark-green);
    margin-bottom: 2rem;
    text-align: center;
}

.about-text {
    position: relative;
    z-index: 2;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}



/* Credentials Card */
.credentials-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background-color: var(--color-very-light-beige);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stamp-section img {
    width: 100px;
    height: 100px;
    /* Convert white SVG to dark green color */
    filter: brightness(0) saturate(100%) invert(17%) sepia(89%) saturate(1352%) hue-rotate(71deg) brightness(91%) contrast(97%);
}

.credentials-info {
    flex: 1;
}

.credentials-info p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: var(--color-dark-green);
}

.crp-number {
    font-weight: 600;
    color: var(--color-medium-green);
    font-size: 1.1rem;
}

.service-type {
    font-style: italic;
    color: var(--color-medium-green);
}

/* Approach Section */
.approach {
    padding: 80px 0;
    background-color: var(--color-light-beige);
    position: relative;
    overflow: hidden;
}

.approach::after {
    content: '';
    position: absolute;
    bottom: -3vw;
    right: -3vw;
    width: 14vw;
    height: 14vw;
    background-image: url('./assets/illustration/illustration.svg');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 1;
    transform: scaleX(-1) translateX(clamp(80px, 10vw, 120px)); /* Mirror horizontally and compensate for shift */
    z-index: 1;
    pointer-events: none;
}

.approach-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.approach-text p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.approach-text strong {
    color: var(--color-dark-green);
    font-weight: 600;
}

.highlight {
    font-style: italic;
    color: var(--color-medium-green);
    font-size: 1.1rem;
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: var(--color-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--color-very-light-beige);
    border-radius: 15px;
    padding: 2.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
    text-align: center;
}

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

.service-card h3 {
    font-size: 1.5rem;
    color: var(--color-dark-green);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--color-medium-green);
    line-height: 1.6;
}

/* Consultório Section */
.consultorio {
    padding: 80px 0;
    background-color: var(--color-light-beige);
}

.clinic-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2.5rem;
    color: var(--color-medium-green);
}

.clinic-address svg {
    flex-shrink: 0;
    fill: var(--color-medium-green);
}

.clinic-address p {
    margin: 0;
    text-align: left;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 300;
}

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

.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 500px;
}

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

.carousel-slide.active {
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 2;
}

.carousel-btn:hover {
    background-color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
}

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

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

.carousel-btn-fullscreen {
    position: absolute;
    top: 40px; /* Increased from 20px to avoid being cut off */
    right: 20px;
    width: 45px;
    height: 45px;
    z-index: 3; /* Ensure it's above other elements */
}

.carousel-btn svg {
    color: var(--color-dark-green);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-white);
    background-color: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--color-white);
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Fullscreen Modal */
.fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.fullscreen-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.fullscreen-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.fullscreen-close svg {
    color: var(--color-white);
}

.fullscreen-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.fullscreen-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.fullscreen-nav svg {
    color: var(--color-white);
}

.fullscreen-prev {
    left: 20px;
}

.fullscreen-next {
    right: 20px;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background-color: var(--color-very-light-beige);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 3rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    font-size: 1.25rem;
    color: var(--color-dark-green);
    margin-bottom: 0.5rem;
}

.whatsapp-link,
.instagram-link,
.location-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-medium-green);
    font-weight: 500;
    transition: var(--transition);
}

.whatsapp-link:hover,
.instagram-link:hover,
.location-link:hover {
    color: var(--color-dark-green);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
}

.map-container iframe {
    filter: grayscale(20%);
}

/* Footer */
.footer {
    background-color: var(--color-dark-green);
    color: var(--color-white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 50px;
    /* Keep footer logo white for contrast on dark background */
    filter: brightness(0) invert(1);
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: var(--color-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    z-index: 1000;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.5);
}

/* Responsive Design */

/* Tablets and below */
@media (max-width: 768px) {
    .hero {
        margin-top: 70px;
        height: auto;
        min-height: calc(100vh - 70px);
        padding: 6vh 0;
        display: flex;
        align-items: center;
    }
    
    /* Use dynamic viewport height where supported */
    @supports (height: 100dvh) {
        .hero {
            min-height: calc(100dvh - 70px);
        }
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: clamp(20px, 4vh, 40px);
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-image {
        order: 1;
        margin: 0 auto;
    }
    
    .hero-image img {
        width: clamp(200px, 60vw, 400px);
        max-height: 50vh;
    }
    
    @supports (height: 100dvh) {
        .hero-image img {
            max-height: 50dvh;
        }
    }
    
    .hero::after {
        width: clamp(100px, 14vw, 150px);
        height: clamp(100px, 14vw, 150px);
        bottom: -3vw;
        right: -3vw;
    }
    
    .approach::after {
        width: clamp(100px, 14vw, 150px);
        height: clamp(100px, 14vw, 150px);
        bottom: -3vw;
        right: -3vw;
        transform: scaleX(-1) translateX(clamp(40px, 10vw, 80px));
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .hero {
        height: auto;
        min-height: calc(100vh - 70px);
        padding: 5vh 0;
    }
    
    /* Use dynamic viewport height where supported */
    @supports (height: 100dvh) {
        .hero {
            min-height: calc(100dvh - 70px);
        }
    }
    
    .hero-image img {
        width: clamp(150px, 75vw, 350px);
        max-height: 45vh;
    }
    
    @supports (height: 100dvh) {
        .hero-image img {
            max-height: 45dvh;
        }
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero::after,
    .approach::after {
        width: clamp(80px, 14vw, 120px);
        height: clamp(80px, 14vw, 120px);
        bottom: -3vw;
        right: -3vw;
    }
    
    .approach::after {
        transform: scaleX(-1) translateX(clamp(30px, 8vw, 60px));
    }
}

/* Mobile screens */
@media (max-width: 968px) {
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text {
        order: 2;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .credentials-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .stamp-section img {
        width: 80px;
        height: 80px;
    }
    
    .credentials-info p {
        font-size: 0.95rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 70px);
        background-color: var(--color-very-light-beige);
        flex-direction: column;
        padding: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* Print Styles */
@media print {
    .header,
    .whatsapp-float,
    .mobile-menu-toggle,
    .map-container {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .hero,
    .about,
    .approach,
    .services,
    .contact {
        page-break-inside: avoid;
        padding: 20px 0;
    }
    
    .hero-image,
    .carousel-slide {
        height: 350px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn-prev {
        left: 10px;
    }
    
    .carousel-btn-next {
        right: 10px;
    }
    
    .carousel-btn-fullscreen {
        top: 25px; /* Adjusted to avoid being cut off */
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .clinic-address {
        margin-bottom: 1.5rem;
    }
    
    .clinic-address p {
        font-size: 0.95rem;
    }
    
    a {
        text-decoration: underline;
    }
    
    .cta-button {
        border: 2px solid black;
        background: white;
        color: black;
    }
}

/* Loading animation - Removed to keep sections always visible */
/* @keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    animation: fadeIn 0.8s ease-out;
} */

/* Smooth transitions for all interactive elements */
button,
a,
input,
textarea {
    transition: var(--transition);
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--color-medium-green);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background-color: var(--color-medium-green);
    color: var(--color-white);
}

::-moz-selection {
    background-color: var(--color-medium-green);
    color: var(--color-white);
}
