@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;1,400&family=Outfit:wght@400;600;700;800&display=swap');

:root {
    --primary: #064E3B;
    --primary-light: #10B981;
    --secondary: #042F2E; /* Much darker emerald for footers/dark sections */
    --background: #F9FAFB;
    --foreground: #111827;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --radius-full: 9999px;
    --radius-lg: 24px;
    --transition-base: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary);
}

/* Premium Navigation */
.premium-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    background: rgba(4, 47, 46, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    transition: var(--transition-base);
}

.premium-nav.scrolled {
    background: rgba(4, 47, 46, 0.97);
    padding: 16px 0;
}

.nav-logo {
    height: 60px;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    transition: var(--transition-base);
    filter: brightness(0) invert(1);
}

.scrolled .nav-logo {
    height: 60px;
    filter: brightness(0) invert(1);
}

/* Navigation Links */
.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-base);
    position: relative;
    padding: 8px 0;
}

/* Hover/active for top-level nav links — excludes dropdown items */
.nav-links > a:hover,
.nav-links > a.active,
.nav-links .nav-item-dropdown > a:hover,
.nav-links .nav-item-dropdown > a.active {
    color: white !important;
    font-weight: 700;
}

.nav-links a.active::after {
    display: none; /* Ensure no underline */
}

.scrolled .nav-links a:not(.btn-premium) {
    color: rgba(255, 255, 255, 0.85);
}

.scrolled .nav-links a:hover:not(.btn-premium) {
    color: white !important;
}

.scrolled .nav-links a.active:not(.btn-premium) {
    color: var(--primary-light) !important;
    font-weight: 800;
}

/* Global Image Fixes */
.img-responsive, .img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.nav-links a.btn-premium {
    color: white !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1100;
}

.scrolled .mobile-menu-toggle {
    color: var(--primary);
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }
}

/* Dropdown Menu */
.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    min-width: 240px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (hover: hover) {
    .nav-item-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

.dropdown-menu a {
    color: var(--primary) !important;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Dropdown item hover — higher specificity to always win */
.nav-links .dropdown-menu a:hover,
.nav-item-dropdown .dropdown-menu a:hover {
    background: var(--background);
    color: var(--primary-light) !important;
    font-weight: 600;
    padding-left: 20px;
}

.dropdown-menu a::after { display: none; } /* Remove active line in dropdown */

/* Utility Classes */
.text-white { color: #FFFFFF !important; }
.text-primary-light { color: var(--primary-light) !important; }
.bg-dark { background: var(--secondary) !important; }

/* Glassmorphism Cards */
.premium-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    transition: var(--transition-base);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.premium-card-cta {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 48px;
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    gap: 24px;
    transition: var(--transition-base);
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.premium-card-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary-light);
}

/* Map Section */
.premium-map-section {
    width: 100%;
    height: 450px;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.premium-map-section iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(0.2) contrast(1.05);
    transition: var(--transition-base);
}

.premium-map-section iframe:hover {
    filter: none;
}

/* Internal Header Design */
.internal-header {
    background: var(--secondary);
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.internal-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.header-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 28px;
    backdrop-filter: blur(4px);
}

.internal-header h1 {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    color: white !important;
    margin-bottom: 16px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.internal-header p {
    font-size: 1.3rem;
    color: var(--primary-light) !important;
    max-width: 700px;
    opacity: 0.95;
    font-weight: 500;
}

/* Hero Section */
.premium-hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.premium-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover;
}

.premium-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(4, 47, 46, 0.9) 0%, rgba(4, 47, 46, 0.7) 100%);
    z-index: 1;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1;
    margin-bottom: 32px;
    color: #FFFFFF !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    font-weight: 800;
}

.hero-subtitle {
    font-size: 1.35rem;
    margin-bottom: 48px;
    color: rgba(255, 255, 255, 0.95) !important;
    max-width: 550px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

/* Sidebar Active States */
.pathology-list a.active {
    color: var(--primary-light) !important;
    font-weight: 600;
    padding-left: 12px;
    border-left: 3px solid var(--primary-light);
}

/* Text Formatting Improvement */
.premium-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--foreground);
    text-align: justify;
}

.premium-content p {
    margin-bottom: 28px;
    text-indent: 1.5em; /* Tabulação */
}

.premium-content strong {
    color: var(--primary);
    font-weight: 600;
}

.premium-highlight {
    color: var(--primary-light);
    font-weight: 700;
}

/* Buttons */
.btn-premium {
    display: inline-block;
    padding: 16px 40px;
    border-radius: var(--radius-full);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
}

.btn-premium-primary {
    background: var(--primary);
    color: white;
}

.btn-premium-primary:hover {
    background: var(--primary-light);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.btn-premium-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-premium-outline:hover {
    background: var(--primary);
    color: white;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* Accessibility: respect user's reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 0;
        transform: none;
        transition: opacity 0.3s ease-out;
    }

    .reveal.active {
        opacity: 1;
    }

    .btn-premium {
        transition: none;
    }

    .premium-card {
        transition: none;
    }

    .whatsapp-float {
        animation: none;
    }
}

