/* 
   ==========================================================================
   style.css
   Project: Instituto Rafael Silva - Face & Implantes
   Re-engineered Layout matching requested screenshot structure
   Theme: Luxury Navy & Gold Palette
   ==========================================================================
*/
@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy: #0f1a2c;
  --navy-light: #1a2b47;
  --gold: #c59b5f;
  --gold-light: #e8d1a7;
  --gold-gradient: linear-gradient(135deg, #a67b42 0%, #e5c384 50%, #a67b42 100%);
  --white: #ffffff;
  --bg-light: #f4f7fb;
  --text-grey: #667085;
  --border-color: #eaecf0;
  --br-lg: 24px;
  --br-md: 16px;
  --br-sm: 8px;
  --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
  --shadow-lg: 0 20px 40px rgba(15,26,44,0.08);
  --shadow-gold: 0 10px 25px rgba(197, 155, 95, 0.2);
}

body {
  font-family: 'Urbanist', sans-serif;
  color: var(--text-grey);
  background-color: var(--white);
  overflow-x: hidden;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 { color: var(--navy); font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
a { text-decoration: none; transition: 0.3s ease; }
a:hover { text-decoration: none; }
img { max-width: 100%; border-radius: var(--br-md); }
section { padding: 100px 0; }

/* Utilities */
.text-navy { color: var(--navy) !important; }
.text-gold { color: var(--gold) !important; }
.bg-navy { background-color: var(--navy) !important; }
.bg-light-blue { background-color: var(--bg-light) !important; }
.fw-600 { font-weight: 600; }
.fw-800 { font-weight: 800; }

/* Badge / Label */
.badge-gold {
    display: inline-flex;
    align-items: center;
    background: rgba(197, 155, 95, 0.1);
    color: var(--gold);
    font-weight: 800;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.badge-navy {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 26, 44, 0.05);
    color: var(--navy);
    font-weight: 800;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

/* Buttons */
.btn-primary-gold {
    background: var(--gold-gradient);
    color: var(--navy) !important;
    font-weight: 800;
    padding: 8px 8px 8px 30px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border: none;
    box-shadow: var(--shadow-gold);
}
.btn-primary-gold .icon-circle {
    background: var(--white);
    color: var(--navy);
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.btn-primary-gold:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(197, 155, 95, 0.4); }

.btn-secondary-navy {
    background: var(--white);
    color: var(--navy) !important;
    font-weight: 800;
    padding: 16px 35px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border-color);
    gap: 10px;
}
.btn-secondary-navy:hover { border-color: var(--navy); }
.btn-secondary-navy .fa-play { color: var(--gold); }

/* Header */
.topbar { background: var(--navy); padding: 8px 0; font-size: 14px; color: #fff; }
.topbar a { color: #fff; opacity: 0.8; margin-left: 20px; }
.topbar a:hover { opacity: 1; color: var(--gold); }
.main-header { padding: 15px 0; background: var(--white); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 1000; }
.navbar-brand { font-size: 26px; font-weight: 900; color: var(--navy) !important; letter-spacing: -1px; }
.nav-link { font-weight: 700; color: var(--navy) !important; margin: 0 15px; font-size: 16px; }
.nav-link:hover { color: var(--gold) !important; }
.header-contact-icon { width: 45px; height: 45px; border-radius: 50%; background: rgba(197, 155, 95, 0.1); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 18px; }

/* Hero Section */
.hero-section { padding: 60px 0 100px; position: relative; overflow: hidden; background: #fff;}
.hero-title { font-size: 70px; line-height: 1.1; margin-bottom: 25px; letter-spacing:-1px; }
.hero-desc { font-size: 20px; color: var(--text-grey); margin-bottom: 40px; max-width: 90%; }
.hero-img-col { height: 750px; }
.hero-main-img { height: 100%; object-fit: cover; border-top-left-radius: 60px; border-bottom-left-radius: 60px; box-shadow: var(--shadow-lg); }

/* Hero Floating Mini Cards */
.mini-card { background: var(--white); padding: 15px 25px; border-radius: 100px; box-shadow: var(--shadow-lg); display: flex; align-items: center; border: 1px solid #f9f9f9; }
.mini-icon { width: 45px; height: 45px; background: rgba(15,26,44,0.05); color: var(--navy); display: flex; align-items: center; justify-content: center; border-radius: 50%; margin-right: 15px; font-size:20px;}
.mini-card strong { font-size: 16px; color: var(--navy); display: block; line-height: 1; margin-bottom: 3px; }
.mini-card small { font-size: 13px; font-weight: 600; color: var(--text-grey); line-height: 1;}

.hero-video-flyout { position: absolute; bottom: 50px; left: -80px; background: var(--white); padding: 25px; border-radius: var(--br-lg); box-shadow: var(--shadow-lg); display: flex; align-items: center; z-index: 10; width: 320px; }
.hero-video-flyout .play-btn { width: 60px; height: 60px; border-radius: 50%; background: var(--gold-gradient); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; flex-shrink: 0; }
.hero-video-flyout img { width: 80px; height: 80px; border-radius: var(--br-md); margin-right: 20px; object-fit: cover; }

/* Infinite Marquee */
.marquee-section {
    background: transparent;
    padding: 40px 0;
    overflow: hidden;
    position: relative;
}
.marquee-container { width: 100%; overflow: hidden; }
.marquee-track {
    display: flex;
    width: max-content;
    animation: scrollMarquee 35s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 0 45px;
    font-size: 20px;
    font-weight: 800;
    color: var(--navy);
}
.marquee-item i {
    color: var(--gold);
    font-size: 22px;
    background: rgba(197, 155, 95, 0.1);
    width: 55px; height: 55px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(197, 155, 95, 0.15);
}
@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (max-width: 991px) {
    .marquee-item { font-size: 16px; padding: 0 20px; }
    .marquee-item i { width: 45px; height: 45px; font-size: 18px; }
}

/* About Section */
.about-images { position: relative; height: 650px; }
.img-main { position: absolute; right: 0; top: 0; width: 85%; height: 90%; object-fit: cover; border-radius: var(--br-lg); box-shadow: var(--shadow-lg); }
.img-sub { position: absolute; left: 0; bottom: 0; width: 55%; height: 50%; object-fit: cover; border-radius: var(--br-lg); box-shadow: var(--shadow-lg); border: 10px solid var(--white); }
.exp-badge { position: absolute; top: 40px; left: -20px; background: var(--white); padding: 20px 30px; border-radius: var(--br-lg); box-shadow: var(--shadow-lg); display: flex; gap: 15px; align-items: center; z-index: 5; }
.exp-badge h3 { font-size: 40px; color: var(--navy); margin: 0; }
.exp-badge span { font-weight: 700; color: var(--text-grey); line-height: 1.2; font-size: 15px;}
.exp-badge .icon-box { background: rgba(197, 155, 95, 0.1); color: var(--gold); border-radius: 12px; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; font-size: 24px;}

.about-list li { margin-bottom: 15px; font-weight: 700; color: var(--navy); display: flex; align-items: center; font-size: 18px; }
.about-list li i { color: var(--gold); font-size: 20px; margin-right: 15px; }

/* Stats Row */
.stats-row { border-top: 1px solid var(--border-color); padding-top: 30px; margin-top: 40px; }
.stat-box h3 { font-size: 36px; color: var(--navy); margin-bottom: 5px; }
.stat-box p { font-size: 15px; font-weight: 700; color: var(--text-grey); margin: 0; }

/* Services Section */
.services-section { background-color: var(--bg-light); position: relative;}
.service-card { background: var(--white); padding: 45px 40px; border-radius: var(--br-lg); transition: 0.3s; height: 100%; border: 1px solid transparent; }
.service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: rgba(15,26,44,0.05); }
.service-icon { width: 70px; height: 70px; background: rgba(15,26,44,0.03); color: var(--navy); font-size: 30px; border-radius: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 25px; transition: 0.3s;}
.service-card:hover .service-icon { background: var(--navy); color: var(--white); }

/* Why Choose Us */
.why-choose-bg { position: relative; }
.why-choose-bg::before { content: ''; position: absolute; left: -50px; top: 100px; width: 200px; height: 400px; background: rgba(15,26,44,0.03); border-radius: 0 200px 200px 0; z-index:-1;}
.why-img-container { position: relative; display: inline-block; }
.why-img { border-radius: 200px 200px 0 0; box-shadow: var(--shadow-lg); height: 600px; object-fit: cover; }
.why-badge { position: absolute; bottom: 30px; right: -30px; background: var(--white); padding: 25px; border-radius: 50%; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; width: 120px; height: 120px; }
.why-badge img { width: 60%; }

/* Contact CTA Form Section */
.cta-form-section { background: var(--navy); padding: 100px 0; margin: 80px 0 0 0; position: relative; border-radius: 0; }
.cta-form-section::before { content: ''; position: absolute; top:0; left:0; width:100%; height:100%; background: url('https://images.unsplash.com/photo-1629909613654-28e377c37b09?auto=format&fit=crop&q=80') center/cover; opacity: 0.15; }
.form-input { height: 60px; border-radius: 50px; padding: 0 30px; border: none; font-weight: 600; font-size: 16px; margin-bottom: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.form-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(197, 155, 95, 0.5); }

/* Footer */
.footer { background: var(--navy); color: #a0aec0; padding: 80px 0 40px; }
.footer .navbar-brand { color: var(--white) !important; }
.footer h4 { color: var(--white); font-size: 20px; margin-bottom: 25px; }
.footer-text { margin-bottom: 30px; font-size: 16px; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #a0aec0; font-weight: 600; }
.footer-links a:hover { color: var(--gold); padding-left: 5px; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-right: 10px; }
.social-links a:hover { background: var(--gold); color: var(--navy); }

@media (max-width: 991px) {
  .hero-img-col { height: 400px; margin-top: 40px; }
  .hero-main-img { border-radius: var(--br-lg); }
  .hero-video-flyout { left: 50%; transform: translateX(-50%); bottom: -30px; width: 90%; }
  .hero-title { font-size: 45px; }
  .about-images { height: auto; display: flex; flex-direction: column; margin-bottom: 60px; }
  .img-main { order: 1; position: static; width: 100%; border-radius: var(--br-lg); }
  .exp-badge { position: relative; top: auto; left: auto; order: 2; margin: -40px auto -20px; z-index: 10; width: 85%; justify-content: center; box-shadow: var(--shadow-lg); }
  .img-sub { order: 3; position: static; width: 100%; border-radius: var(--br-lg); border: none; }
  .why-img { height: 400px; border-radius: var(--br-lg); margin-top: 50px;}
  .cta-form-section { border-radius: 0; padding: 60px 20px; }
}

/* Custom Override for Animate.css fadeInUp for a luxurious, smoother entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
.fadeInUp {
    animation-name: fadeInUp;
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
    animation-duration: 1.2s !important;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gold-gradient);
    color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 10px 20px rgba(197, 155, 95, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 9999;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(197, 155, 95, 0.5);
    color: var(--white);
    background: var(--navy);
}

/* Fullscreen Mobile Menu Animations & Adjustments */
@media (max-width: 991px) {
    #mainNav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh !important;
        background-color: var(--navy);
        z-index: 1040;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        /* Start with a tiny circle mask hidden near the toggler */
        clip-path: circle(0px at calc(100% - 40px) 40px);
        transition: clip-path 0.7s cubic-bezier(0.86, 0, 0.07, 1) !important;
        pointer-events: none;
    }
    #mainNav.show, #mainNav.collapsing {
        /* Expand the circle mask to cover entire screen */
        clip-path: circle(150% at calc(100% - 40px) 40px);
        pointer-events: all;
    }
    
    /* Child Stagger Transitions */
    #mainNav .nav-link {
        color: var(--white) !important;
        font-size: 32px;
        font-weight: 800;
        text-transform: uppercase;
        margin: 15px 0;
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.5s ease;
    }
    #mainNav.show .nav-link {
        opacity: 1;
        transform: translateY(0);
    }
    /* Cascading motion for nav links */
    #mainNav.show .nav-link:nth-child(1) { transition-delay: 0.2s; }
    #mainNav.show .nav-link:nth-child(2) { transition-delay: 0.3s; }
    #mainNav.show .nav-link:nth-child(3) { transition-delay: 0.4s; }
    #mainNav.show .nav-link:nth-child(4) { transition-delay: 0.5s; }

    /* Customizing Contact Area Inside Form Group */
    .mobile-contact-group {
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.5s ease 0.6s;
    }
    #mainNav.show .mobile-contact-group {
        opacity: 1;
        transform: translateY(0);
    }
    .text-contact-label { color: rgba(255,255,255,0.6) !important; }
    .text-contact-phone { color: var(--gold) !important; font-size: 26px !important; display: block; margin-top: 5px; }
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    z-index: 99999;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -10px 40px rgba(15, 26, 44, 0.08);
    transform: translateY(110%);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cookie-banner.show {
    transform: translateY(0);
}
.cookie-text {
    font-size: 14px;
    color: var(--text-grey);
    line-height: 1.6;
}
.cookie-text a {
    color: var(--navy);
    font-weight: 700;
    text-decoration: underline;
}
.cookie-text a:hover {
    color: var(--gold);
}
.btn-cookie-gold {
    background: var(--gold-gradient);
    color: var(--navy) !important;
    font-weight: 800;
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.3s;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
}
.btn-cookie-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(197, 155, 95, 0.4);
}
.btn-cookie-navy {
    background: transparent;
    color: var(--navy) !important;
    font-weight: 800;
    padding: 10px 25px;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: 0.3s;
    white-space: nowrap;
    cursor: pointer;
}
.btn-cookie-navy:hover {
    border-color: var(--navy);
}
.cookie-link {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-grey);
    text-decoration: underline;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: 0.3s;
}
.cookie-link:hover {
    color: var(--navy);
}

@media (max-width: 991px) {
    .cookie-banner { padding: 20px 0; }
    .cookie-text { font-size: 12px; margin-bottom: 20px; text-align: justify; }
    .btn-cookie-gold, .btn-cookie-navy { width: 100%; text-align: center; }
}


/* =========================================================================
   GALLERY / COMPARISON SLIDER
   ========================================================================= */
.gallery-section {
    position: relative;
    z-index: 1;
}

.comparison-slider {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    line-height: 0;
    --position: 50%;
    background-color: #fff;
}

.comparison-slider img {
    width: 100%;
    height: auto;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    display: block;
}

.img-after {
    filter: brightness(1.05); /* Slight enhancement for "after" pop if requested */
}

.img-before {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    clip-path: polygon(0 0, var(--position) 0, var(--position) 100%, 0 100%);
    z-index: 2;
    filter: grayscale(20%); /* Subtle subtle difference to separate them naturally */
}

.slider-control {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 5;
    cursor: ew-resize;
    margin: 0;
}

.slider-line {
    position: absolute;
    top: 0;
    left: var(--position);
    bottom: 0;
    width: 4px;
    background: var(--gold);
    z-index: 3;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: var(--navy);
    border: 3px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    color: var(--gold);
    transition: transform 0.2s ease;
}

.comparison-slider:hover .slider-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.slider-button i {
    font-size: 16px;
}

.comparison-labels span {
    position: absolute;
    bottom: 20px;
    padding: 6px 16px;
    background: rgba(3, 27, 51, 0.85); /* Navy transparent */
    color: white;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 4;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.label-before {
    left: 20px;
}

.label-after {
    right: 20px;
}
