@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Outfit:wght@200;300;500;700&display=swap');

:root {
    /* Vibrant Mediterranean Palette */
    --med-blue: #005F73;
    --med-blue-bright: #0A9396;
    --med-cyan: #94D2BD;
    --med-sand: #E9D8A6;
    --med-clay: #EE9B00;
    --med-terracotta: #CA6702;

    /* Semantic Colors */
    --primary: var(--med-blue);
    --accent: var(--med-blue-bright);
    --light-cyan: #EAF6F4;
    --bg-light: #FDFDFF;
    --text-dark: #001219;
    --text-muted: #667085;

    /* Design Tokens - Fine & Modern */
    --header-font: 'Outfit', sans-serif;
    --body-font: 'Inter', sans-serif;
    --shadow-soft: 0 10px 40px rgba(0, 95, 115, 0.05);
    --shadow-deep: 0 20px 60px rgba(0, 18, 25, 0.08);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --border-radius-lg: 32px;
    --banner-height: 48px;
    /* Slightly taller for mobile tap target */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--body-font);
    font-weight: 300;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--banner-height, 0px);
    width: 100%;
}

/* Typography (Mobile Default) */
h1,
h2,
h3 {
    font-family: var(--header-font);
    font-weight: 200;
    line-height: 1.2;
    color: var(--primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    font-weight: 300;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* -------------------------
   Banner Superior Temporal
   ------------------------- */
#top-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 95, 115, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 0.5rem 5%;
    font-size: 0.75rem;
    font-family: var(--body-font);
    z-index: 1001;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: var(--banner-height);
}

#top-banner span {
    display: block;
    width: 100%;
    margin-top: 3px;
}

.banner-mobile-break {
    display: none;
}

/* -------------------------
   Header & Navigation
   ------------------------- */
header {
    position: fixed;
    top: var(--banner-height, 0);
    left: 0;
    width: 100%;
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(253, 253, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 0.6rem 5%;
    border-bottom: 1px solid rgba(0, 95, 115, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--header-font);
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo span {
    color: #D4AF37;
    font-weight: 600;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

header.scrolled .logo {
    color: var(--primary);
    background: transparent;
    backdrop-filter: none;
    border-color: transparent;
    padding: 0.4rem 0;
}

header.scrolled .logo span {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.05));
}

.logo img {
    height: 38px !important;
    width: auto !important;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

header.scrolled .logo img {
    filter: drop-shadow(0 2px 4px rgba(0, 95, 115, 0.15));
}

.desktop-nav {
    display: none;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2000;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: left center;
}

header.scrolled .menu-toggle .bar {
    background-color: var(--primary);
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg);
    background-color: var(--primary) !important;
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg);
    background-color: var(--primary) !important;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(253, 253, 255, 0.98);
    backdrop-filter: blur(15px);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s;
    visibility: hidden;
    padding: 2rem;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.mobile-link {
    color: var(--text-dark);
    font-size: 1.2rem;
    font-family: var(--header-font);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    width: 100%;
    padding: 0.5rem;
}

.mobile-link:hover {
    color: var(--med-terracotta);
}

.btn-mobile-cta {
    background: var(--primary);
    color: white !important;
    padding: 1rem 2rem;
    border-radius: 100px;
    font-size: 1rem;
    box-shadow: var(--shadow-soft);
}

/* -------------------------
   Hero Section
   ------------------------- */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 120px 5% 4rem;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 50, 60, 0.75) 0%, rgba(0, 95, 115, 0.4) 50%, rgba(0, 18, 25, 0.7) 100%);
}

#hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    width: 100%;
    color: white;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-tag {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--med-sand);
    margin-bottom: 1.2rem;
    display: inline-block;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero h1 {
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    font-weight: 300;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.btn-more {
    display: block;
    width: 100%;
    max-width: 320px;
    padding: 1rem;
    border: 1px solid rgba(233, 216, 166, 0.5);
    color: var(--med-sand);
    border-radius: 100px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(5px);
}

.btn-more:hover {
    background: var(--med-sand);
    color: var(--primary);
    border-color: var(--med-sand);
    transform: translateY(-2px);
}

/* -------------------------
   Sections Shared
   ------------------------- */
.philosophy-section,
.treatments-section,
.trajectory-section,
.contact-hero {
    padding: 4rem 5%;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
}

.philosophy-img {
    order: -1;
}

.philosophy-img img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-deep);
    object-fit: cover;
}

