/* 
   CEOM Landing Page - Premium Styles
*/

:root {
    /* Colors */
    --primary: #0A2540; /* Deep Blue */
    --primary-light: #183C66;
    --secondary: #00D4FF; /* Vibrant Teal/Cyan */
    --secondary-dark: #00A6CC;
    --accent: #F4F7F6;
    --text-main: #1A1A1A;
    --text-muted: #666666;
    --white: #FFFFFF;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    --gradient-accent: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Sizes */
    --container-max: 1200px;
    --section-pad: 100px 0;
    
    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 36, 64, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 90%;
    max-width: var(--container-max);
    margin: 0 auto;
}

.section-padding {
    padding: var(--section-pad);
}

.bg-light {
    background-color: var(--accent);
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    outline: none;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(10, 37, 64, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(10, 37, 64, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.15);
    color: var(--secondary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.badge-light {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

/* Section Headers */
.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    display: block;
    color: var(--secondary-dark);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: baseline;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
}

.navbar.scrolled .logo-text {
    color: var(--primary);
}

.logo-dot {
    width: 8px;
    height: 8px;
    background-color: var(--secondary);
    border-radius: 50%;
    margin-left: 2px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    position: relative;
}

.navbar.scrolled .nav-link {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

.navbar.scrolled .mobile-menu-btn {
    color: var(--primary);
}

/* Mobile Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--primary);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu-overlay.active {
    transform: translateY(0);
}

.close-menu-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mobile-link {
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--white);
    font-weight: 700;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 37, 64, 0.9) 0%, rgba(10, 37, 64, 0.6) 50%, rgba(10, 37, 64, 0.2) 100%);
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
}

.hero-text {
    flex: 1;
    max-width: 700px;
}

.hero-title {
    font-size: 4.5rem;
    color: var(--white);
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--secondary);
    display: block;
}

.hero-desc {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.hero-stats {
    display: flex;
    gap: 20px;
    margin-bottom: -50px; /* Overlap effect */
}

.stat-card {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.stat-icon {
    font-size: 2rem;
    color: var(--secondary);
}

.stat-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.stat-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-top: 60px;
}

.about-features {
    margin-top: 30px;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.about-features i {
    color: var(--secondary-dark);
    font-size: 1.2rem;
}

.about-visual {
    position: relative;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--gradient-accent);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: morph 8s ease-in-out infinite;
    opacity: 0.1;
    z-index: -1;
}

.visual-card {
    background: var(--white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 300px;
    position: relative;
    z-index: 1;
}

.visual-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}

@keyframes morph {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    34% { border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%; }
    67% { border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%; }
}

/* Sectors Grid */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.sector-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.sector-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.sector-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
}

.sector-card:hover::before {
    transform: scaleX(1);
}

.sector-card.highlight {
    background: var(--gradient-primary);
    color: var(--white);
}

.sector-card.highlight h3 {
    color: var(--white);
}

.sector-card.highlight p {
    color: rgba(255, 255, 255, 0.8);
}

.sector-icon {
    font-size: 2.5rem;
    color: var(--secondary-dark);
    margin-bottom: 20px;
}

.sector-card.highlight .sector-icon {
    color: var(--secondary);
}

.sector-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-weight: 600;
    color: var(--primary);
}

.sector-card.highlight .sector-link {
    color: var(--secondary);
}

.sector-link i {
    transition: transform var(--transition-fast);
}

.sector-card:hover .sector-link i {
    transform: translateX(5px);
}

/* Day Hospital */
.day-hospital {
    background: url('assets/hero_bg.png') center/cover fixed;
    position: relative;
    color: var(--white);
}

.day-hospital::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.85);
}

.dh-content {
    position: relative;
    z-index: 1;
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 60px;
    border-radius: 30px;
    gap: 50px;
    align-items: center;
}

.dh-text {
    flex: 1;
}

.dh-title {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 20px;
}

