/**
 * Pawsitive Placements – Clean, Professional, Bootstrap-Aligned Stylesheet
 * Consolidated + simplified for consistent sizing, spacing, and responsiveness.
 */

/* =========================================================
   GLOBAL - CSS Reset & Base Styles
   ========================================================= */

/* Design tokens */
:root {
    --pp-bg: #f7f7f7;
    --pp-surface: #ffffff;
    --pp-text: #1f2937;
    --pp-muted: #6b7280;
    --pp-border: #e5e7eb;
    --pp-primary: #007bff;
    --pp-primary-dark: #0056b3;
    --pp-primary-light: rgba(0, 123, 255, 0.1);
    --pp-success: #28a745;
    --pp-danger: #dc3545;
    --pp-warning: #ffc107;
    --pp-info: #17a2b8;
    --pp-container-max: 1200px;
    --pp-container-gutter: clamp(1rem, 2vw, 1.5rem);
    --pp-radius-sm: 8px;
    --pp-radius-md: 12px;
    --pp-radius-lg: 16px;
    --pp-shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.08);
    --pp-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
    --pp-space-1: 0.5rem;
    --pp-space-2: 0.75rem;
    --pp-space-3: 1rem;
    --pp-space-4: 1.5rem;
    --pp-space-5: 2rem;
    --pp-space-6: 3rem;
    --pp-transition: 0.2s ease;
}

