/* ===== PETLAR CUSTOM STYLES ===== */
/* Design moderno com Bootstrap 5.3 */

/* ===== CSS VARIABLES ===== */
:root {
    /* Cores principais - Tema acolhedor para adoção */
    --petlar-primary: #6366f1;
    --petlar-primary-dark: #4f46e5;
    --petlar-secondary: #ec4899;
    --petlar-accent: #f97316;
    --petlar-success: #10b981;
    --petlar-warning: #f59e0b;
    --petlar-danger: #ef4444;
    --petlar-info: #06b6d4;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-ocean: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-forest: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-colored: 0 10px 40px -10px rgba(102, 126, 234, 0.5);

    /* Bordas arredondadas */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transições */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Bootstrap overrides */
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* ===== GLOBAL ENHANCEMENTS ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Selection color */
::selection {
    background-color: rgba(102, 126, 234, 0.3);
    color: inherit;
}

/* ===== HERO SECTIONS ===== */
.hero-gradient {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-pattern {
    position: relative;
}

.hero-pattern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-animated {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== FLOATING ANIMATION ===== */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating-slow {
    animation: floating 6s ease-in-out infinite;
}

/* ===== PULSE ANIMATION ===== */
.pulse-soft {
    animation: pulseSoft 2s ease-in-out infinite;
}

@keyframes pulseSoft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== CARD STYLES ===== */
.card-modern {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.card-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
}

/* Animal Cards */
.animal-card {
    border: none;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.animal-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.animal-card .card-img-top {
    transition: transform var(--transition-slow);
}

.animal-card:hover .card-img-top {
    transform: scale(1.1);
}

.animal-card .card-img-wrapper {
    overflow: hidden;
    position: relative;
}

.animal-card .card-img-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.animal-card:hover .card-img-overlay-gradient {
    opacity: 1;
}

/* ===== BADGE STYLES ===== */
.badge-gradient {
    background: var(--gradient-primary);
    border: none;
}

.badge-pill-modern {
    padding: 0.5em 1.2em;
    border-radius: var(--radius-full);
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Status badges com cores vibrantes */
.badge-disponivel {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
}

.badge-reservado {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: white;
}

.badge-adotado {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
}

/* ===== BUTTON STYLES ===== */
.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

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

.btn-gradient:active {
    transform: translateY(0);
}

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-glow:hover::before {
    left: 100%;
}

.btn-outline-modern {
    border: 2px solid;
    border-radius: var(--radius-lg);
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.btn-outline-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Adoption CTA Button */
.btn-adopt {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    border: none;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
    box-shadow: 0 10px 40px -10px rgba(236, 72, 153, 0.5);
}

.btn-adopt:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 50px -10px rgba(236, 72, 153, 0.6);
    color: white;
}

.btn-adopt:active {
    transform: translateY(-1px) scale(1.02);
}

/* ===== ICON STYLES ===== */
.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-size: 1.5rem;
}

.icon-circle-lg {
    width: 5rem;
    height: 5rem;
    font-size: 2rem;
}

.icon-circle-sm {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}

.icon-floating {
    position: absolute;
    opacity: 0.1;
    font-size: 8rem;
    color: white;
}

/* ===== STEP INDICATORS ===== */
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    transition: all var(--transition-normal);
}

.step-card:hover .step-number {
    transform: scale(1.1);
}

/* ===== SECTION HEADERS ===== */
.section-header {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.section-header-left::after {
    left: 0;
    transform: none;
}

/* ===== STATS CARDS ===== */
.stat-card {
    padding: 2rem;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: all var(--transition-normal);
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    padding: 2rem;
    border-radius: var(--radius-xl);
    background: white;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(102, 126, 234, 0.3);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* ===== TEAM CARDS ===== */
.team-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.team-card img {
    transition: transform var(--transition-slow);
}

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

.team-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    color: white;
}

/* ===== FAQ ACCORDION ===== */
.accordion-modern .accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-modern .accordion-button {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    background: white;
    border-radius: var(--radius-lg) !important;
}

.accordion-modern .accordion-button:not(.collapsed) {
    background: var(--gradient-primary);
    color: white;
    box-shadow: none;
}

.accordion-modern .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-modern .accordion-body {
    padding: 1.5rem;
    background: #f8fafc;
}

/* ===== CTA SECTIONS ===== */
.cta-section {
    background: var(--gradient-hero);
    border-radius: var(--radius-2xl);
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

/* ===== NAVBAR ENHANCEMENTS ===== */
.navbar-modern {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}

.navbar-modern.scrolled {
    background: rgba(255,255,255,0.95) !important;
    box-shadow: var(--shadow-md);
}

/* ===== FILTER SECTION ===== */
.filter-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.filter-card .form-control,
.filter-card .form-select {
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.filter-card .form-control:focus,
.filter-card .form-select:focus {
    border-color: var(--petlar-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-2xl);
}

.empty-state-icon {
    font-size: 5rem;
    opacity: 0.5;
    margin-bottom: 1.5rem;
    display: block;
}

/* ===== IMAGE PLACEHOLDERS ===== */
.img-placeholder {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.img-placeholder-animated {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* ===== HOVER EFFECTS ===== */
.shadow-hover {
    transition: all var(--transition-normal);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.scale-hover {
    transition: transform var(--transition-normal);
}

.scale-hover:hover {
    transform: scale(1.05);
}

.rotate-hover {
    transition: transform var(--transition-normal);
}

.rotate-hover:hover {
    transform: rotate(5deg);
}

/* ===== UTILITY CLASSES ===== */

/* Font sizes */
.fs-hero {
    font-size: 12rem;
}

@media (max-width: 768px) {
    .fs-hero {
        font-size: 8rem;
    }
}

/* Resize utilities */
.resize-none {
    resize: none;
}

/* Object position */
.object-top {
    object-position: top;
}

/* Gradient text */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-warm {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Background gradients */
.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-warm {
    background: var(--gradient-warm);
}

.bg-gradient-sunset {
    background: var(--gradient-sunset);
}

.bg-gradient-ocean {
    background: var(--gradient-ocean);
}

.bg-gradient-forest {
    background: var(--gradient-forest);
}

/* Subtle backgrounds */
.bg-subtle-primary {
    background-color: rgba(99, 102, 241, 0.1);
}

.bg-subtle-success {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-subtle-warning {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-subtle-danger {
    background-color: rgba(239, 68, 68, 0.1);
}

/* Rounded corners */
.rounded-xl {
    border-radius: var(--radius-xl) !important;
}

.rounded-2xl {
    border-radius: var(--radius-2xl) !important;
}

/* ===== ERROR PAGES ===== */
.error-code {
    font-size: 10rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.error-container {
    padding: 60px 15px;
}

.error-traceback {
    max-height: 400px;
}

/* ===== THEME SELECTION ===== */
.tema-card-btn {
    transition: all var(--transition-normal);
    outline: 1px solid var(--secondary-color);
    outline-offset: -1px;
    border-radius: var(--radius-lg);
}

.tema-card-btn:hover:not(.tema-selected) {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tema-card-btn.tema-selected {
    outline: 4px solid var(--petlar-primary);
}

/* ===== PREVIEW IMAGES ===== */
.preview-120 {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

/* ===== TEXT UTILITIES ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 4.5em;
}

/* ===== BTN-GROUP RESPONSIVO ===== */
.btn-group-responsive {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.btn-group-responsive > .btn,
.btn-group-responsive > .btn-check + .btn {
    border-radius: 0;
}

.btn-group-responsive > .btn:first-of-type,
.btn-group-responsive > .btn-check:first-of-type + .btn {
    border-top-left-radius: var(--bs-btn-border-radius);
    border-top-right-radius: var(--bs-btn-border-radius);
}

.btn-group-responsive > .btn:last-of-type,
.btn-group-responsive > .btn-check:last-of-type + .btn {
    border-bottom-left-radius: var(--bs-btn-border-radius);
    border-bottom-right-radius: var(--bs-btn-border-radius);
}

@media (min-width: 576px) {
    .btn-group-responsive {
        flex-direction: row;
    }

    .btn-group-responsive > .btn,
    .btn-group-responsive > .btn-check + .btn {
        border-radius: 0;
        flex: 1;
    }

    .btn-group-responsive > .btn:first-of-type,
    .btn-group-responsive > .btn-check:first-of-type + .btn {
        border-top-left-radius: var(--bs-btn-border-radius);
        border-bottom-left-radius: var(--bs-btn-border-radius);
        border-top-right-radius: 0;
    }

    .btn-group-responsive > .btn:last-of-type,
    .btn-group-responsive > .btn-check:last-of-type + .btn {
        border-top-right-radius: var(--bs-btn-border-radius);
        border-bottom-right-radius: var(--bs-btn-border-radius);
        border-bottom-left-radius: 0;
    }
}

/* ===== DIVIDERS ===== */
.divider-gradient {
    height: 4px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    opacity: 1;
}

/* ===== DECORATIVE ELEMENTS ===== */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    z-index: -1;
}

.blob-primary {
    background: rgba(102, 126, 234, 0.3);
}

.blob-secondary {
    background: rgba(236, 72, 153, 0.3);
}

.blob-accent {
    background: rgba(249, 115, 22, 0.3);
}

/* ===== PAWS PATTERN ===== */
.paws-pattern {
    position: relative;
}

.paws-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6-1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 9c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm3-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z'/%3E%3C/svg%3E");
    background-size: 80px 80px;
    pointer-events: none;
}

/* ===== FOOTER ===== */
.footer-modern {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #94a3b8;
}

.footer-modern a {
    color: #94a3b8;
    transition: color var(--transition-fast);
}

.footer-modern a:hover {
    color: white;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .cta-section {
        padding: 2.5rem 1.5rem;
        border-radius: var(--radius-xl);
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .step-number {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .btn-gradient,
    .btn-adopt,
    .floating,
    .blob {
        background: #000 !important;
        animation: none !important;
    }
}
