/* =================================================================
   UI ENHANCEMENTS — Typography polish, interactions, animations
   Loaded AFTER style.css, BEFORE landing.css (or after both)
   ================================================================= */

/* ===== DARK SURFACE VARIANTS ===== */
:root {
    --dark-raised: #141e3a;
    --dark-sunken: #080f1e;
}

/* ===== TEXT SELECTION COLOR ===== */
::selection      { background: var(--accent-light); color: var(--dark); }
::-moz-selection { background: var(--accent-light); color: var(--dark); }

/* ===== TYPOGRAPHY REFINEMENT ===== */
/* Tighter kerning on large headings */
h1, .hero__title, .lp-hero__title,
.page-header h1 {
    letter-spacing: -0.045em;
}
/* Subtle tracking on small labels */
.section-label, .nav__link, .footer__heading {
    font-feature-settings: "ss01", "cv01";
}

/* ===== INLINE LINK UNDERLINE (text paragraphs only) ===== */
.section p a:not(.btn):not([class*="card"]):not([class*="hero__"]):not([class*="cta-"]),
.about__text p a:not(.btn),
.lp-alt__content p a:not(.btn) {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(37,55,95,.3);
    transition: color .25s, text-decoration-color .25s;
}
.section p a:hover:not(.btn) {
    color: var(--accent-dark);
    text-decoration-color: var(--accent);
}

/* ===== DROP CAP ===== */
.about__text > div > p:first-of-type::first-letter,
.lp-alt__content > p:first-of-type::first-letter {
    float: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 3.4rem;
    line-height: 0.9;
    font-weight: 900;
    color: var(--accent-light);
    padding: 6px 12px 0 0;
    margin-top: 2px;
    -webkit-text-stroke: 1px var(--accent);
}

/* ===== SECTION DIVIDERS ===== */
.section-divider {
    display: block;
    width: 60px; height: 2px;
    background: var(--accent-light);
    margin: 0 auto 40px;
    border: 0;
    position: relative;
}
.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute; top: 50%;
    width: 120px; height: 1px;
    background: linear-gradient(to right, transparent, rgba(37,55,95,.15));
    transform: translateY(-50%);
}
.section-divider::before { right: 100%; margin-right: 20px; transform: translateY(-50%) scaleX(-1); }
.section-divider::after  { left: 100%;  margin-left: 20px;  }

/* ===== BUTTONS: icon hover animation (keep original blue) ===== */
/* Gradient removed — blue buttons have white text that must stay legible */

/* Icon-forward arrow animation inside buttons */
.btn svg {
    transition: transform .35s var(--ease-lux);
}
.btn:hover svg {
    transform: translateX(4px);
}
/* WhatsApp mobile CTA button: no translate (icon is brand, not directional) */
.mobile-cta-bar__btn svg,
.whatsapp-fab svg,
.hero__tel svg,
.lp-header__tel svg,
.lp-hero__guarantee svg,
.btn--back svg {
    transition: transform .3s;
}
.mobile-cta-bar__btn:hover svg,
.whatsapp-fab:hover svg,
.hero__tel:hover svg,
.lp-header__tel:hover svg {
    transform: scale(1.12);
}
/* Back/prev arrows translate LEFT */
.btn--back:hover svg { transform: translateX(-4px); }

/* Button ripple removed — the base .btn already has a ::before hover expansion
   which was causing double-effect / "giant" visual on click when combined */

/* ===== FAQ TOGGLE ROTATION ===== */
.lp-faq-item summary::after {
    display: inline-block;
    transition: transform .3s var(--ease-lux);
    transform-origin: center;
    content: '+' !important;
}
.lp-faq-item[open] summary::after {
    transform: rotate(135deg);
}

/* ===== SERVICE CARD: Caption slide-up on hover ===== */
.service-card__image {
    position: relative;
}
.service-card__image::after {
    content: attr(data-overlay);
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 14px 18px;
    background: linear-gradient(to top, rgba(13,21,40,.9), transparent);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: .78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.5px;
    transform: translateY(100%);
    transition: transform .5s var(--ease-lux);
}
.service-card:hover .service-card__image::after {
    transform: translateY(0);
}

/* ===== TEAM HOVER OVERLAY ===== */
.team-card__photo { position: relative; overflow: hidden; }
.team-card__hover {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(13,21,40,.92) 0%, rgba(13,21,40,.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity .4s var(--ease-lux);
    pointer-events: none;
}
.team-card:hover .team-card__hover { opacity: 1; }
.team-card__hover-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    color: var(--accent-light);
    margin-bottom: 4px;
    transform: translateY(10px);
    transition: transform .5s var(--ease-lux) .05s;
}
.team-card__hover-text {
    font-size: .78rem; font-weight: 500;
    color: var(--white); line-height: 1.4;
    transform: translateY(10px);
    transition: transform .5s var(--ease-lux) .1s;
}
.team-card:hover .team-card__hover-tag,
.team-card:hover .team-card__hover-text { transform: translateY(0); }

/* ===== FLOATING LABELS ===== */
.form__group--floating { position: relative; }
.form__group--floating .form__input,
.form__group--floating .form__textarea {
    padding: 22px 18px 10px;
}
.form__group--floating .form__label {
    position: absolute;
    top: 18px; left: 18px;
    color: var(--text-muted);
    font-size: .92rem;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    margin: 0;
    pointer-events: none;
    transition: all .25s var(--ease-lux);
    background: transparent;
}
.form__group--floating .form__input:focus ~ .form__label,
.form__group--floating .form__input:not(:placeholder-shown) ~ .form__label,
.form__group--floating .form__textarea:focus ~ .form__label,
.form__group--floating .form__textarea:not(:placeholder-shown) ~ .form__label,
.form__group--floating select.form__input:valid ~ .form__label {
    top: 6px;
    font-size: .66rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.form__group--floating select.form__input { color: var(--text); }
.form__group--floating select.form__input:invalid { color: transparent; }
.form__group--floating select.form__input:valid    { color: var(--text); }

/* ===== SCROLL PROGRESS BAR ===== */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-light), #f0b800);
    width: 0;
    z-index: 9999;
    transition: width .1s linear;
    pointer-events: none;
    box-shadow: 0 0 12px rgba(249,200,0,.4);
}

