/* ===================================
   DOG ADOPTION SITE - MAIN STYLES
   Modern Blue Design
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

/* ===================================
   VARIABLES & RESET
   =================================== */
:root {
    /* Modern Blue Palette */
    --primary: #2563EB;          /* Modern blue */
    --primary-dark: #1E3A8A;     /* Deep navy blue */
    --primary-light: #3B82F6;    /* Light blue */
    --secondary: #0EA5E9;        /* Sky blue */
    --accent: #93C5FD;           /* Soft light blue */

    /* Neutrals */
    --bg-cream: #F3F6FC;         /* Cool light background */
    --bg-white: #FFFFFF;
    --text-dark: #16213A;
    --text-medium: #4B5567;
    --text-light: #8792A6;
    --border: #E2E8F0;
    --shadow: rgba(37, 99, 235, 0.12);

    /* Ombre più ricche per card/elementi in evidenza */
    --shadow-lift: 0 16px 36px rgba(22, 33, 58, 0.16), 0 4px 10px rgba(22, 33, 58, 0.06);

    /* Typography */
    --font-main: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Poppins', 'Segoe UI', var(--font-main);

    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;

    /* Borders & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    font-family: var(--font-main);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

input, textarea, select {
    font-family: var(--font-main);
    font-size: 1rem;
}

/* ===================================
   LAYOUT
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-xxl) 0;
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   BREADCRUMB
   =================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) 0;
    font-size: 0.9rem;
    color: var(--text-medium);
}

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

.breadcrumb span:last-child {
    color: var(--text-dark);
    font-weight: 500;
}

/* ===================================
   CONTENT WRAPPER
   =================================== */
.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

/* ===================================
   FILTERS SIDEBAR
   =================================== */
.filters-sidebar {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px var(--shadow);
    height: fit-content;
    position: sticky;
    top: var(--spacing-lg);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary);
}

.filters-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary);
}

.reset-filters {
    background: none;
    color: var(--text-medium);
    font-size: 0.875rem;
    padding: 0;
    text-decoration: underline;
}

.reset-filters:hover {
    color: var(--primary);
}

.filter-group {
    margin-bottom: var(--spacing-lg);
}

.filter-group > label:first-child {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    font-size: 0.95rem;
}

.search-input {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-medium);
    transition: var(--transition);
}

