/* --- Color Palette Variables --- */
:root {
    --primary-blue: #4A90E2;
    --ribbon-red: #D62828;
    --ribbon-white: #FFFFFF;
    --ribbon-blue-deep: #053672;
    --foliage-green: #587D3D;
    --foliage-green-darker: #4a6b31;
    --background-warm-sand: #F9F5EF;
    --text-primary-charcoal: #333333;
    --text-secondary-slate-gray: #666666;
    --overlay-backdrop: rgba(0, 0, 0, 0.6);
    --header-footer-bg-transparent: rgba(249, 245, 239, 0.9); /* More opaque for readability */

    --font-heading: 'EB Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    --page-max-width: 800px;
    --content-padding: 20px;
}

/* --- Global Styles & Resets --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px base */
    height: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-warm-sand);
    color: var(--text-primary-charcoal);
    line-height: 1.7;
    font-size: 1rem;
    position: relative;
    min-height: 100%; /* Changed from 100vh to 100% to work with html height 100% */
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scroll from decorations primarily */
}

body::before { /* Noise Texture */
    content: "";
    position: fixed; /* Fixed to cover viewport */
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='1' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.page-wrapper {
    width: 100%;
    max-width: var(--page-max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding); /* Horizontal padding */
    background-color: var(--background-warm-sand);
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allows footer to stick to bottom if content is short */
    position: relative; /* For floral decorations */
}

.page-wrapper > main {
    flex-grow: 1; /* Pushes footer down */
}

/* --- Typography --- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700; /* EB Garamond has good weight variance */
    color: var(--text-primary-charcoal);
    margin-bottom: 0.6em;
    text-align: center;
}

h1 { /* DOS MORPHOS */
    font-size: clamp(2.5rem, 6vw, 3.5rem); /* Responsive font size */
    letter-spacing: 1.5px;
    margin-bottom: 0;
    line-height: 1.1;
    color: var(--ribbon-blue-deep);
    font-weight: 700;
}

h2 { /* MASSAGE */
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 500; /* Lighter than H1 */
    letter-spacing: 1px;
    margin-top: 0.2em;
    margin-bottom: 1.5em;
    color: var(--ribbon-blue-deep);
    font-style: italic;
}

h3 { /* Section titles */
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    margin-top: 2em;
    margin-bottom: 1em;
    color: var(--foliage-green);
    font-weight: 600;
}
.bio-content-box h3 { /* Specific h3 in bio */
    margin-top: 0;
    color: var(--ribbon-blue-deep);
}


h4 {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
    margin-top: 1.8em;
    margin-bottom: 0.7em;
    color: var(--foliage-green);
    font-weight: 600;
}

p {
    margin-bottom: 1.2em;
    font-size: 1rem;
    color: var(--text-secondary-slate-gray);
}
.welcome-text {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2em;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover, nav a:hover {
    color: var(--ribbon-blue-deep);
    text-decoration: none;
}
.services-section a { /* Make links in services stand out more */
    font-weight: 600;
}


/* --- Header & Navigation --- */
header {
    padding: 25px 0; /* Vertical padding only, horizontal is on page-wrapper */
    margin-bottom: 30px;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 3vw, 30px); /* Reduced gap to help fit more items */
    flex-wrap: nowrap; /* Ensure items stay on one line */
    overflow-x: auto; /* Allow horizontal scroll on very small screens if needed, though ideally not */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for touch devices */
    padding-bottom: 5px; /* Add some padding if scrollbar appears, to not cut off text */
}

nav a,
.nav-lang-toggle {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary-charcoal);
    font-size: clamp(0.85rem, 2.5vw, 1.1rem); /* Slightly reduced max size */
    text-transform: uppercase;
    letter-spacing: 0.8px; /* Slightly reduced letter spacing */
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    white-space: nowrap; /* Prevent text wrapping within a nav item */
}

/* Specific styles for the language toggle button to make it look like a nav link */
.nav-lang-toggle {
    background: none;
    border: none; /* Remove button border */
    cursor: pointer;
    padding-top: 0; /* Adjust padding to align with <a> tags if necessary */
    padding-left: 0;
    padding-right: 0;
    display: inline-flex; /* To align flag and text */
    align-items: center;
    gap: 0.3em; /* Space between flag and text */
    line-height: inherit; /* Inherit from nav a */
}

.nav-lang-toggle:hover,
nav a:hover, 
nav a.active {
    color: var(--foliage-green);
    border-bottom-color: var(--foliage-green);
}

.nav-lang-toggle.active { /* If we want to style it as active (though it's a toggle, not a page link) */
    /* Optional: style if needed, for now, inherits hover/active from above */
}


/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 35px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-primary {
    background-color: var(--foliage-green);
    color: var(--ribbon-white);
}
.btn-primary:hover {
    background-color: var(--foliage-green-darker);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    color: var(--ribbon-white);
}
.btn-secondary { /* For "Conocer a Silvia" */
    background-color: var(--ribbon-white);
    color: var(--foliage-green);
    border: 2px solid var(--foliage-green);
}
.btn-secondary:hover {
    background-color: var(--foliage-green);
    color: var(--ribbon-white);
    box-shadow: 0 6px 12px rgba(88, 125, 61, 0.2);
}


