/**
 * Veterinari Styles - Professional Layout
 *
 * @package CaninCasa
 * @since 2.0.0
 */

/* ==========================================================================
   Breadcrumbs - Boxed Container
   ========================================================================== */

.breadcrumbs {
    background: #f8f9fa;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

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

/* ==========================================================================
   Single Page Layout - Sidebar Left
   ========================================================================== */

.veterinario-single__layout,
.allevamento-single__layout,
.canile-single__layout,
.centro-single__layout,
.pensione-single__layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.veterinario-single__content,
.allevamento-single__content,
.canile-single__content,
.centro-single__content,
.pensione-single__content {
    min-width: 0;
    /* Prevents grid blowout */
    order: 2;
    /* Content appears on the right */
}

.veterinario-single__sidebar,
.allevamento-single__sidebar,
.canile-single__sidebar,
.centro-single__sidebar,
.pensione-single__sidebar {
    position: sticky;
    top: 2rem;
    order: 1;
    /* Sidebar appears on the left */
}

/* ==========================================================================
   Category Label
   ========================================================================== */

.category-label {
    display: inline-block;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.veterinario-single__header {
    margin-bottom: 2rem;
}

.veterinario-single__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

/* ==========================================================================
   Info Table - Professional Card Style
   ========================================================================== */

.info-table {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-row:first-child {
    padding-top: 0;
}

.info-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.info-value {
    color: #212529;
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-value strong {
    color: #27ae60;
    font-weight: 700;
}

/* Orari List Styling */
.info-value ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-value li {
    padding: 0.25rem 0;
    line-height: 1.6;
}

/* Responsive Info Table */
@media (max-width: 768px) {
    .info-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .info-label {
        font-weight: 700;
        color: #2c3e50;
    }
}

/* ==========================================================================
   Sidebar Boxes - Professional Style
   ========================================================================== */

.sidebar-box {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.sidebar-box h3,
.sidebar-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.sidebar-box--secondary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.sidebar-box--secondary h4 {
    color: white;
    margin: 0;
}

/* CTA Card in Sidebar */
.cta-card {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.cta-card h4 {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 1.25rem 0;
    line-height: 1.4;
}

/* Buttons in Sidebar */
.sidebar-box .btn,
.cta-card .btn {
    width: 100%;
    text-align: center;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-box .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    color: white;
}

.sidebar-box .btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.cta-card .btn-secondary {
    background: white;
    color: #e74c3c;
    border: none;
    font-weight: 700;
}

.cta-card .btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Archive Grid - Items
   ========================================================================== */

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.item-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

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

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

.item-content {
    padding: 1.5rem;
}

.item-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

.item-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.item-title a:hover {
    color: #3498db;
}

.item-location,
.item-services,
.item-address,
.item-info,
.item-breeds {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
}

.item-location .icon,
.item-services .icon,
.item-address .icon,
.item-info .icon,
.item-breeds .icon {
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.item-badge {
    margin: 0.75rem 0;
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.item-contacts {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.contact-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #3498db;
    transform: translateY(-2px);
}

.protected-contact-message {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

.protected-contact-message a {
    color: #3498db;
    text-decoration: underline;
}

.btn-view-more {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.875rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.btn-view-more:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* ==========================================================================
   Filters Section
   ========================================================================== */

.filters-wrapper {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

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

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.btn-outline {
    background: white;
    color: #6c757d;
    border: 1px solid #ced4da;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #495057;
}

/* ==========================================================================
   Results Info
   ========================================================================== */

.results-info {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #e7f3ff;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.results-count {
    margin: 0;
    color: #2c3e50;
    font-size: 0.95rem;
}

.results-count strong {
    color: #3498db;
    font-weight: 700;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.loading-spinner {
    text-align: center;
    padding: 3rem;
}

.loading-spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   No Items / No Results
   ========================================================================== */

.no-items {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 2rem 0;
}

.no-items-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-items h3 {
    color: #495057;
    font-size: 1.5rem;
    margin: 1rem 0;
}

.no-items p {
    color: #6c757d;
    font-size: 1rem;
}

/* ==========================================================================
   Pagination - Enhanced
   ========================================================================== */

.pagination-wrapper {
    margin: 3rem 0 2rem;
    text-align: center;
}

.pagination-wrapper .page-numbers {
    display: inline-flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrapper a,
.pagination-wrapper span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 1rem;
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-wrapper a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.pagination-wrapper .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.pagination-wrapper .dots {
    border: none;
    background: transparent;
    pointer-events: none;
}

/* ==========================================================================
   Page Hero
   ========================================================================== */

.page-hero {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.page-intro {
    font-size: 1.125rem;
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==========================================================================
   Apply Professional Styles to All Structure Single Pages
   ========================================================================== */

/* Apply same professional styles to all structure types */
.allevamento-single__title,
.canile-single__title,
.centro-single__title,
.pensione-single__title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

.allevamento-single__header,
.canile-single__header,
.centro-single__header,
.pensione-single__header {
    margin-bottom: 2rem;
}

/* Apply sidebar styles to all structure types */
.allevamento-single__sidebar .sidebar-box,
.canile-single__sidebar .sidebar-box,
.centro-single__sidebar .sidebar-box,
.pensione-single__sidebar .sidebar-box {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

/* ==========================================================================
   Razze Cards Grid (for allevamenti single pages)
   ========================================================================== */

.razze-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.razza-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.razza-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.razza-card__image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.razza-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.razza-card:hover .razza-card__image img {
    transform: scale(1.05);
}

.razza-card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.razza-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.razza-card__title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.razza-card__title a:hover {
    color: #3498db;
}

.razza-card__excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}

.razza-card__link {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    margin-top: auto;
}

.razza-card__link:hover {
    color: #2980b9;
    transform: translateX(5px);
}

/* ==========================================================================
   Global Button Styles
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #5d6d7e);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.4);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 991px) {
    .veterinario-single__layout,
    .allevamento-single__layout,
    .canile-single__layout,
    .centro-single__layout,
    .pensione-single__layout {
        grid-template-columns: 1fr;
    }

    .veterinario-single__content,
    .allevamento-single__content,
    .canile-single__content,
    .centro-single__content,
    .pensione-single__content {
        order: 1;
    }

    .veterinario-single__sidebar,
    .allevamento-single__sidebar,
    .canile-single__sidebar,
    .centro-single__sidebar,
    .pensione-single__sidebar {
        position: static;
        order: 2;
        margin-top: 2rem;
    }

    .veterinario-single__title,
    .allevamento-single__title,
    .canile-single__title,
    .centro-single__title,
    .pensione-single__title {
        font-size: 1.875rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .filters-row {
        grid-template-columns: 1fr;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }

    .info-table {
        padding: 1.5rem;
    }

    .sidebar-box,
    .cta-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .veterinario-single__title,
    .allevamento-single__title,
    .canile-single__title,
    .centro-single__title,
    .pensione-single__title {
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .breadcrumbs .breadcrumb-list {
        padding: 0 1rem;
    }

    .filters-wrapper {
        padding: 1.5rem;
    }
}
