/**
 * Charity Hope - ONG/Caridade Template
 * Design & Development by {BYAP} - Andre Paiva
 * 
 * © 2026 {BYAP}. Todos os direitos reservados.
 */

/* ===================================
   CSS Variables
====================================== */
:root {
    /* Brand Colors */
    --color-primary: #f5a623;
    --color-primary-dark: #e09000;
    --color-secondary: #333333;
    --color-accent: #ffcc00;
    
    /* Neutral Colors */
    --color-dark: #1a1a1a;
    --color-text: #666666;
    --color-text-light: #999999;
    --color-light: #f5f5f5;
    --color-white: #ffffff;
    --color-border: #e0e0e0;
    
    /* Gradient */
    --gradient-primary: linear-gradient(135deg, #f5a623 0%, #ffcc00 100%);
    
    /* Typography */
    --font-main: 'Raleway', sans-serif;
    --font-alt: 'Open Sans', sans-serif;
    
    /* Spacing */
    --section-padding: 6rem;
    
    /* Transitions */
    --transition: 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 20px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-alt);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
}

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

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

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

ul { list-style: none; }

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

/* ===================================
   Utilities
====================================== */
.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.text-yellow { color: var(--color-primary) !important; }

/* ===================================
   Buttons
====================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: var(--font-main);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-gradient {
    background: var(--gradient-primary);
    color: var(--color-dark);
    border: none;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-dark:hover {
    background: var(--color-primary);
}

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

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

.btn-outline {
    background: transparent;
    border-color: currentColor;
}

.btn-sm {
    padding: 0.625rem 1.5rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
}

/* ===================================
   Loader
====================================== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

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

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===================================
   Header
====================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

/* Top Bar */
.top-bar {
    background: rgba(0,0,0,0.3);
    padding: 0.75rem 0;
    display: none;
}

.top-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar-left p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-size: 0.875rem;
}

.top-bar-left svg {
    width: 16px;
    height: 16px;
}

.top-bar-center .logo img {
    max-height: 50px;
}

.top-bar-right .social-icons {
    display: flex;
    gap: 1rem;
}

.top-bar-right .social-icons a {
    color: var(--color-white);
}

.top-bar-right .social-icons svg {
    width: 18px;
    height: 18px;
}

/* Navbar */
.navbar {
    background: rgba(0,0,0,0.5);
    padding: 1rem 0;
    transition: var(--transition);
}

.header.scrolled .navbar {
    background: var(--color-dark);
    padding: 0.75rem 0;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    max-height: 45px;
}

.logo-mobile {
    display: block;
}

.nav-menu {
    display: none;
    align-items: center;
    gap: 0;
}

.nav-link {
    padding: 0.5rem 1.25rem;
    color: var(--color-white);
    font-family: var(--font-main);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 1px;
}

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

.nav-right {
    display: none;
}

.social-icons-nav {
    display: flex;
    gap: 0.75rem;
}

.social-icons-nav a {
    color: var(--color-white);
}

.social-icons-nav svg {
    width: 16px;
    height: 16px;
}

/* Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--color-white);
    transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    background: var(--color-dark);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
}

.mobile-menu-close svg {
    width: 28px;
    height: 28px;
}

.mobile-logo img {
    max-height: 60px;
    margin-bottom: 2rem;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mobile-nav a {
    color: var(--color-white);
    font-family: var(--font-main);
    font-size: 1.25rem;
    font-weight: 600;
}

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

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

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

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 200;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.hero-title span {
    display: block;
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-nav {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

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

.hero-nav-btn:hover {
    background: var(--color-primary);
}

.hero-nav-btn svg {
    width: 24px;
    height: 24px;
}

/* ===================================
   Section Header
====================================== */
.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-description {
    max-width: 700px;
    margin: 0 auto;
    color: var(--color-text);
}

/* ===================================
   About Section
====================================== */
.about-section {
    padding: var(--section-padding) 0;
}

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

.about-content .section-title {
    margin-bottom: 1.5rem;
}

.about-text {
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

/* ===================================
   Causes Section
====================================== */
.causes-section {
    padding: var(--section-padding) 0;
    background: var(--color-light);
}

.causes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.cause-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cause-image {
    position: relative;
    overflow: hidden;
}

.cause-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cause-card:hover .cause-image img {
    transform: scale(1.1);
}

.cause-content {
    position: relative;
    padding: 2rem;
}

.cause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
}

.progress-bar {
    position: relative;
    height: 8px;
    background: var(--color-light);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease;
}