/* --- Hero Section (index.html) --- */
.hero-section {
    text-align: center;
    padding: 30px 0;
}
.hero-logo {
    max-width: 280px;
    width: clamp(180px, 50vw, 280px);
    height: auto;
    margin: 0 auto 25px auto;
}

/* --- Services Section (services.html) --- */
.services-section {
    padding: 40px 0;
    text-align: center;
}
.services-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5em;
    display: inline-block;
    text-align: left;
}
.services-section li {
    margin-bottom: 0.6em;
    font-size: 1.05rem;
    position: relative;
    padding-left: 25px;
}
.services-section li::before {
    content: "🦋";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--primary-blue);
    font-size: 0.9em;
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 40px 0 20px; /* Vertical padding only */
    margin-top: 40px;
    font-size: 0.9rem;
    color: var(--text-secondary-slate-gray);
    border-top: 1px solid #e0dccc;
}

/* --- Floral Decorations (for index, services) --- */
.floral-decoration {
    position: absolute;
    width: clamp(80px, 15vw, 120px);
    height: auto;
    z-index: 1; /* Ensure they are above page-wrapper background */
    opacity: 0.8;
}
.floral-bottom-left {
    bottom: var(--content-padding); /* Align with content padding */
    left: calc(var(--content-padding) * -1.5); /* Peek from side */
}
.floral-bottom-right {
    bottom: var(--content-padding);
    right: calc(var(--content-padding) * -1.5);
}


/* === About Page Specific Styles === */
.about-page-wrapper {
    max-width: none; /* Full width */
    padding: 0; /* No horizontal padding on the wrapper itself */
    background-color: transparent; /* Let body bg show or image container */
}

/* Header & Footer on About page */
.header-on-image, .footer-on-image {
    position: relative; /* Will be 'sticky' or 'fixed' if desired, but relative for now */
    z-index: 10;
    background-color: var(--header-footer-bg-transparent);
    padding-left: var(--content-padding); /* Inner padding to align nav/footer text */
    padding-right: var(--content-padding);
    width: 100%; /* Span full width */
}
.header-on-image {
    margin-bottom: 0; /* Remove default margin */
}
.footer-on-image {
    margin-top: 0; /* Remove default margin */
    border-top: none; /* No border if on image */
}

.about-main-content {
    flex-grow: 1; /* Takes up space between header and footer */
    display: flex; /* Needed for child to be 100% height */
    flex-direction: column;
    position: relative; /* New stacking context for z-index of children */
}

.about-image-container {
    background-image: url('../images/Silvia.jpg');
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    height: 800px; /* Fixed height container */
    position: relative; /* Stacking context for absolute children */
}

.btn-learn-more {
    position: absolute;
    bottom: calc(800px / 3);
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 40px;
    font-size: clamp(1.1rem, 3vw, 1.3rem);
}

.bio-overlay-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-backdrop);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    padding: var(--content-padding);
}
.bio-overlay-container.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.bio-content-box {
    background-color: var(--background-warm-sand);
    padding: clamp(20px, 5vw, 40px);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    max-width: 650px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.bio-overlay-container.is-visible .bio-content-box {
    transform: scale(1);
}
.bio-content-box p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.btn-close-bio {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary-slate-gray);
    cursor: pointer;
    line-height: 1;
    padding: 5px;
}
.btn-close-bio:hover {
    color: var(--ribbon-blue-deep);
}

/* --- Language Toggle Styles --- */
/* #langToggle { ... } */ /* Remove or comment out the old #langToggle absolute positioning rules */

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .page-wrapper {
        /* page-max-width still applies, padding is fine */
    }
    nav { 
        gap: clamp(10px, 2.5vw, 20px); /* Further adjust gap for tablets */
    }
    nav a,
    .nav-lang-toggle {
        font-size: clamp(0.8rem, 2.2vw, 1rem); /* Adjust font for tablets */
    }

    .floral-decoration {
        width: 100px;
    }
    .floral-bottom-left { left: -30px; }
    .floral-bottom-right { right: -30px; }

    /* No override: keep fixed 800px height across devices */
}

@media (max-width: 480px) {
    body { font-size: 0.9375rem; } /* 15px */
    :root { --content-padding: 15px; }

    nav {
        /* gap: clamp(8px, 2vw, 15px); Ensure this doesn't make it too cramped or use justify-content: space-between if items are few */
        justify-content: space-around; /* Distribute items evenly on small screens */
        gap: 10px; /* Fixed gap for very small screens */
    }
    nav a,
    .nav-lang-toggle {
        font-size: clamp(0.75rem, 2.8vw, 0.9rem); /* Smaller font for mobile */
        letter-spacing: 0.5px;
    }

    .floral-decoration {
        width: 70px;
    }
    .floral-bottom-left { left: -20px; }
    .floral-bottom-right { right: -20px; }
    
    .bio-content-box {
        width: 95%;
        padding: 20px;
    }
    .btn-close-bio { top: 10px; right: 10px; font-size: 1.8rem; }
} 