.checkbox-label:hover {
    color: var(--text-dark);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ===================================
   DOGS CONTENT
   =================================== */
.dogs-content {
    min-width: 0;
}

.filter-toggle {
    display: none;
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    box-shadow: 0 2px 4px var(--shadow);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.results-count {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.results-count span {
    font-weight: 600;
    color: var(--primary);
}

.sort-select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
    font-size: 0.9rem;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===================================
   DOGS GRID
   =================================== */
.dogs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

/* ===================================
   DOG CARD (Minimalist)
   =================================== */
.dog-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.card-link {
    display: block;
}

.card-image {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
    background: var(--bg-cream);
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.urgent-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: #E74C3C;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content {
    padding: var(--spacing-md);
}

.dog-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.dog-info {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.info-badge {
    padding: 0.25rem 0.625rem;
    background: var(--bg-cream);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-medium);
}

/* ===================================
   NO RESULTS
   =================================== */
.no-results {
    text-align: center;
    padding: var(--spacing-xxl) var(--spacing-lg);
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px var(--shadow);
}

.no-results svg {
    margin: 0 auto var(--spacing-lg);
    opacity: 0.5;
}

.no-results h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.no-results p {
    color: var(--text-medium);
}

/* ===================================
   PAGINATION
   =================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
}

.pagination-link {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 0.95rem;
    box-shadow: 0 2px 4px var(--shadow);
    min-width: 44px;
    text-align: center;
}

.pagination-link:hover {
    background: var(--primary);
    color: white;
}

.pagination-link.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

/* ===================================
   CTA SECTION
   =================================== */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.cta-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.95;
}

.cta-button {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    background: white;
    color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    font-size: 1.125rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ===================================
   DOG DETAIL PAGE
   =================================== */
.dog-detail {
    margin-bottom: var(--spacing-xxl);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
}

/* Gallery Section */
.gallery-section {
    position: sticky;
    top: var(--spacing-lg);
    height: fit-content;
}

.main-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
    margin-bottom: var(--spacing-md);
}

.main-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image-large {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cream);
}

.urgent-badge-large {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    background: #E74C3C;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary);
}

/* Info Section */
.info-section {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px var(--shadow);
}

.dog-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.breed {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: var(--spacing-lg);
}

.quick-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
    border-top: 2px solid var(--bg-cream);
    border-bottom: 2px solid var(--bg-cream);
    margin-bottom: var(--spacing-lg);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.info-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

.info-item .label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item .value {
    display: block;
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.character-section,
.story-section,
.additional-info {
    margin-bottom: var(--spacing-xl);
}

.character-section h3,
.story-section h3,
.additional-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.character-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.character-tag {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-cream);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
}

.story-content {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1.05rem;
}

.info-list {
    list-style: none;
}

.check-item {
    padding: var(--spacing-sm) 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.check-item::before {
    content: '✓';
    color: var(--primary);
    font-weight: bold;
    margin-right: var(--spacing-sm);
}

.adoption-cta {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--bg-cream);
    text-align: center;
}

.adopt-button {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.adopt-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.cta-note {
    margin-top: var(--spacing-sm);
    font-size: 0.875rem;
    color: var(--text-medium);
}

/* ===================================
   MODAL
   =================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--bg-cream);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.modal-close:hover {
    background: var(--primary);
    color: white;
}

.modal-content h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.modal-subtitle {
    color: var(--text-medium);
    margin-bottom: var(--spacing-xl);
}

.adoption-form .form-group {
    margin-bottom: var(--spacing-md);
}

.adoption-form label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.adoption-form input,
.adoption-form textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.adoption-form input:focus,
.adoption-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.submit-button {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--primary);
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-md);
}

.submit-button:hover {
    background: var(--primary-dark);
}

/* ===================================
   SIMILAR DOGS
   =================================== */
.similar-dogs {
    padding: var(--spacing-xxl) 0;
    background: var(--bg-white);
}

.similar-dogs h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

/* ===================================
   CONTACT PAGE
   =================================== */

/* Hero Small Variant */
.hero-small {
    padding: var(--spacing-xl) 0;
}

.hero-small h1 {
    font-size: 2rem;
}

.hero-small p {
    font-size: 1.125rem;
}

/* Contact Grid */
.contact-page {
    padding: var(--spacing-xxl) 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-xxl);
}

/* Contact Form Wrapper */
.contact-form-wrapper {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px var(--shadow);
}

.contact-form-wrapper h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.form-intro {
    color: var(--text-medium);
    margin-bottom: var(--spacing-xl);
}

/* Contact Form */
.contact-form .form-group {
    margin-bottom: var(--spacing-md);
}

.contact-form label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-white);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form input.error,
.contact-form textarea.error {
    border-color: #E74C3C;
}

.error-hint {
    display: block;
    color: #E74C3C;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.char-counter {
    display: block;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.form-group.focused label {
    color: var(--primary);
}

/* Contact Info Wrapper */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-info-card,
.social-media-card,
.quick-info-box {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-info-card.animated,
.social-media-card.animated,
.quick-info-box.animated {
    opacity: 1;
    transform: translateY(0);
}

.contact-info-card h3,
.social-media-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--primary);
}

/* Contact Items */
.contact-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-cream);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--bg-white);
    box-shadow: 0 2px 8px var(--shadow);
    transform: translateX(5px);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.contact-details h4 {
    font-size: 0.875rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1rem;
    font-weight: 500;
    white-space: pre-line;
}

.contact-details a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Social Media */
.social-media-card {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-cream) 100%);
    border: 2px solid rgba(37, 99, 235, 0.2);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    justify-content: center;
}