.progress-text {
    position: absolute;
    right: 0;
    top: -1.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.cause-title {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.cause-description {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

/* ===================================
   Donation CTA Section
====================================== */
.donation-cta {
    padding: 0;
}

.donation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.donation-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

.donation-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.donation-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    opacity: 0;
    transition: var(--transition);
}

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

.donation-overlay svg {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.donation-overlay h3 {
    font-size: 1.125rem;
    color: var(--color-white);
}

/* ===================================
   Gallery Section
====================================== */
.gallery-section {
    padding: var(--section-padding) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-link {
    width: 60px;
    height: 60px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-dark);
    transform: scale(0);
    transition: var(--transition);
}

.gallery-item:hover .gallery-link {
    transform: scale(1);
}

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

/* ===================================
   Blog Section
====================================== */
.blog-section {
    padding: var(--section-padding) 0;
    background: var(--color-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.blog-card {
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.blog-image {
    position: relative;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-date {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-primary);
    color: var(--color-dark);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 4px;
}

.blog-content {
    padding: 1.5rem;
}

.blog-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.blog-excerpt {
    font-size: 0.9375rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
}

.blog-link svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.blog-link:hover svg {
    transform: translateX(5px);
}

/* ===================================
   Contact Section
====================================== */
.contact-section {
    background: var(--color-dark);
}

.contact-section .container {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
}

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

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

.contact-info .section-title {
    color: var(--color-white);
}

.contact-text {
    margin-bottom: 2rem;
    opacity: 0.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.contact-item h4 {
    font-size: 1rem;
    color: var(--color-white);
    margin-bottom: 0.25rem;
}

.contact-item p {
    font-size: 0.9375rem;
    opacity: 0.8;
}

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

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

.contact-social a:hover {
    background: var(--color-primary);
    color: var(--color-dark);
}

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

/* Contact Form */
.contact-form-wrapper {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-alt);
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
}

textarea.form-control {
    resize: none;
}

/* Contact Map */
.contact-map {
    width: 100%;
}

.contact-map iframe {
    display: block;
}

/* ===================================
   Footer
====================================== */
.footer {
    background: #111;
    padding: 4rem 0 2rem;
    color: var(--color-white);
}

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

.footer-logo {
    max-height: 50px;
    margin-bottom: 1rem;
}

.footer-about p {
    font-size: 0.9375rem;
    opacity: 0.7;
}

.footer-links h4,
.footer-contact h4,
.footer-newsletter h4 {
    font-size: 1.125rem;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    font-size: 0.9375rem;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--color-primary);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.footer-contact svg {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
}

.footer-newsletter p {
    font-size: 0.9375rem;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.9375rem;
}

.newsletter-form button {
    padding: 0.75rem 1rem;
    background: var(--color-primary);
    border: none;
    border-radius: 0 4px 4px 0;
    color: var(--color-dark);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--color-primary-dark);
}

.newsletter-form svg {
    width: 20px;
    height: 20px;
}

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

.footer-bottom p {
    font-size: 0.875rem;
    opacity: 0.7;
}

.footer-bottom a {
    color: var(--color-primary);
}

/* ===================================
   Lightbox
====================================== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--color-primary);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-dark);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

/* ===================================
   Animations
====================================== */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fadeInLeft"] {
    transform: translateX(-30px);
}

[data-animate="fadeInLeft"].animated {
    transform: translateX(0);
}

[data-animate="fadeInRight"] {
    transform: translateX(30px);
}

[data-animate="fadeInRight"].animated {
    transform: translateX(0);
}

/* ===================================
   Media Queries
====================================== */
@media (min-width: 768px) {
    .top-bar {
        display: block;
    }
    
    .logo-mobile {
        display: none;
    }
    
    .nav-menu {
        display: flex;
    }
    
    .nav-right {
        display: flex;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .causes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cause-card {
        grid-template-columns: 1fr 1fr;
    }
    
    .cause-card-reverse .cause-content {
        order: -1;
    }
    
    .donation-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== 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 ===== */


/* ===== Logo SVG Styles ===== */
.logo-svg {
    height: 40px;
    width: auto;
    color: #fff;
    transition: all 0.3s ease;
}

.logo-svg.small {
    height: 35px;
}

.logo-svg.footer {
    height: 45px;
    color: #fff;
}

.logo-svg:hover {
    transform: scale(1.02);
}
/* ===== End Logo SVG ===== */


/* ============================================
   FAANG-LEVEL ACCESSIBILITY FIXES
   Standards: WCAG 2.1 AA, Apple HIG
   ============================================ */

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

/* Focus Visible - Keyboard Navigation */
:focus {
  outline: none;
}

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

/* Skip Link - Screen Readers */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--cor-primaria, #6366f1);
  color: white;
  padding: 12px 24px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  * {
    border-color: currentColor !important;
  }
  
  button, a {
    border: 2px solid currentColor;
  }
}

/* Print Styles */
@media print {
  *,
  *::before,
  *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
  
  .no-print,
  nav,
  header,
  footer,
  .loader,
  .preloader {
    display: none !important;
  }
}

/* Selection Highlight */
::selection {
  background: var(--cor-primaria, #6366f1);
  color: white;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

@supports (scroll-behavior: smooth) {
  html:focus-within {
    scroll-behavior: smooth;
  }
}

/* Loading Skeleton Base */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Error State Base */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
  color: var(--texto-muted, #888);
}

.error-state::before {
  content: "⚠️";
  font-size: 48px;
}

/* Empty State Base */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
  color: var(--texto-muted, #888);
}

.empty-state::before {
  content: "📭";
  font-size: 48px;
}

/* Touch Target Size (WCAG) */
button,
a,
[role="button"],
input[type="submit"],
input[type="button"],
.btn {
  min-height: 44px;
  min-width: 44px;
}

/* Visible Scrollbar for Accessibility */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Content Visibility for Performance */
.below-fold {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}


/* ============================================
   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%);
}


/* 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;
}