.treatments-section {
    background: #f8fafb;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

.treatment-card {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 95, 115, 0.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.treatment-icon {
    font-size: 1.8rem;
    color: var(--med-clay);
    margin-bottom: 1rem;
    display: block;
}

/* -------------------------
   Trajectory
   ------------------------- */
.trajectory-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.timeline {
    position: relative;
    padding-left: 1rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--med-cyan);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.timeline-date {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--med-terracotta);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.8rem;
    display: block;
}

.timeline-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* -------------------------
   Contact & Form
   ------------------------- */
.contact-hero {
    background: var(--primary);
    color: white;
    text-align: center;
    padding-bottom: 8rem;
}

.contact-hero h2 {
    color: white;
}

.form-container {
    width: 90%;
    max-width: 500px;
    margin: -5rem auto 4rem;
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-deep);
    position: relative;
    z-index: 10;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 0;
    border: none;
    border-bottom: 1px solid #eee;
    font-family: var(--body-font);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    background: transparent;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: var(--med-blue-bright);
}

.submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 100px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: 1.5rem;
    -webkit-appearance: none;
    appearance: none;
}

.submit-btn:hover {
    background: var(--med-terracotta);
}

/* -------------------------
   Footer
   ------------------------- */
footer {
    padding: 3rem 5%;
    text-align: center;
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-logo {
    font-family: var(--header-font);
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
    font-weight: 500;
    letter-spacing: 2px;
}

.footer-legal {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 95, 115, 0.1);
    font-size: 0.8rem;
}

.footer-legal a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--primary);
}

.legal-separator {
    color: rgba(102, 112, 133, 0.4);
}

/* -------------------------
   Animations
   ------------------------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================================
   BREAKPOINTS (Mobile-First)
   ========================================================================= */

/* --- Custom Utility Overrides for Mobile (Prevent Inline Overflows) --- */
.philosophy-content {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

ul[style*="grid-template-columns"],
div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
}

.philosophy-content>div[style*="padding: 3rem"] {
    padding: 2rem 1.5rem !important;
}

/* --- Extra Small Devices (Smartphones, 480px and up) --- */
@media (min-width: 480px) {
    h1 {
        font-size: 2.6rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .hero-tag {
        font-size: 0.8rem;
        letter-spacing: 4px;
    }

    .form-container {
        padding: 3rem 2.5rem;
    }

    .philosophy-content>div[style*="padding: 3rem"] {
        padding: 2.5rem 2rem !important;
    }
}

/* --- Small Devices (Tablets, 768px and up) --- */
@media (min-width: 768px) {
    body {
        line-height: 1.8;
    }

    h1 {
        font-size: 3.2rem;
    }

    h2 {
        font-size: 2.8rem;
    }

    p {
        font-size: 1.1rem;
    }

    #top-banner {
        flex-direction: row;
        font-size: 0.85rem;
        padding: 0.4rem 5%;
    }

    #top-banner span {
        display: inline;
        width: auto;
        margin-top: 0;
    }

    .banner-mobile-break {
        display: inline-block;
        margin: 0 10px;
    }

    header {
        padding: 1.2rem 5%;
    }

    .logo {
        font-size: 1.4rem;
        padding: 0.5rem 1rem;
        background: transparent;
        border-color: transparent;
    }

    .logo img {
        height: 48px !important;
    }

    header.scrolled {
        padding: 0.8rem 5%;
    }

    .hero {
        align-items: center;
        padding-top: 6rem;
    }

    .btn-more,
    .btn-mobile-cta {
        width: auto;
        display: inline-block;
        padding: 1.1rem 2.8rem;
    }

    .philosophy-section,
    .treatments-section,
    .trajectory-section,
    .contact-hero {
        padding: 6rem 5%;
    }

    ul[style*="grid-template-columns"],
    div[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .grid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .treatment-card {
        padding: 3rem 2rem;
    }

    .treatment-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-deep);
    }

    .form-container {
        width: 80%;
        max-width: 600px;
    }
}