.social-link {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link.facebook {
    background: #1877F2;
}

.social-link.instagram {
    background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

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

.social-link.youtube {
    background: #FF0000;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Quick Info Box */
.quick-info-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border: none;
    color: white;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.quick-info-box h4 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.125rem;
    color: white;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.quick-info-box h4 svg {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.quick-info-box p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
    line-height: 1.6;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: #25D366;
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 1.05rem;
}

.whatsapp-button:hover {
    background: #1EBE57;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Form Messages */
.form-message {
    margin-bottom: var(--spacing-lg);
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-content {
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    text-align: center;
}

.success-content {
    background: linear-gradient(135deg, #E8F8F5 0%, #D5F4E6 100%);
    border: 2px solid #27AE60;
}

.error-content {
    background: linear-gradient(135deg, #FADBD8 0%, #F5B7B1 100%);
    border: 2px solid #E74C3C;
}

.message-content svg {
    margin: 0 auto var(--spacing-md);
}

.message-content h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.success-content h3 {
    color: #27AE60;
}

.error-content h3 {
    color: #E74C3C;
}

.message-content p {
    color: var(--text-medium);
}

/* Map Section */
.map-section {
    margin: var(--spacing-xxl) 0;
}

.map-section h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
}

/* FAQ Section */
.faq-section {
    padding: var(--spacing-xxl) 0;
    background: var(--bg-cream);
}

.faq-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.faq-item {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
    border: 2px solid transparent;
    box-shadow: 0 2px 8px var(--shadow);
}

.faq-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.faq-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
    transform: translateY(-8px);
}

.faq-item h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.faq-item h3::before {
    content: "→";
    font-size: 1.5rem;
    transition: var(--transition);
}

.faq-item:hover h3::before {
    transform: translateX(5px);
}

.faq-item p {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        z-index: 999;
        overflow-y: auto;
        transition: left 0.3s ease;
    }
    
    .filters-sidebar.active {
        left: 0;
    }
    
    .filter-toggle {
        display: flex;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .gallery-section {
        position: static;
    }
    
    .quick-info {
        grid-template-columns: 1fr;
    }
    
    /* Contact Page Responsive */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .dogs-grid {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dog-header h1 {
        font-size: 2rem;
    }
    
    .thumbnail-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Contact Page Mobile */
    .contact-form-wrapper {
        padding: var(--spacing-md);
    }
    
    .social-links {
        justify-content: center;
    }
}
/* ===================================
   HOMEPAGE STYLES
   =================================== */

/* ===================================
   HOME HERO SECTION
   =================================== */
.home-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: white;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    z-index: -2;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* In modalità modifica l'editable immagine viene renderizzato in un
   blocco a parte, fuori dalla sezione hero: dentro .hero-background
   (position: absolute, z-index negativo, overflow hidden, dentro un
   genitore flex) l'area di upload risulterebbe nascosta/tagliata e
   non cliccabile. */
/* Riquadro per caricare un'immagine editabile in editmode, usato dove
   il contenitore "live" dell'immagine ha overflow:hidden/altezza zero
   (trucco aspect-ratio) o posizionamento che nasconderebbe l'area di
   upload di Pimcore. Vedi bricks Hero e FeaturedPets. */
.editable-image-editmode {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    background: rgba(37, 99, 235, 0.08);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-sm);
}

.editable-image-editmode strong {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-dark);
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.85) 0%, 
        rgba(30, 58, 138, 0.85) 50%, 
        rgba(14, 165, 233, 0.85) 100%
    );
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
    backdrop-filter: blur(2px);
}

.hero-content-home {
    text-align: center;
    padding: var(--spacing-xxl) 0;
    animation: fadeInUp 0.8s ease;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-lg);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-title .highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(147, 197, 253, 0.3);
    z-index: -1;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xxl);
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.hero-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(255, 255, 255, 0.3);
}

.hero-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    max-width: 600px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* ===================================
   QUICK SEARCH
   =================================== */