/* Universal Reset - Override default browser styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}



body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--pp-bg);
    color: var(--pp-text);
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Main content wrapper - ensures footer stays at bottom */
main {
    flex: 1 0 auto;
    width: 100%;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Consistent container widths/gutters across pages */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl {
    width: 100%;
    max-width: var(--pp-container-max);
    padding-left: var(--pp-container-gutter);
    padding-right: var(--pp-container-gutter);
}

/* =========================================================
   PAGE LAYOUT SYSTEM - Bootstrap 5 Best Practices
   ========================================================= */

/* Standard page container - use for most pages */
.page-container {
    padding-top: clamp(1rem, 2vw, 2rem);
    padding-bottom: clamp(2rem, 4vw, 3rem);
}

/* Content area with sidebar layout */
.content-with-sidebar {
    min-height: 400px;
    overflow-x: hidden;
}

/* Prevent flex columns from overflowing in tight layouts */
.content-with-sidebar > [class*="col-"] {
    min-width: 0;
}

/* Sidebar column - consistent spacing */
.sidebar-column {
    padding-right: 1.5rem;
    margin-bottom: 2rem;
    overflow-x: hidden;
    min-width: 0;
}

/* Main content column - consistent spacing */
.main-content-column {
    padding-left: 1.5rem;
    overflow-x: hidden;
    max-width: 100%;
    min-width: 0;
}

/* Section spacing - consistent vertical rhythm */
.page-section {
    margin-bottom: clamp(1.5rem, 3vw, 3rem);
}

.page-section:last-child {
    margin-bottom: 0;
}

/* Normalize row gutters across pages */
.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

@media (max-width: 991px) {
    .row {
        --bs-gutter-x: 1.25rem;
        --bs-gutter-y: 1.25rem;
    }
}

@media (max-width: 767px) {
    .row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
}

/* Card container for consistent card spacing */
.card-container {
    margin-bottom: 2rem;
}

/* Pet thumbnail image styling */
.pet-thumbnail-img {
    height: 150px;
    object-fit: cover;
}

/* Width utility for application details */
.w-40 {
    width: 40% !important;
}

/* Responsive spacing adjustments */
@media (max-width: 991px) {
    .sidebar-column {
        padding-right: 0;
        margin-bottom: 2rem;
        overflow-x: hidden;
    }
    
    .main-content-column {
        padding-left: 0;
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .page-container {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
    
    .page-section {
        margin-bottom: 2rem;
    }
    
    .about-section-modern {
        overflow-x: hidden;
    }
    
    /* Ensure search form columns stack properly */
    .search-form .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 767px) {
    .page-container {
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }
    
    .page-section {
        margin-bottom: 1.5rem;
    }
    
    /* Fix container overflow */
    .container {
        overflow-x: hidden;
        max-width: 100%;
    }

    .about-section-modern,
    .form-container {
        width: 100%;
        max-width: 100%;
    }
    
    /* Ensure row doesn't overflow */
    .row {
        margin-left: 0;
        margin-right: 0;
        overflow-x: hidden;
    }
    
    /* Fix column padding on mobile */
    .row > [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* =========================================================
   LOGO + NAVBAR
   ========================================================= */

/* Compact, professional, responsive logo */
/* =========================================================
   HEADER & NAVIGATION - Bootstrap 5 Ready
   ========================================================= */

/* Logo styling */
.logo-img {
    height: 75px !important;
    width: auto !important;
    object-fit: contain;
}

/* Navbar brand text */
.navbar-brand-text {
    font-weight: 700;
    color: var(--pp-text);
    font-size: 1.25rem;
    white-space: nowrap;
}

.navbar-brand:hover .navbar-brand-text {
    color: var(--pp-primary);
}

/* =========================================================
   HEADER - Bootstrap 5 Best Practices 2025
   ========================================================= */

.header-modern {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    width: 100%;
    overflow-x: hidden;
}

.header-modern .navbar {
    padding: 1rem 1rem;
    min-height: 95px;
}

.header-logo {
    height: 80px;
    width: auto;
    min-width: 60px;
    min-height: 60px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-modern .navbar-brand {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
}

.header-modern .navbar-brand:hover {
    color: var(--pp-primary) !important;
}

.header-modern .nav-link {
    font-weight: 500;
    color: #495057;
    border-radius: var(--pp-radius-sm);
    margin: 0 0.25rem;
    gap: 0.5rem;
}

.header-modern .nav-link:hover {
    background-color: var(--pp-primary-light);
    color: var(--pp-primary);
}

.header-modern .nav-link i {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.header-modern .nav-link span {
    white-space: nowrap;
}

/* Header Avatar */
.header-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pp-primary), var(--pp-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Dropdown Menu */
.header-modern .dropdown-menu {
    border-radius: var(--pp-radius-sm);
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

/* Ensure dropdown menu content is properly hidden when closed */
.header-modern .dropdown-menu:not(.show) {
    display: none;
}

.header-modern .dropdown-menu.show {
    display: block;
}

.header-modern .dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.header-modern .dropdown-item:hover {
    background-color: var(--pp-primary-light);
    color: var(--pp-primary);
}

.header-modern .dropdown-item i {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.header-modern .dropdown-item span {
    flex: 1;
}

.header-modern .dropdown-header {
    gap: 0.5rem;
}

.header-modern .dropdown-header i {
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
}

.header-modern .dropdown-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: #495057;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

/* Collapsed navbar styles (match Bootstrap "lg" breakpoint: < 992px) */
@media (max-width: 991px) {
    .header-modern .navbar {
        padding: 0.75rem 0.75rem;
        min-height: 85px;
    }
    
    .header-modern .navbar-collapse {
        padding: 1rem 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
        max-width: 100%;
        overflow-x: hidden;
        background: #ffffff;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .header-modern .navbar-collapse:not(.show) {
        display: none;
    }

    .header-modern .navbar-collapse.show {
        display: block;
    }
    
    .header-modern .navbar-nav {
        gap: 0.5rem;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-modern .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }
    
    .header-logo {
        height: 70px;
        min-height: 60px;
        min-width: 60px;
        max-width: none;
        width: auto;
    }
    
    .header-modern .navbar-brand {
        font-size: 1.1rem;
        flex: 0 0 auto;
        min-width: 0;
    }
    
    /* Ensure container doesn't overflow on mobile */
    .header-modern .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Hide username text on smaller screens, show only avatar */
    .header-modern .dropdown-toggle .fw-semibold {
        display: none !important;
    }
    
    .header-modern .dropdown-toggle .badge {
        display: none !important;
    }
    
    /* Ensure dropdown menu doesn't overflow */
    .header-modern .dropdown-menu {
        max-width: calc(100vw - 2rem);
        left: auto !important;
        right: 0.5rem !important;
    }
    
    /* User actions nav on mobile */
    .header-modern .navbar-nav.ms-auto {
        margin-top: 0.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        padding-top: 0.5rem;
    }
}

@media (max-width: 767px) {
    .header-modern .navbar {
        padding: 0.625rem;
        min-height: 80px;
    }
    
    .header-modern .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .header-logo {
        height: 60px;
        min-height: 50px;
        min-width: 50px;
        max-width: none;
        width: auto;
        flex-shrink: 0 !important;
    }
    
    .header-modern .navbar-brand {
        font-size: 1rem;
        flex: 0 0 auto;
        min-width: 0;
        padding-right: 0.5rem;
        margin-right: 0.25rem;
    }
    
    .header-modern .nav-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: flex-start;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Ensure nav items don't overflow */
    .header-modern .navbar-nav {
        width: 100%;
        flex-direction: column;
    }

    .header-modern .nav-item {
        width: 100%;
        margin: 0;
    }
    
    /* Dropdown on mobile */
    .header-modern .dropdown-menu {
        position: absolute;
        right: 0.5rem;
        left: auto !important;
        max-width: calc(100vw - 1rem);
        margin-top: 0.25rem;
    }
    
    /* Avatar on mobile */
    .header-modern .header-avatar {
        margin-right: 0.5rem;
    }
}

@media (max-width: 575px) {
    .header-modern .navbar-brand span {
        font-size: 0.85rem;
    }
    
    .header-logo {
        height: 55px;
        min-height: 50px;
        min-width: 50px;
        max-width: none;
        width: auto;
        flex-shrink: 0 !important;
    }
    
    .header-modern .navbar {
        padding: 0.5rem 0.25rem;
        min-height: 70px;
    }
    
    .header-modern .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .header-modern .navbar-brand {
        flex: 0 0 auto;
        min-width: 0;
        padding-right: 0.25rem;
        margin-right: 0;
    }
    
    /* Ensure logo has enough space on very small screens */
    .header-modern .navbar-brand .header-logo {
        margin-right: 0.25rem;
        flex-shrink: 0 !important;
    }
    
    .header-modern .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Smaller icons on very small screens */
    .header-modern .nav-link i {
        font-size: 0.875rem;
        width: 1rem;
    }
    
    /* Ensure no horizontal scroll */
    .header-modern .navbar-nav {
        margin-left: 0;
        margin-right: 0;
    }
    
    .header-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* =========================================================
   FORMS – Global Consistency
   ========================================================= */

.form-control,
.form-select,
select.form-control,
select.form-select {
    height: 48px;
    font-size: 16px;
    padding: 0.5rem 0.75rem;
}

/* Textareas are taller */
textarea.form-control {
    height: auto;
    min-height: 120px;
}

/* Label styles */
.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--pp-text);
}

/* Bootstrap 5 label class (preferred) */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--pp-text);
}

/* Prevent weird clipping on selects */
select.form-control,
select.form-select,
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23555' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px;
}

/* =========================================================
   BUTTONS – One Design To Rule Them All
   ========================================================= */

.btn {
    min-height: 44px;
    font-size: 16px;
    padding: 10px 24px;
    font-weight: 600;
    border-radius: var(--pp-radius-sm);
    transition: var(--pp-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

.btn i {
    font-size: 0.95em;
}

.btn:focus-visible {
    outline: 2px solid var(--pp-primary);
    outline-offset: 2px;
}

/* Primary */
.btn-primary {
    background: var(--pp-primary);
    border-color: var(--pp-primary);
}

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

/* Secondary */
.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background: #565e64;
}

/* Form button best practices: never full-width, always responsive */
form .btn {
    width: auto;
    max-width: 100%;
    align-self: center;
}

form .btn.flex-fill {
    flex: 0 0 auto;
}

form .d-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

form .d-grid .btn {
    width: auto;
    min-width: 160px;
}

form .input-group .btn {
    width: auto;
}

/* Button groups — flex row, left-aligned within form columns */
.form-button-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    margin-top: 1.5rem;
}

.form-button-group .btn {
    flex: 0 0 auto;
    min-width: 140px;
}

/* d-grid: Bootstrap 5 stacked full-width button pattern — do not override width */
/* Sidebar and form action grids rely on d-grid > .btn being 100% wide by default */

/* Hero / CTA sections still center their action buttons */
.hero-actions,
.hero-buttons,
.cta-panel {
    justify-content: center;
    align-items: center;
}

/* Pet card and dashboard action buttons: keep auto width */
.pet-card-actions .btn,
.dashboard-actions .btn,
.filter-actions .btn {
    min-width: 120px;
    width: auto;
}

/* Mobile: stack form buttons full width */
@media (max-width: 575px) {
    .form-button-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    .form-button-group .btn {
        width: 100%;
        min-width: unset;
    }
}

/* Mobile */
@media (max-width: 767px) {
    /* Footer buttons stay auto-width */
    .footer-modern .btn:not(.footer-modern .input-group .btn) {
        width: auto;
    }
}

/* =========================================================
   PET CARDS – Listing + Featured
   ========================================================= */

.pet-card {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-md);
    overflow: hidden;
    box-shadow: var(--pp-shadow-sm);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.pet-card:hover {
    box-shadow: var(--pp-shadow-md);
    text-decoration: none;
    color: inherit;
}

.pet-card-image {
    height: 260px;
    overflow: hidden;
    position: relative;
}

.pet-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pet-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pet-card-text {
    flex-grow: 1;
    color: var(--pp-muted);
    margin-bottom: 1rem;
}

/* =========================================================
   SEARCH PAGE
   ========================================================= */

.search-form .form-group {
    margin-bottom: 1.25rem;
}

/* =========================================================
   SIDEBAR - Bootstrap 5 Best Practices 2025
   ========================================================= */

/* Sidebar Container */
.sidebar-modern {
    position: sticky;
    top: 100px;
    z-index: 10;
}

/* Sidebar Cards - Using Bootstrap 5 Card Component */
.sidebar-modern .card {
    border-radius: var(--pp-radius-md);
    overflow: hidden;
}

.sidebar-modern .card:hover {
    box-shadow: var(--pp-shadow-md);
}

.sidebar-modern .card-header {
    padding: 1rem 1rem 0.5rem;
}

.sidebar-modern .card-body {
    padding: 0.5rem 1rem 1rem;
}

/* Sidebar Avatar */
.sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pp-primary), var(--pp-primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Sidebar Navigation Links */
.sidebar-modern .nav-link {
    color: #495057;
    font-weight: 500;
    border-radius: var(--pp-radius-sm);
    margin-bottom: 0.25rem;
}

.sidebar-modern .nav-link:hover {
    color: var(--pp-primary);
    background-color: var(--pp-primary-light);
    padding-left: 0.5rem;
}

.sidebar-modern .nav-link i {
    width: 20px;
    text-align: center;
}

/* Sidebar Info Items */
.sidebar-modern .list-unstyled li {
    border-radius: var(--pp-radius-sm);
    padding: 0.5rem;
    margin: 0;
}

.sidebar-modern .list-unstyled li:hover {
    background-color: var(--pp-primary-light);
}

.sidebar-modern .list-unstyled strong {
    font-size: 0.875rem;
    color: #212529;
    display: block;
    margin-bottom: 0.125rem;
}

.sidebar-modern .list-unstyled small {
    font-size: 0.8125rem;
    line-height: 1.4;
}

/* Social Media Buttons */
.sidebar-modern .btn-outline-primary:hover i {
    color: #ffffff;
}

.sidebar-modern .btn-outline-info:hover i {
    color: #ffffff;
}

.sidebar-modern .btn-outline-danger:hover i {
    color: #ffffff;
}

/* Sidebar: social icon buttons — small, square, icon-only */
.sidebar-social-buttons .btn {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Auth divider used on login/signup pages */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}
.auth-divider::before { margin-right: 0.75rem; }
.auth-divider::after  { margin-left:  0.75rem; }

/* Responsive Design */
@media (max-width: 991px) {
    .sidebar-modern {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }

    .sidebar-modern .card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 767px) {
    .sidebar-modern .card-body {
        padding: 0.75rem;
    }

    .sidebar-modern .card-header {
        padding: 0.75rem 0.75rem 0.5rem;
    }
}

/* =========================================================
   HERO AREA
   ========================================================= */

.modern-hero-section {
    background: url('../images/pawsitive_pets2.png') center top/cover no-repeat;
    background-position: center 20%;
    padding: 100px 0;
    color: #fff;
    position: relative;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 86, 179, 0.35);
    z-index: 1;
}

.modern-hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: #fff;
    /* WCAG AA compliant: Add semi-transparent dark background for text readability */
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 12px;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

/* On large desktop screens, align hero content to the left */
@media (min-width: 1200px) {
    .modern-hero-section .container {
        text-align: left;
        padding-left: 2rem;
    }
    
    .modern-hero-section .row {
        justify-content: flex-start;
    }
    
    .modern-hero-section .col-lg-7 {
        padding-left: 0;
        margin-left: -2rem;
    }
    
    .hero-content {
        max-width: 600px;
        margin-left: 0;
    }
}

/* On extra large desktop screens, shift even more left */
@media (min-width: 1400px) {
    .modern-hero-section .container {
        padding-left: 4rem;
    }
    
    .modern-hero-section .col-lg-7 {
        margin-left: -4rem;
    }
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 700;
    color: #ffffff;
    /* WCAG AA compliant: Large text (24px+) needs 3:1 contrast ratio */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.9);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Home page readability */
.home-page .section-subtitle,
.home-page .card-text,
.home-page .lead,
.home-page p {
    color: #374151;
}

.home-page .modern-hero-section .hero-subtitle,
.home-page .modern-hero-section .hero-title {
    color: #ffffff;
}

.hero-subtitle {
    color: #ffffff;
    font-size: 1.2rem;
    /* WCAG AA compliant: Normal text needs 4.5:1 contrast ratio */
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.9);
    line-height: 1.6;
}

/* Ensure hero headings stay white over imagery */
.modern-hero-section h1,
.modern-hero-section h2,
.modern-hero-section h3,
.modern-hero-section .hero-title,
.modern-hero-section .hero-subtitle {
    color: #ffffff;
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* =========================================================
   FOOTER - Bootstrap 5 Best Practices 2025
   ========================================================= */

.footer-modern {
    background: #212529;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-modern h5,
.footer-modern h6 {
    color: #ffffff;
}

.footer-modern a {
    transition: all 0.2s ease;
}

.footer-modern a:hover {
    color: #ffffff !important;
}

/* Footer Links */
.footer-modern .list-unstyled a {
    display: inline-block;
}

/* Footer newsletter width constraints (avoid inline styles in templates) */
.footer-newsletter-copy {
    max-width: 280px;
}

.footer-newsletter-form {
    max-width: 300px;
}

/* Newsletter Input Group */
.footer-modern .input-group .form-control:focus {
    background-color: #2a2a2a;
    border-color: var(--pp-primary);
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.footer-modern .input-group .btn {
    border-left: 0;
}

/* Social Media Icons */
.footer-modern .fa-brands {
    transition: all 0.2s ease;
}

.footer-modern a:hover .fa-facebook {
    color: #1877f2 !important;
}

.footer-modern a:hover .fa-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-modern a:hover .fa-twitter {
    color: #1da1f2 !important;
}

/* Footer Bottom */
.footer-modern hr {
    opacity: 0.2;
}

.footer-modern .small a {
    text-decoration: underline;
}

.footer-modern .small a:hover {
    color: #ffffff !important;
}

/* Responsive Design */
@media (max-width: 767px) {
    .footer-modern {
        text-align: center;
    }
    
    .footer-modern .d-flex.gap-3 {
        justify-content: center;
    }
}

/* =========================================================
   SECTION HEADERS & TITLES - Consistent Typography
   ========================================================= */

.section-header {
    margin-bottom: clamp(1.5rem, 2.5vw, 2.5rem);
    text-align: center;
}

/* When section-header is inside page-section, reduce bottom margin */
.page-section .section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    color: var(--pp-text);
    margin-bottom: 1rem;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--pp-primary) 0%, var(--pp-primary-dark) 100%);
    border-radius: 2px;
}

.section-subtitle {
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: var(--pp-muted);
    margin-top: 1.5rem;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 767px) {
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

/* =========================================================
   ABOUT SECTION - Modern Card Design
   ========================================================= */

.about-section-modern {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--pp-shadow-sm);
}

/* When inside page-section, margin is handled by page-section */
.page-section.about-section-modern {
    margin-bottom: 0;
}

.about-content {
    padding: 1rem 0;
}

.about-content h2,
.about-content h3 {
    color: var(--pp-text);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.about-content .lead {
    font-size: 1.15rem;
    color: var(--pp-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--pp-muted);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.about-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--pp-radius-md);
    box-shadow: var(--pp-shadow-md);
}

.about-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

/* =========================================================
   FEATURE ITEMS - Icon + Text Layout
   ========================================================= */

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: var(--pp-radius-md);
    border-left: 4px solid var(--pp-primary);
}

.feature-item:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    box-shadow: var(--pp-shadow-sm);
}

.feature-item i {
    font-size: 2rem;
    color: var(--pp-primary);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.feature-item h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pp-text);
    margin-bottom: 0.75rem;
}