/* --- Medium Devices (Desktops, 992px and up) --- */
@media (min-width: 992px) {
    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 3.5rem;
    }

    .menu-toggle {
        display: none;
    }

    .desktop-nav {
        display: flex;
        align-items: center;
    }

    .desktop-nav a {
        text-decoration: none;
        color: white;
        font-weight: 400;
        margin-left: 2.5rem;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 2px;
        transition: var(--transition);
    }

    .desktop-nav a:hover {
        color: var(--med-sand);
    }

    header.scrolled .desktop-nav a:not(.cta-nav) {
        color: var(--primary);
    }

    header.scrolled .desktop-nav a:not(.cta-nav):hover {
        color: var(--med-terracotta);
    }

    .cta-nav {
        background: var(--primary);
        color: white !important;
        padding: 0.9rem 2.2rem;
        border-radius: 100px;
        font-weight: 500;
    }

    .cta-nav:hover {
        background: var(--med-terracotta);
    }

    .philosophy-section,
    .trajectory-container {
        flex-direction: row;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5rem;
        align-items: center;
    }

    .philosophy-img {
        order: 0;
    }

    .philosophy-img img {
        height: 100%;
    }

    .philosophy-content {
        padding-right: initial !important;
        padding-left: initial !important;
    }

    .philosophy-content>div[style*="padding: 3rem"] {
        padding: 3rem !important;
    }

    .grid-layout {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }

    .trajectory-container {
        grid-template-columns: 1fr 1.5fr;
        gap: 6rem;
    }

    .timeline {
        padding-left: 2rem;
    }

    .timeline-item {
        margin-bottom: 5rem;
        padding-left: 2.5rem;
    }

    .timeline-title {
        font-size: 1.5rem;
    }

    .contact-hero {
        padding: 10rem 5% 12rem;
    }

    .form-container {
        width: 100%;
        max-width: 700px;
        padding: 5rem;
        margin: -8rem auto 8rem;
    }

    .submit-btn {
        width: 100%;
        padding: 1.2rem;
        font-size: 1rem;
    }
}

/* --- Large Devices (Large Desktops, 1200px and up) --- */
@media (min-width: 1200px) {
    h1 {
        font-size: clamp(4rem, 6vw, 5.5rem);
    }

    h2 {
        font-size: clamp(3.5rem, 5vw, 4.5rem);
    }

    header {
        padding: 1.6rem 5%;
    }

    .logo {
        font-size: 1.6rem;
        padding: 0.5rem 1.2rem;
    }

    .logo img {
        height: 56px !important;
    }

    .desktop-nav a {
        margin-left: 3.5rem;
    }

    .philosophy-section,
    .treatments-section,
    .trajectory-section {
        padding: 10rem 5%;
        max-width: 1400px;
        margin: 0 auto;
    }

    .philosophy-section {
        gap: 8rem;
    }

    .treatment-card {
        padding: 4rem 3rem;
    }

    .grid-layout {
        gap: 3rem;
    }

    .trajectory-container {
        gap: 8rem;
        max-width: 1200px;
    }
}

/* =========================================================================
   WhatsApp Floating Button
   ========================================================================= */
.fl-contact-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.fl-contact-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    color: #FFF;
}

.fl-contact-btn svg {
    width: 35px;
    height: 35px;
    fill: currentColor;
}

/* Tooltip for WhatsApp */
.fl-contact-btn::before {
    content: "Contactar por WhatsApp";
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background-color: white;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-family: var(--body-font);
    font-weight: 500;
    pointer-events: none;
}

.fl-contact-btn:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 768px) {
    .fl-contact-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .fl-contact-btn svg {
        width: 28px;
        height: 28px;
    }

    .fl-contact-btn::before {
        display: none;
    }
}