.quick-search {
    margin-top: calc(var(--spacing-xxl) * -1);
    margin-bottom: var(--spacing-xxl);
    position: relative;
    z-index: 10;
}

.search-card {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.15);
}

.search-card h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.search-form-home .search-filters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.filter-item label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.filter-item select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--bg-white);
    transition: var(--transition);
}

.filter-item select:focus {
    outline: none;
    border-color: var(--primary);
}

.search-submit {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: 1.75rem;
    transition: var(--transition);
}

.search-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ===================================
   SECTION HEADER
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-medium);
}

/* ===================================
   FEATURED PETS
   =================================== */
.featured-pets {
    padding: var(--spacing-xxl) 0;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.featured-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px var(--shadow);
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
}

.featured-image {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
    background: var(--bg-cream);
}

.featured-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.featured-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.pet-type-badge {
    position: absolute;
    bottom: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--primary);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.featured-info {
    padding: var(--spacing-lg);
}

.featured-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.pet-details {
    display: flex;
    gap: var(--spacing-xs);
    color: var(--text-medium);
    font-size: 0.95rem;
}

.section-cta {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.view-all-btn {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--transition);
}

.view-all-btn:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* ===================================
   HOW IT WORKS
   =================================== */
.how-it-works {
    padding: var(--spacing-xxl) 0;
    background: var(--bg-cream);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.step-card {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    box-shadow: 0 2px 12px var(--shadow);
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2);
}

.step-number {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    background: var(--bg-cream);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.step-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.step-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.step-card p {
    color: var(--text-medium);
    line-height: 1.6;
}

.steps-cta {
    text-align: center;
}

.info-btn {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--transition);
}

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

/* ===================================
   WHY ADOPT
   =================================== */
.why-adopt {
    padding: var(--spacing-xxl) 0;
}

.why-adopt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
}

.why-adopt-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
}

.reasons-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.reason-item {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.reason-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.reason-text h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.reason-text p {
    color: var(--text-medium);
    line-height: 1.6;
}

.why-adopt-image {
    position: relative;
}

.image-decoration {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    background: var(--bg-cream);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.why-adopt-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px var(--shadow);
}

/* ===================================
   URGENT SECTION
   =================================== */
.urgent-section {
    padding: var(--spacing-xxl) 0;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFE8E8 100%);
}

.urgent-header {
    text-align: center;
    margin-bottom: var(--spacing-xxl);
}

.urgent-badge-large {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: #E74C3C;
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

.urgent-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.urgent-header p {
    font-size: 1.125rem;
    color: var(--text-medium);
}

.urgent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.urgent-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.15);
    border: 2px solid #E74C3C;
}

.urgent-image {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    background: var(--bg-cream);
}

.urgent-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.urgent-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.urgent-info {
    padding: var(--spacing-lg);
}

