/* =========================================
   Medical Template - Styles
   {BYAP} - André Paiva
   © 2026 Todos os direitos reservados
   ========================================= */

/* Skip Link - Acessibilidade */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-accent, #4a90e2);
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    z-index: 10000;
    text-decoration: none;
    transition: top 0.3s ease;
}
.skip-link:focus {
    top: 0;
}

/* Logo SVG */
.logo-svg {
    height: 45px;
    width: auto;
    color: #333;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.logo-svg:hover { transform: scale(1.05); opacity: 0.9; }

/* =========================================
   CSS Variables
   ========================================= */
:root {
    /* Colors */
    --primary-dark: #484b59;
    --primary-light: #6495ed;
    --primary-accent: #4a90e2;
    --secondary: #5a9fd4;
    --text-dark: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --white: #ffffff;
    --black: #000000;
    --bg-light: #f8f9fa;
    --bg-dark: #2c3e50;
    --border-color: #e0e0e0;
    --success: #28a745;
    --error: #dc3545;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    
    /* Spacing */
    --section-padding: 100px;
    --container-padding: 15px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 25px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 20px;
    --radius-full: 50px;
}

/* =========================================
   Reset & Base
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

body.no-scroll {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* =========================================
   Loader - EKG Style
   ========================================= */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: var(--white);
}

.ekg-line {
    display: block;
    width: 300px;
    height: 50px;
    color: var(--primary-light);
    margin: 0 auto 20px auto;
}

.ekg-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: ekgDraw 2s ease-in-out infinite;
}

@keyframes ekgDraw {
    0% {
        stroke-dashoffset: 1000;
    }
    50% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -1000;
    }
}

.loader-text {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.8;
}