.dh-desc {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.dh-features {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.dh-features li {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-weight: 600;
}

.dh-features i {
    font-size: 1.5rem;
    color: var(--secondary);
}

.dh-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.dh-placeholder {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,212,255,0.2) 0%, rgba(10,37,64,0.5) 100%);
    border: 2px dashed rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--secondary);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(0, 212, 255, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-form-container {
    padding: 40px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
    background: var(--accent);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-dark);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 300px;
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.animate-up {
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; transition-delay: 0.4s; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-top: 50px;
    }
    
    .hero-desc {
        margin: 0 auto 40px;
    }
    
    .hero-actions {
        justify-content: center;
        margin-bottom: 60px;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 0;
    }
    
    .about-grid, .dh-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu, .nav-btn {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .dh-content {
        padding: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Specialties & Doctors Grid */
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.specialty-card {
    padding: 25px;
    border-radius: 15px;
    transition: var(--transition-normal);
    border-top: 4px solid var(--secondary);
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.spec-title {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 10px;
}

.spec-doctors {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.spec-doctors li {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: normal; /* Allow wrap when necessary */
    flex: 0 1 auto; /* Do not stretch to fill empty row space */
    word-break: break-word;
}

.spec-doctors i {
    color: var(--secondary-dark);
    font-size: 0.9rem;
}

/* Updated Logo */
.logo-img {
    height: 95px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: var(--transition-fast);
}

.navbar.scrolled .logo-img {
    filter: none;
}

/* Hero Stats Carousel */
.hero-stats-carousel {
    display: flex;
    gap: 20px;
    margin-bottom: -50px;
    position: relative;
    z-index: 10;
}

.interactive-card {
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.interactive-card:hover, .interactive-card.active-stat {
    transform: translateY(-10px);
    border-color: var(--secondary);
    box-shadow: 0 15px 35px rgba(0,212,255,0.2);
}

.interactive-card .stat-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--secondary);
    margin-left: 10px;
}

.interactive-card:hover .stat-arrow, .interactive-card.active-stat .stat-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Day Hospital Slider */
.dh-slider {
    width: 100%;
    max-width: 500px;
    height: 400px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.dh-slider img.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; background-color: rgba(255,255,255,0.05); backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 3s ease-in-out;
    transform: scale(1.05);
}

.dh-slider img.slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    .hero-stats-carousel {
        flex-direction: column;
        width: 100%;
        margin-bottom: 20px;
        gap: 10px;
    }
    
    .interactive-card {
        width: 100%;
        justify-content: space-between;
    }
    
    .dh-slider {
        height: 300px;
        margin-top: 30px;
    }
    
    .hero-title {
        font-size: 2.2rem !important; /* Ajustado para melhor conversao no mobile */
        line-height: 1.2;
    }
    
    .hero-desc {
        font-size: 1rem !important;
    }
    
    .section-padding {
        padding: 50px 0 !important;
    }
}

/* Centered Hero Update */
.hero-content {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 30px;
    padding-top: 50px;
}

.hero-text {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 5rem;
    margin-bottom: 25px;
}

.hero-desc {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto 40px auto;
}

.hero-actions {
    justify-content: center;
}

.hero-inline-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 500;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 30px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.inline-stat i {
    color: var(--secondary);
    margin-right: 8px;
}

.stat-divider {
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .hero-inline-stats {
        flex-direction: column;
        gap: 10px;
        background: transparent;
        border: none;
        padding: 0;
    }
    .stat-divider {
        display: none;
    }
}

/* Slider Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.4);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition-fast);
    opacity: 0;
}

.dh-slider:hover .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: var(--secondary);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
    border-color: var(--secondary);
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

@media (max-width: 768px) {
    .slider-btn { opacity: 1; width: 35px; height: 35px; font-size: 1rem; }
}

/* Doctor thumbnail */
.doctor-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center 20%; /* Enquadrar rostos */
    border-radius: 50%;
    background: transparent;
    border: none; /* Sem bordas conforme solicitado */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Ensures it never becomes oval */
    aspect-ratio: 1 / 1;
}

img[alt*="HORTÊNCIA MACEDO"], img[alt*="HORTENCIA DOURADO"], img[alt*="HORTÊNCIA DOURADO"] {
    object-position: center top !important; /* Ajuste específico para enquadrar melhor */
}

@media (max-width: 768px) {
    .doctor-thumb { width: 60px; height: 60px; }
}

/* Highlight Ophthalmology card - Totally different organization */
.highlight-ophthalmology {
    grid-column: 1 / -1; /* Spans all columns */
    background: linear-gradient(135deg, rgba(10, 37, 64, 0.95) 0%, rgba(20, 80, 130, 0.95) 100%);
    border: 2px solid var(--secondary);
    transform: scale(1.02);
    padding: 40px;
    color: var(--white);
    border-radius: 20px;
}

.highlight-ophthalmology .spec-title {
    color: var(--secondary);
    font-size: 2.5rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.highlight-ophthalmology .spec-doctors {
    justify-content: center;
    gap: 25px;
}

.highlight-ophthalmology .spec-doctors li {
    color: var(--white);
    background: rgba(255,255,255,0.1);
    padding: 10px 20px 10px 10px;
    border-radius: 30px; /* adjusted for potential multi-line text */
    border: 1px solid rgba(255,255,255,0.2);
    /* Forçar 3 por linha no desktop */
    flex: 0 0 calc(33.333% - 20px);
    max-width: 320px;
}

.highlight-ophthalmology .spec-doctors li .doctor-thumb {
    width: 90px;
    height: 90px;
    border: none;
}

.highlight-ophthalmology .spec-doctors li .doctor-info strong {
    color: var(--white);
    font-size: 1.2rem;
}

/* Destaque Dentistas - 2 Colunas */
.highlight-dentistas {
    grid-column: span 2;
}

.highlight-dentistas .spec-doctors li {
    flex: 0 0 calc(50% - 15px); /* Força exatamente 2 colunas para alinhar perfeitamente */
    max-width: 50%;
}



/* --- Mobile Specific Refinements for Specialties --- */
@media (max-width: 768px) {
    .specialties-grid {
        grid-template-columns: 1fr; /* Força 1 coluna garantida sem vazar */
    }
    
    .highlight-dentistas {
        grid-column: span 1; /* Retorna a 1 coluna no celular */
    }
    
    .highlight-dentistas .spec-doctors li {
        flex: 1 1 100%; /* No celular fica um por linha */
        max-width: none;
    }
    
    .highlight-ophthalmology {
        padding: 25px 15px; /* Reduz padding lateral para não espremer o conteúdo */
        transform: scale(1); /* Tira o scale para não vazar a tela */
    }
    
    .highlight-ophthalmology .spec-title {
        font-size: 1.8rem;
    }
    
    .highlight-ophthalmology .spec-doctors {
        gap: 15px;
    }
    
    .highlight-ophthalmology .spec-doctors li {
        padding: 8px 15px 8px 8px;
        flex: 1 1 100%; /* No celular ficam um abaixo do outro ou preenchendo a tela */
        max-width: none;
    }
    
    .highlight-ophthalmology .spec-doctors li .doctor-thumb {
        width: 70px;
        height: 70px;
    }
    

    
    .spec-doctors li {
        gap: 10px; /* Reduz espaçamento entre foto e texto */
        font-size: 1rem;
    }
}