.urgent-info h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.urgent-reason {
    color: #E74C3C;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.urgent-btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: #E74C3C;
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.urgent-btn:hover {
    background: #C0392B;
    transform: translateY(-2px);
}

/* ===================================
   SUPPORT SECTION
   =================================== */
.support-section {
    padding: var(--spacing-xxl) 0;
    background: var(--bg-cream);
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.support-card {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: 0 2px 12px var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.support-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
}

.support-card.highlight {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
}

.support-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.support-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.support-card.highlight h3,
.support-card.highlight p {
    color: white;
}

.support-card p {
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
}

.support-link {
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.support-card.highlight .support-link {
    color: white;
    text-decoration: underline;
}

.support-link:hover {
    color: var(--primary-dark);
}

/* ===================================
   TESTIMONIALS
   =================================== */
.testimonials {
    padding: var(--spacing-xxl) 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.testimonial-card {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px var(--shadow);
}

.stars {
    color: #F5A623; /* oro per le stelle di valutazione, indipendente dal colore del brand */
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
}

.testimonial-text {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 1.05rem;
    font-style: italic;
    margin-bottom: var(--spacing-lg);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.author-info strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

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

/* ===================================
   NEWSLETTER
   =================================== */
.newsletter {
    padding: var(--spacing-xxl) 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.newsletter-text h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.newsletter-text p {
    opacity: 0.95;
    font-size: 1.125rem;
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-sm);
}

.newsletter-form input {
    flex: 1;
    padding: var(--spacing-md);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.newsletter-form button {
    padding: var(--spacing-md) var(--spacing-xl);
    background: white;
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ===================================
   FINAL CTA
   =================================== */
.final-cta {
    padding: var(--spacing-xxl) 0;
}

.final-cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.final-cta-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.final-cta-content p {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: var(--spacing-xl);
}

.final-cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.final-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.125rem;
    transition: var(--transition);
}

.final-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.final-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.final-btn.secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

/* ===================================
   DEMO FOR SALE
   =================================== */
.demo-for-sale {
    padding: var(--spacing-xxl) 0;
}

.demo-for-sale-card {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
    background: var(--bg-white);
    border: 2px dashed var(--primary-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lift);
}

.demo-for-sale-badge {
    display: inline-block;
    margin-bottom: var(--spacing-md);
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.demo-for-sale-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.demo-for-sale-card h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.demo-for-sale-card p {
    max-width: 640px;
    margin: 0 auto var(--spacing-lg);
    color: var(--text-medium);
    line-height: 1.6;
}

.demo-for-sale-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.demo-for-sale-email {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.demo-for-sale-email:hover {
    color: var(--primary-dark);
}

@media (max-width: 640px) {
    .demo-for-sale-card {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .demo-for-sale-card h2 {
        font-size: 1.5rem;
    }
}

/* ===================================
   RESPONSIVE - HOMEPAGE
   =================================== */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .stat-divider {
        width: 100px;
        height: 1px;
    }
    
    .search-form-home .search-filters {
        grid-template-columns: 1fr;
    }
    
    .why-adopt-grid {
        grid-template-columns: 1fr;
    }
    
    .why-adopt-image {
        order: -1;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    .final-cta-content h2 {
        font-size: 2rem;
    }
    
    .final-cta-buttons {
        flex-direction: column;
    }
    
    .final-btn {
        width: 100%;
    }
}

/* ===================================
   404 ERROR PAGE STYLES
   =================================== */
.error-404-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: var(--spacing-xxl) 0;
}

.error-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Illustration */
.error-illustration {
    position: relative;
    margin-bottom: var(--spacing-xl);
    animation: float 3s ease-in-out infinite;
}

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

.error-illustration svg {
    margin: 0 auto;
    filter: drop-shadow(0 10px 30px rgba(37, 99, 235, 0.2));
}

.error-number {
    font-size: 8rem;
    font-weight: 900;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: var(--spacing-lg);
    line-height: 1;
}

/* Message */
.error-message {
    margin-bottom: var(--spacing-xxl);
}

.error-message h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.error-description {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: var(--spacing-sm);
}

.error-hint {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Actions */
.error-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-xxl);
}

.primary-action {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-sm);
    font-size: 1.125rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.primary-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.secondary-action {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-white);
    color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid var(--primary);
    transition: var(--transition);
}

.secondary-action:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Search Box */
.error-search {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px var(--shadow);
    margin-bottom: var(--spacing-xxl);
}

.error-search h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--bg-cream);
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-icon {
    margin-left: var(--spacing-sm);
    color: var(--text-light);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--spacing-sm);
    font-size: 1rem;
    outline: none;
}

.search-button {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: var(--transition);
}

.search-button:hover {
    background: var(--primary-dark);
}

/* Popular Links */
.popular-links h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.link-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.link-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-4px);
}

.link-icon {
    font-size: 2rem;
}

.link-card span {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* 404 Responsive */
@media (max-width: 640px) {
    .error-number {
        font-size: 5rem;
    }
    
    .error-message h1 {
        font-size: 1.75rem;
    }
    
    .error-description {
        font-size: 1rem;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .primary-action,
    .secondary-action {
        justify-content: center;
    }
    
    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   SITE HEADER
   =================================== */
.site-header {
    background: var(--bg-white);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.main-nav a {
    font-weight: 600;
    color: var(--text-dark);
    padding: var(--spacing-xs) 0;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        box-shadow: 0 8px 16px var(--shadow);
        transition: max-height 0.3s ease;
    }

    .main-nav a {
        width: 100%;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--border);
    }

    .nav-toggle-checkbox:checked ~ .main-nav {
        max-height: 300px;
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle-checkbox:checked ~ .nav-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ===================================
   SITE FOOTER
   =================================== */
.site-footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: var(--spacing-xxl) 0 0;
    margin-top: var(--spacing-xxl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

.footer-brand h3 {
    font-family: var(--font-heading);
    color: white;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.footer-grid h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a,
.footer-contact p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9375rem;
}

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

.social-icons {
    display: flex;
    gap: var(--spacing-sm);
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.25rem;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md) 0;
    text-align: center;
    font-size: 0.875rem;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 540px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   VISUAL ENHANCEMENTS (restyling grafico)
   =================================== */

/* Selezione testo e scrollbar personalizzata */
::selection {
    background: var(--primary-light);
    color: #fff;
}

html {
    scrollbar-color: var(--primary) var(--bg-cream);
    scrollbar-width: thin;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Focus da tastiera più curato e accessibile */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Hero generico (listing/contatti): texture a zampe + onda di transizione */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.12) 0%, transparent 45%),
        url('/assets/images/paw-pattern-light.svg');
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: auto, auto, 180px 180px;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 48px;
    background-image: url('/assets/images/wave-divider.svg');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Hero home: immagine di sfondo curata di default (prima di un eventuale upload) + texture a zampe.
   Resta sotto l'eventuale <img class="hero-bg-img"> con la foto caricata dall'editor, che la ricopre. */
.hero-background {
    background-image: url('/assets/images/hero-bg-fallback.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-background::after {
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        url('/assets/images/paw-pattern-light.svg');
    background-repeat: no-repeat, no-repeat, repeat;
    background-size: auto, auto, 160px 160px;
}

/* Texture leggera sulle sezioni chiare, per dare profondità senza distrarre */
.how-it-works,
.support-section {
    position: relative;
}

.how-it-works::before,
.support-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('/assets/images/paw-pattern-dark.svg');
    background-size: 160px 160px;
    background-repeat: repeat;
    pointer-events: none;
}

.how-it-works .container,
.support-section .container {
    position: relative;
    z-index: 1;
}

.support-card {
    position: relative;
}

/* Badge "urgente": micro-animazione per attirare l'attenzione */
@keyframes urgentPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(231, 76, 60, 0);
    }
}

.urgent-badge,
.urgent-badge-large {
    animation: urgentPulse 2.2s ease-out infinite;
}

/* Accenno colorato decorativo in alto sulle card principali */
.step-card::before,
.support-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 4px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
}

/* Card: ombra più profonda e morbida all'hover */
.featured-card:hover,
.step-card:hover,
.support-card:hover,
.testimonial-card:hover {
    box-shadow: var(--shadow-lift);
}

.testimonial-card {
    transition: var(--transition);
}

/* Bottoni su sfondo colorato: effetto "lucido" al passaggio del mouse */
.final-btn.primary,
.adopt-button,
.submit-button,
.whatsapp-button,
.search-submit {
    position: relative;
    overflow: hidden;
}

.final-btn.primary::before,
.adopt-button::before,
.submit-button::before,
.whatsapp-button::before,
.search-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.final-btn.primary:hover::before,
.adopt-button:hover::before,
.submit-button:hover::before,
.whatsapp-button:hover::before,
.search-submit:hover::before {
    left: 125%;
}

/* Bottoni su sfondo bianco: stesso effetto con una velatura calda al posto del bianco puro */
.cta-button,
.hero-btn.primary,
.newsletter-form button {
    position: relative;
    overflow: hidden;
}

.cta-button::before,
.hero-btn.primary::before,
.newsletter-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(115deg, transparent, rgba(37, 99, 235, 0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

.cta-button:hover::before,
.hero-btn.primary:hover::before,
.newsletter-form button:hover::before {
    left: 125%;
}

@media (prefers-reduced-motion: reduce) {
    .urgent-badge,
    .urgent-badge-large {
        animation: none;
    }

    .final-btn.primary::before,
    .adopt-button::before,
    .submit-button::before,
    .whatsapp-button::before,
    .search-submit::before,
    .cta-button::before,
    .hero-btn.primary::before,
    .newsletter-form button::before {
        display: none;
    }
}

/* ===================================
   COOKIE BANNER
   =================================== */
.cookie-banner-open,
.cookie-banner-open body {
    overflow: hidden;
}

.cookie-banner {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(22, 33, 58, 0.6);
}

.cookie-banner[hidden],
.cookie-banner [hidden] {
    display: none;
}

.cookie-banner-box {
    width: 100%;
    max-width: 860px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: var(--spacing-xl) var(--spacing-xxl);
    background: var(--bg-white);
    color: var(--text-dark);
    font-family: var(--font-main);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    box-shadow: var(--shadow-lift);
}

.cookie-banner h2 {
    margin: var(--spacing-md) 0 var(--spacing-lg);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.cookie-banner p {
    margin-bottom: var(--spacing-md);
}

.cookie-banner a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-reject {
    display: block;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.cookie-banner-buttons {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
}

.cookie-btn {
    min-width: 220px;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 0;
    background: var(--primary);
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

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

.cookie-banner button:focus-visible,
.cookie-banner a:focus-visible,
.cookie-switch:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 3px;
}

.cookie-category {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.cookie-category-text strong {
    display: block;
}

.cookie-category-text small {
    color: var(--text-medium);
    font-size: 0.875rem;
}

.cookie-always-on {
    flex-shrink: 0;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 700;
}

.cookie-switch {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
    cursor: pointer;
}

.footer-cookie-link {
    color: inherit;
    opacity: 0.8;
}

@media (max-width: 640px) {
    .cookie-banner-box {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .cookie-banner h2 {
        font-size: 1.4rem;
    }

    .cookie-btn {
        min-width: 0;
        flex: 1 1 100%;
    }
}

/* ===================================
   MENU - voce "Dona"
   =================================== */
.main-nav a.nav-donate {
    background: var(--primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 999px;
    border-bottom: none;
}

.main-nav a.nav-donate:hover,
.main-nav a.nav-donate.active {
    background: var(--primary-dark);
    color: white;
}

/* ===================================
   ARTICOLI - listing
   =================================== */
.articles-page {
    padding-bottom: var(--spacing-xxl);
}

.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xl);
}

.article-category {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-medium);
}

.article-category:hover,
.article-category.active {
    border-color: var(--primary);
    color: var(--primary);
}

.article-category.active {
    background: var(--primary);
    color: white;
}

.article-category-count {
    opacity: 0.7;
    font-weight: 400;
    margin-left: 0.25rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow);
    transition: var(--transition);
}

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

.article-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--bg-cream);
    overflow: hidden;
}

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

.article-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.article-badge {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: var(--bg-white);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
}

.article-badge-inline {
    position: static;
    display: inline-block;
    background: var(--bg-cream);
    margin-bottom: var(--spacing-sm);
}

.article-card-body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 1;
}

.article-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.article-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.3;
    color: var(--text-dark);
}

.article-card-excerpt {
    color: var(--text-medium);
    flex: 1;
}

.article-read-more {
    color: var(--primary);
    font-weight: 700;
}

@media (min-width: 969px) {
    .article-card-lead {
        grid-column: 1 / -1;
    }

    .article-card-lead .article-card-link {
        display: grid;
        grid-template-columns: 1.3fr 1fr;
    }

    .article-card-lead .article-card-image {
        aspect-ratio: auto;
        min-height: 320px;
    }

    .article-card-lead .article-card-body {
        padding: var(--spacing-xl);
        justify-content: center;
    }

    .article-card-lead .article-card-title {
        font-size: 1.75rem;
    }
}

/* ===================================
   ARTICOLI - dettaglio
   =================================== */
.article-detail {
    padding-bottom: var(--spacing-xxl);
}

.article-container {
    max-width: 780px;
}

.article-header h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    line-height: 1.2;
    color: var(--text-dark);
}

.article-meta {
    color: var(--text-light);
    margin: var(--spacing-xs) 0 var(--spacing-md);
}

.article-lead {
    font-size: 1.2rem;
    color: var(--text-medium);
}

.article-hero-image {
    margin: var(--spacing-lg) 0;
}

.article-hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.75;
}

