/* Importar fuente profesional de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --bg-light: #f8fafc;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER PROFESIONAL CON ANIMACIÓN */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
    font-weight: 800;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-left h1 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-left h1 a:hover {
    color: var(--primary-color);
    transform: scale(1.02);
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.header-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-menu {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.user-name {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    animation: fadeIn 0.5s ease-out;
}

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

.btn-link {
    color: var(--text-medium);
    text-decoration: none;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-light);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

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

.btn-secondary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    padding: 0.625rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-secondary:hover::before {
    opacity: 1;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary span {
    position: relative;
    z-index: 1;
}

/* CONTAINER CON ESPACIADO CORRECTO */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 3rem 2rem;
    flex: 1;
}

/* HERO SECTION CON ANIMACIÓN - MÁS COMPACTO */
.hero {
    text-align: center;
    margin: 1.5rem 0 1.5rem 0;
    padding: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

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

.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1rem;
    color: var(--text-medium);
    font-weight: 400;
}

/* FILTROS CON DISEÑO MODERNO - MÁS COMPACTO */
.filtros-container {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.filtros-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.filtro-group {
    display: flex;
    flex-direction: column;
}

.filtro-group label {
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filtro-group select,
.filtro-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: white;
}

.filtro-group select:focus,
.filtro-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-filtrar {
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.btn-filtrar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-limpiar {
    padding: 0.75rem 1.5rem;
    background: var(--text-light);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-limpiar:hover {
    background: var(--text-medium);
    transform: translateY(-2px);
}

.stats-mini {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    flex-wrap: wrap;
}

.stat-mini {
    font-size: 0.85rem;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.5s ease-out;
}

.stat-mini strong {
    color: var(--primary-color);
    font-size: 1.35rem;
    font-weight: 700;
}

.resultados-info {
    margin-bottom: 1.5rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, #e0e7ff, #ddd6fe);
    border-radius: 12px;
    color: var(--primary-dark);
    font-weight: 500;
    border-left: 4px solid var(--primary-color);
    animation: slideInLeft 0.5s ease-out;
    font-size: 0.9rem;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* GRID DE GATOS CON ANIMACIONES - MÁS COMPACTO */
.gatos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 0.6s ease-out;
}

.gato-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.5s ease-out both;
    position: relative;
}

.gato-card:nth-child(1) { animation-delay: 0.1s; }
.gato-card:nth-child(2) { animation-delay: 0.2s; }
.gato-card:nth-child(3) { animation-delay: 0.3s; }
.gato-card:nth-child(4) { animation-delay: 0.4s; }
.gato-card:nth-child(5) { animation-delay: 0.5s; }
.gato-card:nth-child(6) { animation-delay: 0.6s; }

.gato-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.gato-imagen {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

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

.no-foto {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-light), #e0e7ff);
    font-size: 3.5rem;
}

.gato-info {
    padding: 1.25rem;
}

.gato-badges {
    margin-bottom: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-disponible {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.estado-proceso {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.estado-adoptado {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: #9f1239;
}

.gato-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.gato-detalles {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.gato-detalles span {
    display: inline-flex;
    align-items: center;
    color: var(--text-medium);
    font-size: 0.9rem;
    font-weight: 500;
}

.gato-caracteristicas {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.caracteristica {
    background: var(--bg-light);
    color: var(--text-medium);
    padding: 0.4rem 0.875rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.gato-descripcion {
    color: var(--text-medium);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    font-size: 0.95rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* FOOTER - MÁS COMPACTO */
footer {
    background: linear-gradient(135deg, var(--bg-light), #e0e7ff);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-content p {
    color: var(--text-medium);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-content strong {
    color: var(--text-dark);
    font-weight: 700;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .filtros-form {
        grid-template-columns: 1fr 1fr;
    }
    
    .gatos-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .header-left {
        text-align: center;
        width: 100%;
    }
    
    .header-left h1 {
        font-size: 1.5rem;
        justify-content: center;
    }
    
    .header-right {
        width: 100%;
    }
    
    .user-menu {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .auth-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .btn-link, .btn-secondary {
        text-align: center;
        width: 100%;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .filtros-container {
        padding: 1.25rem;
    }
    
    .filtros-form {
        grid-template-columns: 1fr;
    }
    
    .stats-mini {
        flex-direction: column;
        gap: 1rem;
    }
    
    .gatos-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .container {
        padding: 0 1rem 2.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .gato-imagen {
        height: 220px;
    }
}

/* ============================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
}

/* ============================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: white;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
    
    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }
}

/* ============================================
   REDES SOCIALES EN FOOTER
   ============================================ */
.social-footer {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.social-footer a {
    color: white;
    font-size: 2rem;
    transition: all 0.3s;
    text-decoration: none;
}

.social-footer a:hover {
    transform: translateY(-5px) scale(1.1);
}

.social-footer .instagram:hover {
    color: #e4405f;
}