.feature-item p {
    color: var(--pp-muted);
    line-height: 1.7;
    margin-bottom: 0;
}

/* =========================================================
   FEATURED PETS SECTION
   ========================================================= */

/* Featured pets section spacing is handled by page-section class */

.featured-pets-section .section-header {
    margin-bottom: 2.5rem;
}

.featured-pets-section .pet-card {
    margin-bottom: 2rem;
}

/* =========================================================
   CARDS - Enhanced Styling
   ========================================================= */

.card {
    border: none;
    border-radius: var(--pp-radius-md);
    overflow: hidden;
    box-shadow: var(--pp-shadow-sm);
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--pp-shadow-md);
}

.card-img-top {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--pp-text);
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--pp-muted);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* =========================================================
   ALERTS - Enhanced Styling
   ========================================================= */

.alert {
    border-radius: var(--pp-radius-sm);
    border: none;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--pp-shadow-sm);
}

.alert-danger {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert i {
    margin-right: 0.5rem;
}

/* =========================================================
   FORMS - Enhanced Styling
   ========================================================= */

.form-container {
    background: var(--pp-surface);
    padding: 2rem;
    border-radius: var(--pp-radius-md);
    box-shadow: var(--pp-shadow-sm);
    max-width: 100%;
}

.form-section {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

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

.form-group label {
    font-weight: 600;
    color: var(--pp-text);
    margin-bottom: 0.5rem;
    display: block;
}

.form-label {
    font-weight: 600;
    color: var(--pp-text);
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: var(--pp-primary);
    margin-right: 0.5rem;
}

.form-control:focus {
    border-color: var(--pp-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.form-text {
    color: #6b7280;
    font-size: 0.9rem;
}

.invalid-feedback,
.valid-feedback {
    font-size: 0.9rem;
}

.form-check {
    margin-bottom: 0.75rem;
}

.form-check-input {
    margin-top: 0.2rem;
}

.input-group-text {
    font-weight: 600;
    background: #f8fafc;
    border-color: #e5e7eb;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .btn {
    position: relative;
    z-index: 2;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .form-control:focus {
    z-index: 3;
}

/* =========================================================
   BADGES - Enhanced Styling
   ========================================================= */

.badge {
    padding: 0.4rem 0.75rem;
    font-weight: 600;
    border-radius: var(--pp-radius-sm);
    font-size: 0.85rem;
}

.badge-primary {
    background: linear-gradient(135deg, var(--pp-primary) 0%, var(--pp-primary-dark) 100%);
}

.badge-success {
    background: linear-gradient(135deg, var(--pp-success) 0%, #1e7e34 100%);
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: var(--pp-text);
}

.badge-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* =========================================================
   TABLES - Enhanced Styling
   ========================================================= */

.table-responsive {
    overflow-x: auto;
}

@media (max-width: 767px) {
    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
}
.table {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-md);
    overflow: hidden;
    box-shadow: var(--pp-shadow-sm);
}

/* Breadcrumb refinement */
.breadcrumb {
    font-size: 0.95rem;
    margin-bottom: var(--pp-space-4);
}

.breadcrumb a {
    color: var(--pp-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #111827;
    text-decoration: underline;
}

/* Utility sizing */
.icon-xxl { font-size: 4rem; }
.icon-xl { font-size: 3rem; }
.icon-lg { font-size: 2rem; }
.icon-md { font-size: 1.2rem; }
.text-xs { font-size: 0.75rem; }

.badge-xs {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
}

.progress-thin {
    height: 10px;
    border-radius: 5px;
}

.hero-min-300 {
    min-height: 300px;
}

.hero-min-350 {
    min-height: 350px;
}

.content-wrap-safe {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.avatar-200 {
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.avatar-45 {
    width: 45px;
    height: 45px;
}

.avatar-45-text {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
}

.step-circle {
    width: 50px;
    height: 50px;
}

.step-circle-lg {
    width: 60px;
    height: 60px;
}

.card-img-fixed-200 {
    height: 200px;
    object-fit: cover;
}

.card-img-fixed-200-placeholder {
    height: 200px;
}

.hero-content h1,
.page-title-xl {
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 700;
    color: var(--pp-text);
}

.page-container--spacious {
    padding-bottom: 4rem;
}

.match-score-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-image {
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
}

.quick-filter-btn {
    min-width: 180px;
}

.table thead {
    background: linear-gradient(135deg, var(--pp-primary) 0%, var(--pp-primary-dark) 100%);
    color: #ffffff;
}

.table thead th {
    border: none;
    padding: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-top: 1px solid #e9ecef;
}

.table-label {
    width: 40%;
}

/* =========================================================
   BUTTON ENHANCEMENTS
   ========================================================= */

.btn-outline-light {
    border: 2px solid #ffffff;
    color: #ffffff;
    background: transparent;
}

.btn-outline-light:hover {
    background: #ffffff;
    color: var(--pp-primary);
    border-color: #ffffff;
}

/* Button size variants */
.btn-lg {
    min-height: 52px;
    padding: 12px 28px;
    font-size: 16px;
}

.btn-sm {
    min-height: 36px;
    padding: 6px 16px;
    font-size: 14px;
}

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

.text-primary {
    color: var(--pp-primary) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--pp-primary) 0%, var(--pp-primary-dark) 100%) !important;
}

.shadow-lg {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
}

.rounded-lg {
    border-radius: var(--pp-radius-md) !important;
}

/* Icon wrapper for pet detail info cards */
.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 48px;
    min-height: 48px;
}

/* Pet Detail Summary + Meta */
.pet-detail-summary .card-text {
    color: #4b5563;
}

.pet-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.pet-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-md);
}

.pet-detail-meta-item .icon-wrapper {
    background: #eef4ff;
    border: 1px solid #d6e4ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    min-width: 44px;
    min-height: 44px;
}

.pet-detail-meta-item .icon-wrapper i {
    color: #1d4ed8;
}

.pet-detail-cta {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.pet-detail-cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: #1d4ed8;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Pet Detail Image Styling */
#petCarousel .carousel-item img,
.col-lg-5 .card-img-top {
    height: 500px;
    object-fit: cover;
    width: 100%;
}

/* Responsive adjustments for pet detail */
@media (max-width: 991px) {
    #petCarousel .carousel-item img,
    .col-lg-5 .card-img-top {
        height: 400px;
    }
}

@media (max-width: 767px) {
    .pet-detail-meta {
        grid-template-columns: 1fr;
    }
    
    .pet-detail-meta-item {
        padding: 0.75rem 0.85rem;
    }
    
    .pet-detail-meta-item .icon-wrapper {
        min-width: 40px;
        min-height: 40px;
    }
    
    #petCarousel .carousel-item img,
    .col-lg-5 .card-img-top {
        height: 300px;
    }
}

/* =========================================================
   RESPONSIVE IMPROVEMENTS
   ========================================================= */

@media (max-width: 991px) {
    .about-section-modern {
        padding: 2rem 1.5rem;
    }
    
    .feature-item {
        padding: 1.25rem;
    }
    
    .form-container {
        padding: 1.5rem;
    }
}

@media (max-width: 767px) {
    .about-section-modern {
        padding: 1.5rem 1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-item i {
        margin: 0 auto 1rem;
    }
    
    .form-container {
        padding: 1.25rem 1rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: auto;
    }
}

/* =========================================================
   TRANSITIONS (Subtle hover effects only)
   ========================================================= */

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

/* =========================================================
   ADDITIONAL CONSISTENCY IMPROVEMENTS
   ========================================================= */

/* Ensure consistent spacing for all content sections */
.main-content-column > section:first-child {
    margin-top: 0;
}

/* Consistent card spacing in grids */
.row .col-md-4 .pet-card,
.row .col-md-6 .pet-card,
.row .col-lg-4 .pet-card {
    margin-bottom: 2rem;
}

/* Ensure pet cards don't overflow on mobile */
@media (max-width: 767px) {
    .pet-card-image {
        height: 220px;
    }
    
    .pet-card-body {
        padding: 1rem;
    }
    
    .pet-card-title {
        font-size: 1.2rem;
    }
    
    .pet-card-text {
        font-size: 0.9rem;
    }
    
    /* Ensure search form doesn't overflow */
    .search-form {
        overflow-x: hidden;
    }
    
    .search-form .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .search-form .col-md-6 {
        padding-left: 0;
        padding-right: 0;
    }
    
    /* Fix accordion overflow */
    .accordion-body {
        overflow-x: hidden;
    }
}

/* NOTE: .form-button-group is defined earlier in this file.
   Avoid redefining it here to prevent conflicting layout rules across pages. */

/* btn-lg and btn-sm consolidated in BUTTONS section above */

/* Form group consistency */
.form-group:last-child,
.mb-3:last-child {
    margin-bottom: 0;
}

/* Consistent alert spacing */
.alert:last-child {
    margin-bottom: 0;
}

/* Team member cards */
.team-member-card {
    height: 100%;
}

.team-member-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

/* Pet card overlay for hover effects */
.pet-card-image {
    position: relative;
}

.pet-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
}

.pet-card-overlay a,
.pet-card-overlay span {
    pointer-events: auto;
    z-index: 11;
}

.pet-card-overlay .btn {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

.pet-card:hover .pet-card-overlay {
    opacity: 1;
}

/* Consistent text alignment */
.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Ensure consistent line heights */
p, .lead {
    line-height: 1.7;
}

/* Consistent list styling */
ul, ol {
    padding-left: 1.5rem;
}

/* Consistent link styling */
a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: var(--pp-primary);
    text-decoration: none;
}

a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: var(--pp-primary-dark);
    text-decoration: underline;
}

/* =========================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================= */

*:focus-visible {
    outline: 2px solid var(--pp-primary);
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--pp-primary);
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--pp-primary);
    color: #ffffff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

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

/* =========================================================
   SHELTER DASHBOARD UI
   ========================================================= */

.shelter-ui {
    background: #f5f7fb;
}

.shelter-ui .content-with-sidebar,
.shelter-ui .main-content-column {
    overflow: visible;
}

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

.dashboard-title h1 {
    font-size: 2rem;
    font-weight: 700;
}

.dashboard-actions .btn {
    box-shadow: 0 10px 24px rgba(0, 123, 255, 0.2);
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-card {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--pp-shadow-sm);
    border: 1px solid var(--pp-border);
}

.summary-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
}

.summary-footnote {
    font-size: 0.85rem;
    color: #64748b;
}

.shelter-hero {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    border-radius: var(--pp-radius-lg);
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
}

.shelter-hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.shelter-hero h1 {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.shelter-hero .lead {
    color: rgba(255, 255, 255, 0.85);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.shelter-hero-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--pp-radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.shelter-hero-card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.75rem;
}

.shelter-hero-card li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header h2,
.section-header h3 {
    margin-bottom: 0.25rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--pp-border);
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-action-card i {
    font-size: 1.6rem;
    color: #2563eb;
}

.quick-action-card h5 {
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.cta-panel {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-lg);
    border: 1px solid var(--pp-border);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.filter-pill-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-pill-bar .pill {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid #d0d5dd;
    background: #fff;
    color: #344054;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.filter-pill-bar .pill.active,
.filter-pill-bar .pill:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.table-shell {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-lg);
    padding: 1rem;
    border: 1px solid var(--pp-border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.dashboard-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
}

.pet-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.pet-management-card {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-lg);
    border: 1px solid var(--pp-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.pet-card-media {
    position: relative;
    height: 180px;
    background: #f8fafc;
}

.pet-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pet-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #94a3b8;
}

.pet-photo-count {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.pet-status {
    position: absolute;
    top: 10px;
    right: 10px;
}

.pet-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pet-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.pet-card-header h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.pet-card-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 0;
}

.dot-divider {
    margin: 0 0.35rem;
}

.pet-card-meta {
    text-align: right;
    font-size: 0.85rem;
    color: #64748b;
}

.pet-card-meta strong {
    display: block;
    color: #111827;
    font-size: 1.05rem;
}

.pet-card-badges {
    display: grid;
    gap: 0.5rem;
}

.pet-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pet-owner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.pet-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.empty-state {
    background: var(--pp-surface);
    border-radius: var(--pp-radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px dashed #cbd5f5;
    color: #64748b;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

@media (max-width: 991px) {
    .shelter-hero {
        padding: 2rem;
    }

    .cta-panel {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        width: auto;
    }
}

/* =========================================================
   TRANSITIONS – Consistent hover effects
   ========================================================= */

.card,
.pet-card,
.feature-item,
.quick-action-card,
.nav-link,
.sidebar-modern .nav-link {
    transition: box-shadow var(--pp-transition), transform var(--pp-transition), background-color var(--pp-transition);
}

.pet-card-overlay {
    transition: opacity var(--pp-transition);
}

/* =========================================================
   ACCESSIBILITY – Reduced Motion & Print
   ========================================================= */

@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;
    }
}

/* =========================================================
   FORUM – Community Forum Components
   ========================================================= */

/* Forum post card */
.forum-post-card {
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-md);
    transition: box-shadow var(--pp-transition), transform var(--pp-transition);
}

.forum-post-card:hover {
    box-shadow: var(--pp-shadow-md);
    transform: translateY(-2px);
}

/* Forum post title link */
.forum-post-title a {
    color: var(--pp-text);
    text-decoration: none;
    font-weight: 600;
}

.forum-post-title a:hover {
    color: var(--pp-primary);
}

/* Forum post meta info row */
.forum-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--pp-muted);
    margin-bottom: 0.5rem;
}

.forum-post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Forum post preview text */
.forum-post-preview {
    color: var(--pp-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Forum post full content (view page) */
.forum-post-content {
    background-color: var(--pp-bg);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-sm);
    padding: 1.25rem;
    line-height: 1.75;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Forum post actions bar */
.forum-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pp-border);
}

/* Forum stats (views, comments) */
.forum-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.forum-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--pp-muted);
}