.article-content p,
.article-content ul,
.article-content ol {
    margin-bottom: var(--spacing-md);
}

.article-content h2,
.article-content h3 {
    font-family: var(--font-heading);
    margin: var(--spacing-lg) 0 var(--spacing-sm);
}

.article-content img {
    border-radius: var(--radius-md);
}

.article-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
    color: var(--text-medium);
}

.article-share a {
    padding: 0.35rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 600;
    color: var(--text-dark);
}

.article-share a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===================================
   DONAZIONI
   =================================== */
.donation-page {
    padding-bottom: var(--spacing-xxl);
}

.donation-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.donation-form-wrapper,
.donation-info-box {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px var(--shadow);
}

.donation-info-box h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.donation-impact {
    list-style: none;
    display: grid;
    gap: var(--spacing-sm);
}

.donation-impact li {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
}

.donation-impact strong {
    color: var(--primary);
}

.donation-step {
    border: none;
    margin-bottom: var(--spacing-lg);
}

.donation-step legend {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.amount-options,
.provider-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: var(--spacing-sm);
}

.provider-options {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.amount-option,
.provider-option {
    position: relative;
    cursor: pointer;
}

.amount-option input,
.provider-option input {
    position: absolute;
    opacity: 0;
}

.amount-option span,
.provider-option {
    display: block;
}

.amount-option span {
    text-align: center;
    padding: var(--spacing-sm);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

.provider-option {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.provider-option small {
    display: block;
    color: var(--text-light);
}

.provider-name {
    font-weight: 700;
}

.amount-option input:checked + span,
.provider-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.06);
    color: var(--primary);
}

.amount-option input:focus-visible + span,
.provider-option:has(input:focus-visible) {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.custom-amount {
    margin-top: var(--spacing-sm);
}

.custom-amount label,
.donation-form .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.custom-amount-input {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    max-width: 200px;
}

.donation-form input[type="text"],
.donation-form input[type="email"],
.donation-form input[type="number"],
.donation-form textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.donation-form input:focus,
.donation-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.donation-form .form-group {
    margin-bottom: var(--spacing-md);
}

.donation-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.donation-privacy {
    margin-top: var(--spacing-sm);
}

.donation-form .submit-button.is-loading {
    opacity: 0.7;
    cursor: progress;
}

.donation-secure {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
}

.donation-alert {
    background: #FDECEC;
    color: #9B1C1C;
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
}

.donation-result {
    padding: var(--spacing-xxl) var(--spacing-md);
}

.donation-result-card {
    max-width: 620px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px var(--shadow);
    padding: var(--spacing-xxl) var(--spacing-xl);
    text-align: center;
}

.donation-result-card h1 {
    font-family: var(--font-heading);
    margin-bottom: var(--spacing-sm);
}

.donation-result-card p {
    color: var(--text-medium);
    margin-bottom: var(--spacing-md);
}

.donation-result-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.donation-result-note {
    font-size: 0.95rem;
}

.donation-result-home {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 968px) {
    .donation-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .article-header h1 {
        font-size: 1.8rem;
    }

    .donation-form-wrapper,
    .donation-info-box {
        padding: var(--spacing-md);
    }
}
