/* ========================================
   DR. YOUSSEF ANID — CUSTOM STYLES
   ======================================== */

/* ---------- Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: #6B1D3A;
    color: #fff;
}

/* ---------- Navbar ---------- */
.nav-glass {
    background: rgba(255, 248, 245, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 196, 188, 0.3);
}

.nav-glass.scrolled {
    background: rgba(255, 248, 245, 0.95);
    box-shadow: 0 4px 24px rgba(107, 29, 58, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6B1D3A;
    border-radius: 1px;
    transition: width 0.25s ease;
}

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

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    background: #6B1D3A;
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(107, 29, 58, 0.25);
}

.btn-primary:hover {
    background: #83112c;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 29, 58, 0.35);
    color: #fff;
}

.btn-primary:focus-visible {
    outline: 3px solid #ffadb8;
    outline-offset: 2px;
}

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-outline-light:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline-light:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* ---------- Badges ---------- */
.badge-burgundy {
    display: inline-block;
    background: rgba(107, 29, 58, 0.08);
    color: #6B1D3A;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.badge-light {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: #ffd1d9;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ---------- Input Fields ---------- */
.input-field {
    appearance: none;
    background: #faf7f6;
    border: 1.5px solid #e8ddd8;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #3d302b;
    transition: all 0.2s ease;
    width: 100%;
}

.input-field::placeholder {
    color: #b8a096;
}

.input-field:hover {
    border-color: #d4c4bc;
}

.input-field:focus {
    outline: none;
    border-color: #6B1D3A;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(107, 29, 58, 0.08);
}

.input-field:focus-invalid {
    border-color: #d94f72;
    box-shadow: 0 0 0 3px rgba(217, 79, 114, 0.1);
}

/* ---------- Service Cards ---------- */
.card-service {
    /* Progressive enhancement for reveal */
}

@media (prefers-reduced-motion: no-preference) {
    .card-service {
        will-change: transform;
    }
}

/* ---------- Geometric Decorations ---------- */
.geo-shape {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.geo-circle-1 {
    top: 15%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 173, 184, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    bottom: 20%;
    right: -8%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(107, 29, 58, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 25s ease-in-out infinite reverse;
}

.geo-tri-1 {
    top: 45%;
    right: 5%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(255, 209, 217, 0.12);
    animation: rotate-slow 30s linear infinite;
}

.geo-rect-1 {
    bottom: 35%;
    left: 3%;
    width: 80px;
    height: 80px;
    background: rgba(107, 29, 58, 0.04);
    border-radius: 16px;
    transform: rotate(45deg);
    animation: float-slow 18s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
    .geo-shape {
        animation: none;
    }
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #6B1D3A;
    color: #fff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(107, 29, 58, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 40;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #83112c;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(107, 29, 58, 0.4);
}

.back-to-top:focus-visible {
    outline: 3px solid #ffadb8;
    outline-offset: 2px;
}

/* ---------- Mobile menu animation ---------- */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Utility ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