/* Fluid Layout */
.section-padding {
    padding: 120px 0;
}

.container-premium {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 80px 0;
    }
}

/* Premium Form System */
.premium-form-container {
    background: var(--primary); /* Solid dark emerald background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-lg);
    color: white;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: white;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.premium-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.premium-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

select.premium-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 18px;
}

textarea.premium-input {
    min-height: 120px;
    resize: vertical;
}

@media (max-width: 768px) {
    .premium-form-container {
        padding: 24px;
    }
}

/* Premium Footer System */
.premium-footer {
    background: var(--secondary);
    color: white;
    padding: 80px 0 40px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-columns {
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 60px;
    filter: brightness(0) invert(1);
    margin-bottom: 24px;
}

.footer-desc {
    opacity: 0.7;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links h4, .footer-contact h4 {
    color: var(--primary-light);
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: white;
    text-decoration: none;
    opacity: 0.6;
    transition: var(--transition-base);
    font-size: 0.95rem;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--primary-light);
    padding-left: 8px;
}

.footer-contact p {
    opacity: 0.7;
    margin-bottom: 20px;
}

.contact-link {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 12px;
    font-weight: 500;
    opacity: 0.8;
}

.contact-link.whatsapp {
    color: #25D366;
    opacity: 1;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: white;
}

.footer-bottom a {
    color: white;
    text-decoration: underline;
}

.footer-bottom-links a {
    text-decoration: none;
    margin: 0 10px;
}

/* Layout Utilities */
.grid-asymmetric {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 32px;
}
.span-8 { grid-column: span 8; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

@media (max-width: 991px) {
    .grid-asymmetric { grid-template-columns: 1fr; }
    .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
}

@media (max-width: 991px) {
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
/* Content Rich Text Design System */
.content-rich-text {
    color: #4B5563;
    font-size: 1.1rem;
    line-height: 1.85;
    text-align: justify;
}

.content-rich-text p {
    margin-bottom: 24px;
}

/* h2 titles inside article content */
.content-rich-text h2 {
    color: var(--primary);
    font-size: 1.85rem;
    font-weight: 700;
    margin-top: 56px;
    margin-bottom: 24px;
    position: relative;
    text-transform: none;
}

.content-rich-text h2:first-of-type {
    margin-top: 32px;
}

.content-rich-text h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 48px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 2px;
}

.content-rich-text h3 {
    color: var(--primary);
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: 56px;
    margin-bottom: 24px;
    position: relative;
}

.content-rich-text h3:first-of-type {
    margin-top: 0;
}

.content-rich-text h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 2px;
}

/* Image spacing inside article content — adds empty line above image */
.content-rich-text img {
    margin-top: 32px;
}

.content-rich-text ul {
    margin-bottom: 32px;
    padding-left: 24px;
    list-style: none;
}

.content-rich-text li {
    margin-bottom: 16px;
    position: relative;
    padding-left: 12px;
}

.content-rich-text li::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 10px;
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
}

.content-topic-highlight {
    background: #F9FAFB;
    border-left: 4px solid var(--primary-light);
    padding: 32px;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin: 48px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.content-highlight-box {
    background: linear-gradient(135deg, var(--primary), #065f46);
    color: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    margin: 56px 0;
    box-shadow: 0 20px 40px rgba(5, 150, 105, 0.15);
}

.content-highlight-box h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 1.4rem;
    font-weight: 700;
}

.content-highlight-box p {
    margin-bottom: 0;
    opacity: 0.9;
    color: white !important;
}

.content-rich-text strong {
    color: var(--primary);
    font-weight: 700;
}

/* Premium Card System */
.premium-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: var(--transition-base);
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.premium-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(6, 78, 59, 0.1);
    border-color: var(--primary-light);
}

.premium-card h3 {
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.premium-card:hover h3 {
    color: var(--primary-light);
}

.card-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.premium-card:hover .card-link {
    gap: 12px;
}

/* ── WhatsApp Floating Button ─────────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    /* Safe area: avoids home indicator overlap on iPhone (iOS HIG) */
    bottom: max(28px, calc(20px + env(safe-area-inset-bottom)));
    right: 28px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: waPulse 4s ease-in-out infinite;
}
.whatsapp-float:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.7);
    animation: none;
}
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
    /* SVG is decorative — pointer-events none prevents AT from reading path */
    pointer-events: none;
}
@keyframes waPulse {
    0%   { transform: scale(1);    box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
    85%  { transform: scale(1);    box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
    90%  { transform: scale(1.15); box-shadow: 0 6px 32px rgba(37,211,102,0.8); }
    95%  { transform: scale(0.97); box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
    100% { transform: scale(1);    box-shadow: 0 4px 20px rgba(37,211,102,0.5); }
}
