/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2d5a8a;
    --secondary: #0066cc;
    --accent: #0052cc;
    --text: #1e3a5f;
    --text-light: #5a7184;
    --bg: #ffffff;
    --bg-light: #f5f7fa;
    --bg-alt: #e8ecf1;
    --border: #d1d9e0;
    --shadow: rgba(30, 58, 95, 0.08);
    --hero-gradient-start: #8fa4b8;
    --hero-gradient-end: #a7bac9;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.3;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

/* Top Bar */
.top-bar {
    background: var(--primary);
    color: white;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.top-bar-item span {
    font-size: 1rem;
}

/* Header */
header {
    background: var(--bg);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--secondary);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: background 0.3s, box-shadow 0.3s !important;
}

.btn-nav:hover {
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.75) 0%, rgba(45, 90, 138, 0.75) 100%),
                url('img/hero-bg.jpg?v=3') center/cover no-repeat;
    color: white;
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero .btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hero .btn-primary:hover {
    background: var(--bg-light);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about {
    padding: 5rem 0;
    background: var(--bg);
}

.merger-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.merger-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.merger-plus {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--primary);
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--secondary);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background: #cee9f5;
}

.services-intro {
    text-align: center;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.specialty-card {
    background: var(--bg);
    padding: 2rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 12px var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border: 2px solid transparent;
}

.specialty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px var(--shadow);
    border-color: var(--secondary);
}

.specialty-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, #2a5298 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.specialty-icon svg {
    width: 28px;
    height: 28px;
}

.specialty-card:hover .specialty-icon {
    background: linear-gradient(135deg, var(--secondary) 0%, #0088cc 100%);
    transform: scale(1.1);
}

.specialty-card h3 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Exams Section */
.exams-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(30, 58, 95, 0.1);
}

.exams-title {
    text-align: center;
    color: var(--primary);
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.exams-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.exams-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.exam-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exam-tab:hover {
    background: rgba(30, 58, 95, 0.1);
}

.exam-tab.active {
    background: var(--primary);
    color: white;
}

.exams-content {
    max-width: 1000px;
    margin: 0 auto;
}

.exam-category {
    display: none;
}

.exam-category.active {
    display: block;
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.exam-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.exam-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.exam-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, var(--secondary) 0%, #0088cc 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.exam-icon svg {
    width: 18px;
    height: 18px;
}

.exam-name {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.3;
}

/* Team Section */
.team {
    padding: 5rem 0;
    background: var(--bg);
}

.specialty-section {
    margin-bottom: 3rem;
}

.specialty-title {
    text-align: center;
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.specialty-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.specialty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    justify-content: center;
}

.team-card {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s;
}

.team-card:hover {
    transform: translateY(-3px);
}

.team-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 3px solid var(--secondary);
}

