:root {
    --primary: #148BAB;
    --primary-dark: #0f6c85;
    --primary-light: rgba(20,139,171,0.08);
    --secondary: #092c4c;
    --bg-light: #f5f8fa;
    --text-body: #6b7280;
    --text-heading: #092c4c;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow-sm: 0 2px 12px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.08);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Nunito Sans', sans-serif;
    color: var(--text-body);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Jost', sans-serif;
    color: var(--text-heading);
    font-weight: 700;
    line-height: 1.25;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.bg-light { background-color: var(--bg-light); }

/* ── Section Headers ── */
.section-subtitle {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.section-subtitle::before {
    content: '';
    width: 32px;
    height: 2px;
    background: var(--primary);
    display: inline-block;
}
.section-title { font-size: 2.5rem; margin-bottom: 16px; }
.section-desc { max-width: 560px; font-size: 1.05rem; }

.text-center { text-align: center; }
.text-center .section-subtitle::before { display: none; }
.text-center .section-desc { margin: 0 auto; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    gap: 8px;
    /* Removido white-space:nowrap — causava overflow em mobile */
    text-align: center;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--secondary); border-color: var(--secondary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.btn-secondary:hover { background: var(--primary); border-color: var(--primary); }
/* btn-outline: borda explícita, nunca herdada — fix Safari/iOS */
.btn-outline {
    background-color: transparent !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    border-style: solid !important;
    border-width: 2px !important;
    text-decoration: none !important;
}
.btn-outline:hover {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

/* ── Topbar ── */
.topbar { background: var(--secondary); color: var(--white); padding: 8px 0; font-size: 0.85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; }
.topbar-info { display: flex; gap: 24px; }
.topbar-info span { display: flex; align-items: center; gap: 6px; opacity: 0.85; }
.topbar-info i { color: var(--primary); font-size: 1rem; }
.topbar-social { display: flex; gap: 6px; }
.topbar-social a { color: rgba(255,255,255,0.7); width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: var(--transition); }
.topbar-social a:hover { color: var(--white); background: rgba(255,255,255,0.1); }

/* ── Header / Navbar ── */
.header { background: var(--primary); color: var(--white); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000; }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Jost', sans-serif; font-size: 1.6rem; font-weight: 800; color: var(--white); }
.logo i { color: var(--white); font-size: 2rem; }
.nav-menu { display: flex; gap: 32px; }
.nav-menu a { font-family: 'Jost', sans-serif; font-weight: 600; color: var(--white); font-size: 0.95rem; position: relative; padding: 4px 0; }
.nav-menu a:hover { color: rgba(255,255,255,0.8); }
.nav-menu a::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--white); transition: var(--transition); }
.nav-menu a:hover::after { width: 100%; }
.header-actions { display: flex; align-items: center; gap: 12px; }

/* Hamburger */
.mobile-menu-btn { display: none; font-size: 26px; background: none; border: none; color: var(--white); cursor: pointer; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 8px; transition: var(--transition); }
.mobile-menu-btn:hover { background: rgba(255,255,255,0.1); color: var(--white); }

/* ── Hero ── */
.hero { background: var(--bg-light); position: relative; padding: 100px 0 120px; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; right: 0; width: 44%; height: 100%; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); border-bottom-left-radius: 120px; z-index: 0; }
.hero-inner { display: flex; align-items: center; gap: 60px; position: relative; z-index: 1; }
.hero-content { flex: 1; min-width: 0; }
.hero-subtitle { color: var(--primary); font-weight: 700; font-family: 'Jost', sans-serif; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; display: block; font-size: 0.85rem; }
.hero-title { font-size: 3.2rem; line-height: 1.15; margin-bottom: 20px; }
.hero-text { font-size: 1.1rem; margin-bottom: 32px; max-width: 480px; }
.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: stretch; /* ambos botões ficam mesma altura */
}
.hero-buttons .btn {
    /* garante que ambos sempre aparecem como botão, nunca link */
    flex-shrink: 0;
}
.hero-image { flex: 0 0 46%; position: relative; }
.hero-image img { width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg); }
.hero-card { position: absolute; bottom: -24px; left: -20px; background: var(--white); padding: 20px 24px; border-radius: var(--radius); box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 14px; }
.hero-card-icon { width: 52px; height: 52px; background: var(--primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary); flex-shrink: 0; }