/* Forum category badges */
.forum-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    background-color: var(--pp-primary-light);
    color: var(--pp-primary-dark);
}

.forum-category-badge.adoption_tips   { background-color: rgba(40,167,69,.12);  color: #155724; }
.forum-category-badge.rehoming_advice { background-color: rgba(255,193,7,.15);  color: #856404; }
.forum-category-badge.pet_care        { background-color: rgba(23,162,184,.12); color: #0c5460; }
.forum-category-badge.success_stories { background-color: rgba(40,167,69,.12);  color: #155724; }
.forum-category-badge.community_events{ background-color: rgba(111,66,193,.1);  color: #4b2d83; }
.forum-category-badge.general         { background-color: rgba(108,117,125,.1); color: #495057; }

/* Forum profile avatar */
.forum-profile-picture {
    width: 48px;
    height: 48px;
    object-fit: cover;
    flex-shrink: 0;
}

.forum-profile-placeholder {
    width: 48px;
    height: 48px;
    background-color: var(--pp-primary-light);
    color: var(--pp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Smaller avatar variant for comments */
.avatar-45 {
    width: 40px;
    height: 40px;
}

.avatar-45-text {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

/* Forum create button */
.forum-create-btn {
    padding: 0.6rem 1.25rem;
    font-weight: 600;
}

/* Forum filter card */
.forum-filter-card {
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-md);
}

.forum-filter-card .card-header {
    background-color: var(--pp-primary-light);
    border-bottom: 1px solid var(--pp-border);
    font-weight: 600;
}

/* Forum post view layout */
.forum-post-view {
    background: var(--pp-surface);
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Forum comment */
.forum-comment {
    padding: 1rem 0;
    border-bottom: 1px solid var(--pp-border);
}

.forum-comment:last-child {
    border-bottom: none;
}

.forum-comment-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.forum-comment-author {
    font-weight: 600;
    color: var(--pp-text);
    font-size: 0.9rem;
}

.forum-comment-time {
    font-size: 0.8rem;
    color: var(--pp-muted);
}

.forum-comment-content {
    margin: 0;
    color: var(--pp-text);
    line-height: 1.6;
    word-wrap: break-word;
}

/* Forum comment form */
.forum-comment-form {
    background-color: var(--pp-bg);
    border-radius: var(--pp-radius-sm);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--pp-border);
}

/* =========================================================
   STICKY HEADER SCROLL SHADOW
   ========================================================= */
.header-modern {
    transition: box-shadow 0.2s ease;
}
.header-modern.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12) !important;
}

/* =========================================================
   MOBILE BOTTOM NAVIGATION
   ========================================================= */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--pp-border);
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    color: var(--pp-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    gap: 0.2rem;
    transition: color 0.15s ease;
    min-height: 56px;
}
.bottom-nav-item i {
    font-size: 1.1rem;
}
.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--pp-primary);
}

/* Add bottom padding on mobile so content is not hidden behind bottom nav */
@media (max-width: 991px) {
    main.page-container {
        padding-bottom: 72px;
    }
    .footer-modern {
        margin-bottom: 56px;
    }
}

/* =========================================================
   SKELETON LOADING CARDS
   ========================================================= */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton-card {
    background: #fff;
    border-radius: var(--pp-radius-md);
    overflow: hidden;
    border: 1px solid var(--pp-border);
}
.skeleton-img {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite;
}
.skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite;
    margin: 0.5rem 1rem;
}
.skeleton-line.skeleton-title { height: 18px; width: 70%; }
.skeleton-line.skeleton-short  { width: 40%; }
.skeleton-line.skeleton-btn    { height: 32px; width: 50%; margin-top: 1rem; border-radius: 6px; }

/* =========================================================
   PASSWORD STRENGTH BAR
   ========================================================= */
.password-strength-bar {
    height: 4px;
    background: var(--pp-border);
    border-radius: 2px;
    overflow: hidden;
}
.password-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */
.empty-state {
    padding: 3rem 1rem;
}
.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--pp-primary-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--pp-primary);
}
.empty-state-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pp-text);
    margin-bottom: 0.5rem;
}
.empty-state-text {
    color: var(--pp-muted);
    font-size: 0.95rem;
    max-width: 400px;
    margin: 0 auto;
}