.team-avatar {
    width: 100px;
    height: 100px;
    background: var(--secondary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.team-card h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.3rem;
}

/* Compact layout for single-member specialties */
.team-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.team-card-compact {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s;
}

.team-card-compact:hover {
    transform: translateY(-2px);
}

.team-photo-small {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.team-avatar-small {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.team-card-compact-info {
    text-align: left;
}

.team-card-compact-info h4 {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.compact-specialty {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

/* Convencionadas Section */
/* Notícias Section */
.noticias {
    padding: 5rem 0;
    background: var(--bg-light);
}

.noticias-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.noticias-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.noticia-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.noticia-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.noticia-featured {
    grid-row: span 2;
}

.noticia-featured .noticia-image {
    height: 250px;
}

.noticia-featured .noticia-content {
    flex: 1;
}

.noticia-featured h3 {
    font-size: 1.4rem;
}

.noticia-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.noticia-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.noticia-card:hover .noticia-image img {
    transform: scale(1.05);
}

.noticia-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--secondary);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.noticia-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.noticia-meta {
    margin-bottom: 0.75rem;
}

.noticia-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
}

.noticia-date svg {
    width: 14px;
    height: 14px;
}

.noticia-content h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.noticia-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.noticia-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.noticia-link:hover {
    gap: 0.75rem;
}

.noticia-link svg {
    width: 16px;
    height: 16px;
}

/* Additional news grid */
.noticias-grid-secondary {
    margin-top: 1.5rem;
    grid-template-columns: repeat(4, 1fr);
}

.noticia-small {
    grid-row: span 1;
}

.noticia-small .noticia-image {
    height: 140px;
}

.noticia-small h3 {
    font-size: 1rem;
}

.noticia-small p {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* News Modal Styles */
.news-modal .modal-content {
    max-width: 800px;
}

.news-modal-content {
    padding: 0;
    overflow: hidden;
}

.news-modal-body {
    display: flex;
    flex-direction: column;
}

.news-modal-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.news-modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-modal-category {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--secondary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-modal-text {
    padding: 2rem;
}

.news-modal-meta {
    margin-bottom: 1rem;
}

.news-modal-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.news-modal-date svg {
    width: 16px;
    height: 16px;
}

.news-modal-text h2 {
    color: var(--primary);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.news-modal-article {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.8;
}

.news-modal-article p {
    margin-bottom: 1rem;
}

.news-modal-article h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
}

.news-modal-article ul {
    margin: 0.75rem 0 1rem 1.5rem;
}

.news-modal-article li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.news-modal-article strong {
    color: var(--primary);
}

/* Convencionadas Section */
.convencionadas {
    padding: 4rem 0;
    background: var(--bg);
}

.convencionadas-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

/* SNS Highlight Section */
.sns-highlight {
    background: linear-gradient(135deg, #1e3a5f 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    color: white;
}

.sns-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sns-badge {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sns-badge svg {
    width: 36px;
    height: 36px;
    color: white;
}

.sns-title-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: white;
}

.sns-title-area p {
    opacity: 0.85;
    font-size: 1rem;
}

.sns-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.sns-locations h4,
.sns-exams h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sns-locations-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sns-location {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: background 0.2s;
}

.sns-location:hover {
    background: rgba(255, 255, 255, 0.18);
}

.sns-location svg {
    width: 18px;
    height: 18px;
    color: var(--secondary);
    flex-shrink: 0;
}

.sns-location span {
    font-weight: 500;
}

.sns-exams-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.sns-exam-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.sns-exam-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.exam-code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.7rem;
    background: var(--secondary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.exam-desc {
    font-size: 0.85rem;
    line-height: 1.3;
    opacity: 0.95;
}

/* Other Insurers */
.other-insurers-title {
    text-align: center;
    color: var(--primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.convencionadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.convencionada-item {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.convencionada-item:hover {
    transform: translateY(-3px);
    background: white;
    border-color: var(--secondary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.conv-icon {
    width: 24px;
    height: 24px;
    color: var(--secondary);
}

.convencionada-item strong {
    font-size: 0.85rem;
    color: var(--text);
}

/* Appointment Section */
.appointment {
    padding: 5rem 0;
    background: linear-gradient(135deg, #4180d2 0%, #2a5298 100%);
}

.appointment h2 {
    color: white;
}

.appointment-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Appointment Card */
.appointment-card {
    max-width: 650px;
    margin: 0 auto;
    background: var(--bg);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Appointment Tabs */
.appointment-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.appointment-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--bg-light);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.appointment-tab svg {
    width: 20px;
    height: 20px;
}

.appointment-tab:hover {
    background: white;
    color: var(--primary);
}

.appointment-tab.active {
    background: white;
    color: var(--secondary);
    border-bottom: 3px solid var(--secondary);
}

/* Form Containers */
.appointment-form-container {
    display: none;
    padding: 2rem;
}

.appointment-form-container.active {
    display: block;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-header h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Progress Steps */
.form-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--secondary);
    color: white;
}

.progress-step.completed .step-number {
    background: var(--accent);
}

.step-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    max-width: 80px;
}

.progress-step.active .step-label {
    color: var(--secondary);
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 0.75rem;
    margin-bottom: 1.5rem;
    max-width: 60px;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Styles */
.appointment-form {
    max-width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aab;
}

/* Form Actions */
.form-actions {
    margin-top: 1.5rem;
}

.form-actions-split {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover:not(:disabled) {
    background: #0055aa;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: white;
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-primary svg, .btn-secondary svg {
    width: 18px;
    height: 18px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-link svg {
    width: 16px;
    height: 16px;
}

/* Available Dates */
.available-dates {
    margin: 1.5rem 0;
}

.loading-dates {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.date-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.date-option {
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.date-option:hover {
    border-color: var(--secondary);
    background: var(--bg-light);
}

.date-option.selected {
    border-color: var(--secondary);
    background: rgba(0, 102, 204, 0.1);
}

.date-option .date-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.date-option .date-month {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: capitalize;
}

.date-option .date-weekday {
    font-size: 0.75rem;
    color: var(--secondary);
    font-weight: 600;
    margin-top: 0.25rem;
}

.date-option .date-time {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

/* Custom Date Section */
.custom-date-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.custom-date-form {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.custom-date-form .form-row {
    margin-bottom: 1rem;
}

.date-selection-container {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1.5rem;
}

/* Result States */
.appointment-result {
    padding: 3rem 2rem;
    text-align: center;
}

.result-content {
    max-width: 400px;
    margin: 0 auto;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.result-success .result-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.result-error .result-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.result-icon svg {
    width: 40px;
    height: 40px;
}

.result-content h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.result-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.result-details {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: left;
}

.result-details p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.contact-info {
    font-size: 0.9rem;
    color: var(--text);
}

/* Form validation error state */
.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}
/* Contact Section */
.contact {
    padding: 4rem 0;
    background: var(--bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.contact-info strong {
    color: var(--text);
}

.sede-info {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 3px solid var(--primary);
    transition: all 0.2s ease;
}

.sede-info h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.sede-info p {
    margin: 0;
}

.outras-localizacoes-title {
    color: var(--primary);
    font-size: 0.95rem;
    margin: 1.5rem 0 0.75rem;
}

.outras-localizacoes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.localizacao {
    background: var(--bg-light);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.4;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.localizacao strong {
    color: var(--primary);
    font-size: 0.9rem;
}

.map-container {
    background: var(--bg-light);
    height: 100%;
    min-height: 300px;
    border-radius: 10px;
    overflow: hidden;
}

.map-container iframe {
    border-radius: 10px;
}

.localizacao:hover,
.sede-info:hover {
    background: var(--bg-alt);
    transform: translateX(3px);
}

.localizacao-active,
.sede-info.localizacao-active {
    border-left: 3px solid var(--secondary) !important;
    background: rgba(26, 95, 122, 0.1) !important;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo-img {
    height: 40px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    margin-bottom: 0.75rem;
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-contact h4,
.footer-hours h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-icon {
    font-size: 1rem;
    opacity: 0.9;
}

.footer-contact-item a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.footer-contact-item a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-contact-item .separator {
    margin: 0 0.25rem;
    opacity: 0.6;
}

.footer-hours p {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.footer-hours .hours-time {
    font-size: 1.1rem;
    font-weight: 600;
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive */
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .team-grid-small {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .specialties-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
    
    nav ul {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 1000;
    }
    
    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        width: 100%;
        text-align: center;
    }
    
    nav ul a {
        font-size: 1.25rem;
        display: block;
        padding: 0.5rem;
    }
    
    nav ul .btn-nav {
        display: inline-block;
        width: auto;
    }
    
    .hero {
        min-height: auto;
        padding: 120px 20px 80px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .about {
        padding: 3rem 0;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat {
        flex: 1;
        min-width: 100px;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .merger-logos {
        flex-direction: column;
        gap: 1rem;
    }
    
    .merger-logo {
        height: 50px;
    }
    
    .merger-plus {
        font-size: 2rem;
    }
    
    .services {
        padding: 3rem 0;
    }
    
    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .specialty-card {
        padding: 1rem;
    }
    
    .specialty-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    
    .specialty-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .specialty-card h3 {
        font-size: 0.9rem;
    }
    
    /* Notícias Mobile */
    .noticias {
        padding: 3rem 0;
    }
    
    .noticias-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .noticia-featured {
        grid-column: 1;
        grid-row: auto;
    }
    
    .noticia-featured .noticia-image {
        height: 200px;
    }
    
    .noticia-featured h3 {
        font-size: 1.2rem;
    }
    
    .noticia-image {
        height: 160px;
    }
    
    .noticia-content {
        padding: 1.25rem;
    }
    
    .noticia-content h3 {
        font-size: 1rem;
    }
    
    /* Secondary news grid mobile */
    .noticias-grid-secondary {
        grid-template-columns: 1fr 1fr;
        margin-top: 1rem;
    }
    
    .noticia-small .noticia-image {
        height: 120px;
    }
    
    .noticia-small h3 {
        font-size: 0.9rem;
    }
    
    .noticia-small .noticia-content {
        padding: 1rem;
    }
    
    /* News modal mobile */
    .news-modal-image-container {
        height: 200px;
    }
    
    .news-modal-text {
        padding: 1.5rem;
    }
    
    .news-modal-text h2 {
        font-size: 1.4rem;
    }
    
    /* SNS Highlight Mobile */
    .sns-highlight {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .sns-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .sns-badge {
        width: 60px;
        height: 60px;
    }
    
    .sns-badge svg {
        width: 30px;
        height: 30px;
    }
    
    .sns-title-area h3 {
        font-size: 1.25rem;
    }
    
    .sns-title-area p {
        font-size: 0.9rem;
    }
    
    .sns-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sns-locations-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .sns-location {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .sns-location svg {
        width: 16px;
        height: 16px;
    }
    
    .sns-exams-list {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .sns-exam-item {
        padding: 0.6rem 0.75rem;
    }
    
    .exam-code {
        font-size: 0.65rem;
    }
    
    .exam-desc {
        font-size: 0.8rem;
    }
    
    .other-insurers-title {
        font-size: 1.1rem;
        margin-top: 0.5rem;
    }
    
    /* Exams Mobile */
    .exams-section {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .exams-title {
        font-size: 1.4rem;
    }
    
    .exams-tabs {
        gap: 0.4rem;
    }
    
    .exam-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .exam-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .exam-item {
        padding: 0.875rem 1rem;
    }
    
    .exam-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .exam-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .exam-name {
        font-size: 0.85rem;
    }
    
    .team {
        padding: 3rem 0;
    }
    
    .team-grid,
    .specialty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .team-photo,
    .team-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
    
    .team-card {
        padding: 1rem;
    }
    
    .team-card h4 {
        font-size: 0.85rem;
    }
    
    .specialty-title {
        font-size: 1.1rem;
    }
    
    .team-grid-compact {
        grid-template-columns: 1fr;
    }
    
    .team-card-compact {
        padding: 0.75rem;
    }
    
    .team-photo-small,
    .team-avatar-small {
        width: 50px;
        height: 50px;
    }
    
    .appointment {
        padding: 3rem 0;
    }
    
    .appointment-form {
        padding: 1.5rem;
        margin: 0 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .contact {
        padding: 3rem 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .map-placeholder {
        min-height: 200px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    footer p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .team-grid,
    .team-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats {
        flex-direction: column;
    }
    
    .stat {
        width: 100%;
    }
    
    .appointment-form {
        padding: 1.25rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-primary {
        padding: 0.7rem 1.5rem;
        width: 100%;
    }
}


/* Team Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 58, 95, 0.7);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.modal-body {
    padding: 2rem;
}

.modal-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary);
    flex-shrink: 0;
}

.modal-title-area {
    flex: 1;
}

.modal-title-area h2 {
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
    text-align: left;
}

.modal-title {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.modal-specialty {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.modal-description {
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.modal-highlights {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.25rem;
}

.modal-highlights h4 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.modal-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-highlights li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.modal-highlights li:last-child {
    border-bottom: none;
}

.modal-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

/* Make team cards clickable */
.team-card.clickable {
    cursor: pointer;
}

.team-card.clickable:hover {
    box-shadow: 0 8px 30px var(--shadow);
}

.team-card .view-more {
    color: var(--secondary);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.team-card.clickable:hover .view-more {
    opacity: 1;
}

.team-card-compact.clickable {
    cursor: pointer;
}

.team-card-compact.clickable:hover {
    background: var(--bg-alt);
}

.view-more-compact {
    color: var(--secondary);
    font-size: 0.75rem;
    display: block;
    margin-top: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.team-card-compact.clickable:hover .view-more-compact {
    opacity: 1;
}

/* Modal Mobile */
@media (max-width: 768px) {
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-height: none;
        border-radius: 12px;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .modal-title-area {
        text-align: center;
    }
    
    .modal-title-area h2 {
        text-align: center;
    }
    
    .modal-photo {
        width: 100px;
        height: 100px;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
    }
    
    /* Footer Mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-contact-item {
        justify-content: center;
    }
}