/* ── Stats ── */
.stats-wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: -48px; position: relative; z-index: 10; }
.stat-box { background: var(--white); padding: 32px 24px; border-radius: var(--radius); box-shadow: var(--shadow-md); text-align: center; border-bottom: 3px solid var(--primary); transition: transform 0.3s; }
.stat-box:hover { transform: translateY(-6px); }
.stat-number { font-size: 2.5rem; font-family: 'Jost', sans-serif; font-weight: 700; color: var(--secondary); }
.stat-text { color: var(--primary); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; }

/* ── Services ── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.service-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 28px; transition: var(--transition); position: relative; }
.service-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.service-icon { width: 72px; height: 72px; background: var(--primary-light); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--primary); margin-bottom: 20px; transition: var(--transition); }
.service-card:hover .service-icon { background: var(--primary); color: var(--white); }
.service-title { font-size: 1.3rem; margin-bottom: 12px; }
.service-card p { margin-bottom: 16px; font-size: 0.95rem; }
.service-link { color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; }
.service-link:hover { gap: 10px; color: var(--secondary); }

/* ── About ── */
.about-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-img { position: relative; }
.about-img img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.about-badge { position: absolute; bottom: 24px; right: -24px; background: var(--secondary); color: var(--white); padding: 24px 28px; border-radius: var(--radius); text-align: center; box-shadow: var(--shadow-md); }
.about-badge h3 { color: var(--white); font-size: 2.2rem; margin-bottom: 2px; }
.about-list { margin: 24px 0 28px; }
.about-list li { margin-bottom: 14px; display: flex; align-items: center; gap: 12px; font-family: 'Jost', sans-serif; font-weight: 600; color: var(--secondary); font-size: 1.05rem; }
.about-list i { width: 28px; height: 28px; background: var(--primary); color: var(--white); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }

/* ── Emergency CTA ── */
.emergency-cta { background: linear-gradient(135deg, var(--secondary) 0%, #0b3a66 100%); color: var(--white); padding: 80px 0; text-align: center; position: relative; overflow: hidden; }
.emergency-cta::before { content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(0,163,200,0.15) 0%, transparent 70%); border-radius: 50%; }
.emergency-cta::after { content: ''; position: absolute; bottom: -100px; left: -100px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(0,163,200,0.1) 0%, transparent 70%); border-radius: 50%; }
.emergency-cta .container { position: relative; z-index: 2; }
.emergency-cta h2 { color: var(--white); }
.emergency-phone { font-size: 3rem; font-family: 'Jost', sans-serif; font-weight: 800; color: var(--primary); display: block; margin: 16px 0 24px; transition: var(--transition); }
.emergency-phone:hover { opacity: 0.85; }

/* ── Team ── */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 48px; }
.team-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); text-align: center; transition: var(--transition); border: 1px solid var(--border); }
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.team-img { width: 100%; height: 280px; object-fit: cover; }
.team-info { padding: 20px; }
.team-name { font-size: 1.2rem; margin-bottom: 4px; }
.team-role { color: var(--primary); font-weight: 600; font-size: 0.9rem; }