/* =========================================
   Search Overlay
   ========================================= */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(72, 75, 89, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    border-radius: 50%;
    transition: var(--transition-normal);
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.search-container {
    width: 90%;
    max-width: 600px;
}

.search-form {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 0;
    font-size: 1.5rem;
    color: var(--white);
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-submit {
    padding: 15px;
    color: var(--white);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-submit:hover {
    color: var(--primary-light);
}

/* =========================================
   Header
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition-normal);
}

.header.scrolled {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 10px 30px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.header.scrolled .navbar {
    box-shadow: none;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.search-btn:hover {
    background: var(--primary-light);
    color: var(--white);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 30px;
    justify-content: center;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition-normal);
}

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

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

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

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100vh;
    max-width: 700px;
    color: var(--white);
    padding-top: 80px;
}

.hero-subtitle {
    display: inline-block;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards 0.3s;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards 0.5s;
}

.hero-title span {
    color: var(--primary-light);
}

.hero-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.9;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards 0.7s;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards 0.9s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Navigation */
.hero-nav {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.hero-arrow {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.hero-arrow:hover {
    background: var(--primary-light);
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.hero-dot.active,
.hero-dot:hover {
    background: var(--white);
    transform: scale(1.2);
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 35px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
    min-height: 50px;
}

.btn-primary {
    background: var(--primary-dark);
    color: var(--white);
    border: 2px solid var(--primary-dark);
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.btn-white {
    background: var(--white);
    color: var(--primary-dark);
    border: 2px solid var(--white);
}

.btn-white:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-3px);
}

/* =========================================
   Flip Cards (Features)
   ========================================= */
.features-flip {
    padding: 0;
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.flip-card {
    perspective: 1000px;
    height: 250px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.flip-card-front {
    background: var(--primary-dark);
    color: var(--white);
}

.flip-card:nth-child(2) .flip-card-front {
    background: var(--primary-light);
}

.flip-card-back {
    background: var(--primary-light);
    color: var(--white);
    transform: rotateY(180deg);
}

.flip-card:nth-child(2) .flip-card-back {
    background: var(--primary-dark);
}

.flip-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-bottom: 20px;
}

.flip-icon svg {
    width: 32px;
    height: 32px;
}

.flip-card-front h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.flip-card-back p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.flip-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.flip-link:hover {
    gap: 12px;
}

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

/* =========================================
   Section Styles
   ========================================= */
section {
    padding: var(--section-padding) 0;
}

.section-subtitle {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.section-title span {
    color: var(--primary-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-light);
}

/* =========================================
   About Section
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.about-experience {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--primary-light);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.experience-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    font-family: var(--font-primary);
    line-height: 1;
}

.experience-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-text {
    color: var(--text-light);
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
}

.about-features li svg {
    width: 20px;
    height: 20px;
    color: var(--primary-light);
}

/* =========================================
   Skills Section
   ========================================= */
.skills-section {
    background: var(--bg-light);
    padding: 80px 0;
}

.skills-header {
    text-align: center;
    margin-bottom: 50px;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.skill-item {
    margin-bottom: 25px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.skill-name {
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--text-dark);
}

.skill-percent {
    font-weight: 600;
    color: var(--primary-dark);
}

.skill-bar {
    height: 8px;
    background: rgba(72, 75, 89, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    width: 0;
    border-radius: var(--radius-full);
    transition: width 1.5s ease;
}

.skill-progress.light {
    background: var(--primary-light);
}

.skill-progress.dark {
    background: var(--primary-dark);
}

.skill-progress.animated {
    width: var(--progress-width);
}

/* =========================================
   Appointment Section
   ========================================= */
.appointment {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    padding: 80px 0;
}

.appointment-box {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
}

.appointment-header {
    text-align: center;
    margin-bottom: 40px;
    color: var(--white);
}

.appointment-header h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.appointment-header p {
    opacity: 0.9;
}

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

.form-group {
    position: relative;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-dark);
    outline: none;
    transition: var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.input-icon {
    position: relative;
}

.input-icon svg {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-icon input {
    padding-right: 45px;
}

.appointment-form .btn {
    width: 100%;
    margin-top: 10px;
}

/* =========================================
   Departments Section
   ========================================= */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.department-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.department-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.department-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    border-radius: 50%;
    transition: var(--transition-normal);
}

.department-icon.light {
    background: rgba(100, 149, 237, 0.1);
    color: var(--primary-light);
}

.department-icon.dark {
    background: rgba(72, 75, 89, 0.1);
    color: var(--primary-dark);
}

.department-card:hover .department-icon.light {
    background: var(--primary-light);
    color: var(--white);
}

.department-card:hover .department-icon.dark {
    background: var(--primary-dark);
    color: var(--white);
}

.department-icon svg {
    width: 36px;
    height: 36px;
}

.department-card h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.department-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* =========================================
   Counters Section
   ========================================= */
.counters {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    padding: 80px 0;
}

.counters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.counter-item {
    text-align: center;
    color: var(--white);
}

.counter-number {
    display: block;
    font-family: var(--font-primary);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 15px;
}

.counter-line {
    width: 50px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 auto 15px;
}

.counter-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}

/* =========================================
   Gallery Section
   ========================================= */
.gallery {
    padding: 100px 0;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.gallery-item.hidden {
    display: none;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(72, 75, 89, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-zoom {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--white);
    border-radius: 50%;
    margin-bottom: 15px;
    transition: var(--transition-normal);
}

.gallery-zoom:hover {
    transform: scale(1.1);
}

.gallery-zoom svg {
    width: 24px;
    height: 24px;
}

.gallery-overlay h4 {
    color: var(--white);
    font-size: 1.1rem;
}

/* =========================================
   Lightbox
   ========================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    border-radius: 50%;
    transition: var(--transition-normal);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--radius-md);
}

/* =========================================
   Testimonials Section
   ========================================= */
.testimonials {
    background: var(--bg-light);
    padding: 100px 0;
}

.testimonial-slider {
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-item {
    min-width: 100%;
    padding: 40px;
    text-align: center;
}

.testimonial-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--white);
    border-radius: 50%;
    margin: 0 auto 25px;
}

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

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.testimonial-author img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h5 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

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

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    background: var(--border-color);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.testimonial-dot.active,
.testimonial-dot:hover {
    background: var(--primary-light);
    transform: scale(1.2);
}

/* =========================================
   Blog Section
   ========================================= */
.blog {
    background: var(--bg-light);
    padding: 100px 0;
}

.blog-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 60px;
}

.blog-row.reverse {
    margin-bottom: 0;
}

.blog-row.reverse .blog-content {
    order: 2;
}

.blog-content h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.blog-content p {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.8;
}

.blog-slider {
    position: relative;
}

.blog-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-light);
    color: var(--white);
    padding: 15px;
    text-align: center;
    z-index: 2;
    border-radius: var(--radius-sm);
}

.blog-date.right {
    left: auto;
    right: 20px;
}

.blog-date span {
    display: block;
    font-family: var(--font-primary);
}

.blog-date .day {
    font-size: 1.5rem;
    font-weight: 700;
}

.blog-date .month,
.blog-date .year {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.blog-images {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.blog-images img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.blog-images img:first-child {
    position: relative;
}

.blog-images img.active {
    opacity: 1;
}

/* =========================================
   Contact Section
   ========================================= */
.contact {
    position: relative;
    padding: 0;
}

.contact-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    opacity: 0.1;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.contact-map {
    background: var(--bg-light);
}

.contact-map iframe {
    filter: grayscale(30%);
}

.contact-info {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    padding: 60px;
    display: flex;
    align-items: center;
}

.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('assets/images/blog-image1.jpg') center/cover;
    opacity: 0.1;
}

.contact-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.contact-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 10px;
    display: block;
}

.contact-content h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 3px;
}

.contact-item p {
    opacity: 0.9;
    line-height: 1.7;
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background: var(--primary-dark);
    padding: 50px 0;
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

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

.social-link:hover {
    transform: translateY(-5px);
}

.social-link.facebook:hover {
    background: #3b5998;
}

.social-link.twitter:hover {
    background: #1da1f2;
}

.social-link.google:hover {
    background: #db4437;
}

.social-link.linkedin:hover {
    background: #0077b5;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

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

.footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-text a {
    color: var(--primary-light);
    font-weight: 600;
}

.footer-text a:hover {
    color: var(--white);
}

.heart-icon {
    width: 16px;
    height: 16px;
    color: #e74c3c;
    display: inline-block;
    vertical-align: middle;
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* =========================================
   Back to Top
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition-normal);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* =========================================
   Animations
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive Styles
   ========================================= */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .flip-card {
        height: 200px;
    }
    
    .features-flip {
        margin-top: 0;
    }
    
    .about-grid {
        gap: 40px;
    }
    
    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .counters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .blog-row {
        gap: 30px;
    }
    
    .contact-info {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transition: var(--transition-normal);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu .nav-link {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-content {
        padding: 100px 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .hero-nav {
        bottom: 30px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-experience {
        right: 20px;
        bottom: -20px;
        padding: 20px;
    }
    
    .experience-number {
        font-size: 2rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .appointment-box {
        padding: 30px 20px;
    }
    
    .appointment-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    .counters-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .counter-number {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .blog-row,
    .blog-row.reverse {
        grid-template-columns: 1fr;
    }
    
    .blog-row.reverse .blog-content {
        order: 0;
    }
    
    .blog-images img {
        height: 250px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-map {
        height: 300px;
    }
    
    .contact-info {
        padding: 40px 20px;
    }
    
    .contact-content h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 10px 20px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.85rem;
    }
    
    .flip-card {
        height: 180px;
    }
    
    .counters-grid {
        grid-template-columns: 1fr;
    }
    
    .counter-item {
        padding: 20px 0;
    }
    
    .gallery-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .testimonial-item {
        padding: 20px;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* Touch Targets */
@media (hover: none) and (pointer: coarse) {
    .nav-link,
    .btn,
    .filter-btn,
    .social-link,
    .gallery-zoom,
    .hero-arrow,
    .hero-dot,
    .testimonial-dot {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    .header,
    .hero-nav,
    .back-to-top,
    .footer-social,
    .lightbox,
    .search-overlay {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .hero {
        min-height: auto;
        padding: 50px 0;
    }
}

/* ===== BYAP Logo Styles ===== */
.logo-text {
    font-family: "Oswald", "Bebas Neue", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: inherit;
    letter-spacing: 2px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.logo-text .bracket {
    color: var(--color-primary, #e50914);
    font-weight: 800;
}

.logo a.logo,
.logo a.footer-logo,
a.mobile-logo,
a.side-menu-logo {
    text-decoration: none;
    color: inherit;
}

.footer-logo .logo-text {
    font-size: 1.8rem;
}
/* ===== End BYAP Logo ===== */



/* ============================================
   FAANG-LEVEL ROUND 2 - UX & INTERACTION
   ============================================ */

/* Active States for All Interactive Elements */
button:active,
a:active,
[role="button"]:active,
.btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* Enhanced Hover States */
button:hover,
a:hover,
[role="button"]:hover,
.btn:hover {
  transform: translateY(-1px);
}

/* Haptic-like Feedback (visual) */
@keyframes haptic-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.97); }
}

.haptic:active {
  animation: haptic-pulse 0.15s ease-out;
}

/* Improved Loading Animation */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.loading-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.1) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Interaction Feedback */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
  border-color: var(--cor-primaria, #6366f1);
}

/* Better Disabled State */
button:disabled,
input:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Micro-interactions */
.card,
.btn,
article {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
article:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Spring Animation */
@keyframes spring {
  0% { transform: scale(0.8); opacity: 0; }
  70% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-spring {
  animation: spring 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Subtle Entrance Animation */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s ease-out forwards;
}

/* Stagger Animation Helper */
.stagger > *:nth-child(1) { animation-delay: 0.1s; }
.stagger > *:nth-child(2) { animation-delay: 0.2s; }
.stagger > *:nth-child(3) { animation-delay: 0.3s; }
.stagger > *:nth-child(4) { animation-delay: 0.4s; }
.stagger > *:nth-child(5) { animation-delay: 0.5s; }

/* Premium Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--cor-primaria, #6366f1), var(--cor-secundaria, #a855f7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Premium Button */
.btn-premium {
  position: relative;
  overflow: hidden;
}

.btn-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-premium:hover::before {
  transform: translateX(100%);
}


/* ============================================
   FAANG-LEVEL FINAL - PERFORMANCE & POLISH
   ============================================ */

/* Prevent CLS - Aspect Ratio for Images */
img {
  aspect-ratio: attr(width) / attr(height);
  height: auto;
  max-width: 100%;
}

/* Placeholder Aspect Ratios */
.img-16-9 { aspect-ratio: 16/9; }
.img-4-3 { aspect-ratio: 4/3; }
.img-1-1 { aspect-ratio: 1/1; }
.img-3-2 { aspect-ratio: 3/2; }

/* Optimized Font Loading */
body {
  font-display: swap;
}

/* Content Visibility for Below Fold */
section:not(:first-of-type) {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* Better Focus Ring */
*:focus-visible {
  outline: 2px solid var(--cor-primaria, #6366f1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip visible focus for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Tabindex Navigation Indicator */
[tabindex]:focus-visible {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.4);
}

/* Performance: GPU Acceleration for Animations */
.animate-gpu,
[data-aos] {
  will-change: transform;
  transform: translateZ(0);
}

/* Reduce Repaints */
.fixed-header,
.sticky-nav,
header,
nav {
  will-change: transform;
  contain: layout style;
}

/* Touch Action for Better Mobile */
button,
a,
[role="button"] {
  touch-action: manipulation;
}

/* iOS Smooth Scrolling */
.scroll-container {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Prevent FOUC */
.js-loading *,
.js-loading *:before,
.js-loading *:after {
  animation-play-state: paused !important;
}

/* Critical Render Path */
.critical {
  contain: content;
}

/* Lazy Fade In */
.lazy-load {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lazy-load.loaded {
  opacity: 1;
}

/* Optimized Shadows (GPU) */
.shadow-optimized {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transform: translateZ(0);
}

/* Better Typography */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p, li {
  text-wrap: pretty;
  max-width: 70ch;
}

/* Fluid Typography */
html {
  font-size: clamp(14px, 1vw + 12px, 18px);
}

/* Better Image Rendering */
img {
  image-rendering: -webkit-optimize-contrast;
  object-fit: cover;
}

/* Optimized Gradients */
.gradient-optimized {
  background: linear-gradient(135deg, var(--cor-primaria, #6366f1), var(--cor-secundaria, #a855f7));
  background-attachment: fixed;
}

/* Vibration API Hook (CSS indicator) */
.haptic-feedback {
  --haptic-active: 0;
}

.haptic-feedback:active {
  --haptic-active: 1;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* Light Mode Support */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
  }
}


/* Garantir que imagens carregadas apareçam */
img.loaded {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Esconder skeletons quando carregado */
.skeleton-container.loaded .skeleton-placeholder,
.skeleton-container.loaded .skeleton,
.loaded > .skeleton {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Fallback visual para elementos vazios */
.bento-card:empty,
.card:empty,
.portfolio-item:empty {
  min-height: 100px;
  background: linear-gradient(135deg, #f8f8f8, #e8e8e8);
}

/* Lucide icons fallback */
[data-lucide]:empty::before {
  content: "•";
  font-size: 1.5em;
  opacity: 0.3;
}



/* ========================================
   BYAP Fix: Robust Visual Fallbacks
   ======================================== */

/* Garantir que imagens carregadas apareçam */
img.loaded {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Forçar imagens a aparecerem após 2s mesmo sem .loaded */
@keyframes forceShow {
  to { opacity: 1; }
}

img[data-src], img.lazy {
  animation: forceShow 0.3s ease 2s forwards;
}

/* Esconder skeletons quando carregado */
.skeleton-container.loaded .skeleton-placeholder,
.skeleton-container.loaded .skeleton,
.loaded > .skeleton {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Esconder skeletons após 3s */
@keyframes hideSkeleton {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.skeleton-placeholder,
.skeleton {
  animation: hideSkeleton 0.3s ease 3s forwards;
}

/* Fallback visual para elementos vazios */
.bento-card:empty,
.card:empty,
.portfolio-item:empty {
  min-height: 100px;
  background: linear-gradient(135deg, #f8f8f8, #e8e8e8);
}

/* Lucide icons - garantir tamanho */
[data-lucide] svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
}