/* ===== NAV INDICATOR ===== */
.nav__links { position: absolute; }
.nav__indicator {
    position: absolute;
    bottom: -6px;
    height: 2px;
    background: var(--accent-light);
    transition: left .4s var(--ease-lux), width .4s var(--ease-lux), opacity .3s;
    pointer-events: none;
    opacity: 0;
}
.nav__links.is-indicator-ready .nav__indicator { opacity: 1; }
.header.scrolled .nav__indicator { background: var(--accent); }
@media (max-width: 1000px) {
    .nav__indicator { display: none; }
}

/* ===== MOBILE MENU: Staggered link entry ===== */
@media (max-width: 1000px) {
    .nav__links .nav__link {
        opacity: 0;
        transform: translateY(-12px);
        transition: opacity .5s var(--ease-lux), transform .5s var(--ease-lux);
    }
    .nav__links.open .nav__link { opacity: 1; transform: translateY(0); }
    .nav__links.open .nav__link:nth-child(1) { transition-delay: 120ms; }
    .nav__links.open .nav__link:nth-child(2) { transition-delay: 180ms; }
    .nav__links.open .nav__link:nth-child(3) { transition-delay: 240ms; }
    .nav__links.open .nav__link:nth-child(4) { transition-delay: 300ms; }
    .nav__links.open .nav__link:nth-child(5) { transition-delay: 360ms; }
    .nav__links.open .nav__link:nth-child(6) { transition-delay: 420ms; }
    .nav__links.open .nav__link:nth-child(7) { transition-delay: 480ms; }
    /* Subtle gradient background on mobile menu overlay */
    .nav__links {
        background:
            radial-gradient(ellipse at top, rgba(249,200,0,.08), transparent 60%),
            var(--dark);
    }
}

/* ===== STAGGER ANIMATIONS ON SCROLL ===== */
.stagger > .animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.stagger > .animate-on-scroll:nth-child(2) { transition-delay: 80ms; }
.stagger > .animate-on-scroll:nth-child(3) { transition-delay: 160ms; }
.stagger > .animate-on-scroll:nth-child(4) { transition-delay: 240ms; }
.stagger > .animate-on-scroll:nth-child(5) { transition-delay: 320ms; }
.stagger > .animate-on-scroll:nth-child(6) { transition-delay: 400ms; }
.stagger > .animate-on-scroll:nth-child(7) { transition-delay: 480ms; }
.stagger > .animate-on-scroll:nth-child(8) { transition-delay: 560ms; }

/* ===== CASI STUDIO THUMBNAIL PREVIEWS ===== */
.ba-thumbs {
    display: flex; justify-content: center;
    gap: 14px; margin-bottom: 32px; flex-wrap: wrap;
}
.ba-thumb {
    display: flex; flex-direction: column;
    background: var(--white);
    border: 1px solid rgba(13,21,40,.1);
    cursor: pointer;
    overflow: hidden;
    transition: all .4s var(--ease-lux);
    padding: 0;
    width: 200px;
    position: relative;
}
.ba-thumb:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}
.ba-thumb--active {
    border-color: var(--accent);
    box-shadow: 0 10px 28px rgba(37,55,95,.18);
}
.ba-thumb--active::after {
    content: ''; position: absolute;
    top: 10px; right: 10px;
    width: 18px; height: 18px;
    background: var(--accent-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d1528' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/60% no-repeat;
    border-radius: 50%;
}
.ba-thumb__img {
    height: 100px; overflow: hidden;
    display: flex; position: relative;
}
.ba-thumb__img img {
    flex: 1; width: 50%; height: 100%; object-fit: cover;
    filter: saturate(.7) brightness(.9);
}
.ba-thumb__img::before {
    content: ''; position: absolute;
    top: 0; bottom: 0; left: 50%;
    width: 1px; background: rgba(249,200,0,.7);
    z-index: 2;
}
.ba-thumb__label {
    padding: 12px 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--text);
    text-align: center;
}
.ba-thumb--active .ba-thumb__label { color: var(--accent); }
@media (max-width: 768px) {
    .ba-thumb { width: calc(50% - 7px); }
    .ba-thumb__img { height: 80px; }
}

/* ===== FORM DENTAL LOADER ===== */
.tooth-spinner {
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    position: relative;
    width: 18px; height: 18px;
}
.tooth-spinner::before {
    content: '';
    display: block; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M12 2s-4 2-4 6c0 2 0 4 1 6s2 4 3 8c0-3 1-5 1-8 0-3-1-5-1-8v-2h-1c0-1 1-2 1-2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    animation: toothPulse 1s ease-in-out infinite;
}
@keyframes toothPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: .4; transform: scale(.9); }
}

/* ===== LOGO ACCENT DOT ===== */
.nav__logo, .lp-header__logo {
    position: relative;
}
.nav__logo::after, .lp-header__logo::after {
    content: '';
    position: absolute;
    bottom: 4px; right: -6px;
    width: 6px; height: 6px;
    background: var(--accent-light);
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(249,200,0,.2);
}
@media (max-width: 768px) {
    .nav__logo::after, .lp-header__logo::after { width: 5px; height: 5px; bottom: 2px; right: -4px; }
}