/* ── Appointment ── */
.appointment-wrap { display: grid; grid-template-columns: 1.4fr 1fr; background: var(--white); box-shadow: var(--shadow-lg); border-radius: var(--radius); overflow: hidden; }
.appointment-form { padding: 48px; }
.appointment-info { background: linear-gradient(135deg, var(--secondary) 0%, #0b3a66 100%); color: var(--white); padding: 48px; }
.appointment-info h3 { color: var(--white); margin-bottom: 24px; font-size: 1.6rem; }
.info-list li { display: flex; gap: 14px; margin-bottom: 24px; align-items: flex-start; }
.info-list i { font-size: 22px; color: var(--primary); margin-top: 2px; flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-control { width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; font-family: 'Nunito Sans', sans-serif; font-size: 0.95rem; color: var(--text-body); transition: var(--transition); background: var(--bg-light); }
.form-control:focus { outline: none; border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(0,163,200,0.1); }

/* ── Footer ── */
.footer { background: #051b30; color: #8a93a6; padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 48px; }
.footer-widget h3 { color: var(--white); font-size: 1.25rem; margin-bottom: 20px; }
.footer-logo { color: var(--white); font-size: 1.6rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; font-family: 'Jost', sans-serif; font-weight: 800; }
.footer-logo i { color: var(--primary); }
.footer-links li { margin-bottom: 12px; }
.footer-links a { transition: var(--transition); }
.footer-links a:hover { color: var(--primary); padding-left: 4px; }
.footer-hours { border-left: 3px solid var(--primary); padding-left: 16px; }
.footer-hours li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-hours li:last-child { border: none; color: var(--primary); font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; text-align: center; font-size: 0.85rem; }

/* ══════ RESPONSIVE ══════ */

/* Tablet */
@media (max-width: 1024px) {
    .hero-title { font-size: 2.6rem; }
    .section-title { font-size: 2.1rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .about-wrap { gap: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 991px) {
    .mobile-menu-btn { display: flex; }
    .nav-menu {
        position: fixed; top: 80px; left: -100%; width: 280px; height: calc(100vh - 80px);
        background: var(--primary); flex-direction: column; padding: 32px 24px;
        transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1); z-index: 999;
        box-shadow: 4px 0 20px rgba(0,0,0,0.08); gap: 0;
    }
    .nav-menu.active { left: 0; }
    .nav-menu a { font-size: 1.05rem; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); width: 100%; color: var(--white); }
    .nav-menu a::after { display: none; }
    .header-actions .btn { display: none; }

    /* Hero stacks but keeps visual interest */
    .hero { padding: 60px 0 80px; }
    .hero::before { width: 100%; height: 45%; border-bottom-left-radius: 60px; top: auto; bottom: 0; }
    .hero-inner { flex-direction: column; gap: 40px; }
    .hero-content { text-align: center; }
    .hero-text { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-image { max-width: 500px; margin: 0 auto; }
    .hero-card { left: auto; right: 16px; bottom: -16px; }

    /* About keeps side-by-side feel on tablet */
    .about-wrap { grid-template-columns: 1fr; gap: 32px; }
    .about-badge { right: 16px; bottom: -16px; }
    
    /* Appointment */
    .appointment-wrap { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
    .topbar { display: none; }
    .nav-inner { height: 64px; }
    .nav-menu { top: 64px; height: calc(100vh - 64px); }
    .section { padding: 64px 0; }
    .hero { padding: 48px 0 72px; }
    .hero-title { font-size: 2.2rem; }
    .section-title { font-size: 1.8rem; }

    /* Oculta "Nossos Serviços" no mobile */
    .hero-buttons .btn-outline {
        display: none !important;
    }

    /* Stats: horizontal compact row, not stacked */
    .stats-wrap { grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: -32px; }
    .stat-box { padding: 20px 12px; }
    .stat-number { font-size: 1.6rem; }
    .stat-text { font-size: 0.7rem; }

    /* Services: 2 columns on mobile! Not a boring vertical stack */
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .service-card { padding: 24px 16px; }
    .service-icon { width: 52px; height: 52px; font-size: 24px; border-radius: 10px; margin-bottom: 14px; }
    .service-title { font-size: 1.05rem; }
    .service-card p { font-size: 0.85rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

    /* Team: 2 columns, compact */
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .team-img { height: 200px; }
    .team-info { padding: 14px; }
    .team-name { font-size: 1rem; }

    /* Form */
    .form-grid { grid-template-columns: 1fr; }
    .appointment-form { padding: 32px 20px; }
    .appointment-info { padding: 32px 20px; }

    /* Footer: 2 columns maintained */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer { padding: 48px 0 0; }

    .emergency-phone { font-size: 2rem; }
}

/* Phones ≤ 575px — hero buttons empilham verticalmente */
@media (max-width: 575px) {
    .hero-buttons {
        flex-direction: column;
        align-items: stretch; /* botões ficam 100% da largura do pai */
    }
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 15px 20px;
        flex-shrink: 0;
    }
    /* Reforço explícito para btn-outline no iOS/Safari */
    .hero-buttons .btn-outline {
        background-color: transparent !important;
        color: var(--primary) !important;
        border: 2px solid var(--primary) !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }
}

/* Small phones ≤ 420px */
@media (max-width: 420px) {
    .hero-card { display: none; }
    .services-grid { gap: 10px; }
    .service-card { padding: 20px 14px; }
}