/* =========================================================
   BLOG STYLES
   ========================================================= */
.blog-card {
    background: #fff;
    border-radius: var(--pp-radius-md);
    border: 1px solid var(--pp-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-card:hover {
    box-shadow: var(--pp-shadow-md);
    transform: translateY(-3px);
}
.blog-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--pp-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.blog-card:hover .blog-card-img img {
    transform: scale(1.04);
}
.blog-card-img-placeholder {
    font-size: 3rem;
    color: var(--pp-primary);
    opacity: 0.4;
}
.blog-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-source {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pp-primary);
}
.blog-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.25rem;
}
.blog-card-excerpt {
    font-size: 0.82rem;
    line-height: 1.5;
    flex: 1;
}
.blog-post-hero {
    border-radius: var(--pp-radius-md);
    overflow: hidden;
    max-height: 420px;
}
.blog-post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-post-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
}
.blog-post-meta {
    border-bottom: 1px solid var(--pp-border);
    padding-bottom: 0.75rem;
}
.blog-post-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--pp-text);
}
.blog-post-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 1.5rem 0 0.5rem;
}
.blog-post-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.4rem;
}
.blog-post-content p { margin-bottom: 1rem; }
.blog-post-content ul,
.blog-post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.blog-post-content li { margin-bottom: 0.4rem; }
.blog-post-source { font-size: 0.85rem; }

@media print {
    .header-modern,
    .footer-modern,
    .sidebar-column,
    .hero-buttons,
    .pet-card-overlay,
    .btn {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    .main-content-column {
        width: 100%;
        padding: 0;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--pp-muted);
    }
}