/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    background-color: #f3f4f6;
    color: #111827;
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #db2777;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-logo a:hover {
    color: #be185d;
}

/* Main Container */
.adoption-container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 1rem 2rem;
}

/* Filters Sidebar */
.filters-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 5rem;
}

.filter-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #111827;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #374151;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-label input[type="radio"]:checked {
    border-color: #db2777;
    background-color: #db2777;
    box-shadow: inset 0 0 0 4px white;
}

.radio-label span {
    color: #374151;
}

/* Select Inputs */
.location-filters {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-select,
.sort-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: #db2777;
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.1);
}

/* Apply Filters Button */
.apply-filters {
    width: 100%;
    padding: 0.75rem;
    background: #db2777;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.apply-filters:hover {
    background: #be185d;
}

/* Pets Grid Container */
.pets-grid-container {
    flex: 1;
}

.pets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.pets-header h1 {
    font-size: 2rem;
    color: #111827;
}

/* Pets Grid */
.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Pet Card */
.pet-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.pet-card:hover {
    transform: translateY(-5px);
}

.pet-image {
    position: relative;
    height: 200px;
}

.pet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adoption-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #059669;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.pet-info {
    padding: 1.5rem;
}

.pet-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111827;
}

.pet-breed {
    color: #374151;
    margin-bottom: 0.5rem;
}

.pet-details {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.pet-location {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.view-details-button {
    width: 100%;
    padding: 0.75rem;
    background: #db2777;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-details-button:hover {
    background: #be185d;
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    overflow-y: auto;
    padding: 2rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: block;
    opacity: 1;
}

.modal-content {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 1rem;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #6b7280;
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1;
}

.modal-close:hover {
    color: #111827;
}

.modal-body {
    padding: 2rem;
}

/* Pet Profile Styles */
.pet-profile-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.pet-profile-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.pet-profile-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pet-profile-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.pet-profile-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pet-profile-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #111827;
}

.vaccination-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.vaccination-item {
    background: #f3f4f6;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.personality-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.trait-tag {
    background: #fdf2f8;
    color: #be185d;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.pet-biography {
    color: #4b5563;
    line-height: 1.6;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #4b5563;
}

.contact-detail svg {
    color: #db2777;
    flex-shrink: 0;
}

/* Contact Form */
.contact-form {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #db2777;
    box-shadow: 0 0 0 3px rgba(219, 39, 119, 0.1);
}

.submit-button {
    width: 100%;
    padding: 0.75rem;
    background: #db2777;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-button:hover {
    background: #be185d;
}

.submit-button:disabled {
    background: #f472b6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .adoption-container {
        flex-direction: column;
    }

    .filters-sidebar {
        width: 100%;
    }

    .filter-section {
        position: static;
    }

    .location-filters {
        flex-direction: row;
        gap: 1rem;
    }

    .pet-profile-header {
        grid-template-columns: 1fr;
    }

    .pet-profile-image {
        height: 250px;
    }
}

@media (max-width: 640px) {
    .pets-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .location-filters {
        flex-direction: column;
    }

    .modal-content {
        margin: 0;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .pet-card,
    .modal-content,
    .view-details-button {
        transition: none;
    }
}

:focus-visible {
    outline: 2px solid #db2777;
    outline-offset: 2px;
}