/* ============================================
   VetCare Plus - Veterinary Website Styles
   Modern, Professional & Responsive Design
   ============================================ */

/* CSS Variables / Design Tokens */
:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --secondary-light: #34d399;

    /* Accent Colors */
    --accent-medicina: #6366f1;
    --accent-estetica: #ec4899;
    --accent-productos: #f59e0b;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--gray-800);
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    white-space: nowrap;
}

.btn--primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.5);
}

.btn--outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn--outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn--full {
    width: 100%;
}

/* ============================================
   Header / Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(220, 252, 231, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(22, 163, 74, 0.1);
    transition: all var(--transition-normal);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-800);
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: all var(--transition-normal);
}

.logo-img:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.3));
}

.logo-img--footer {
    height: 80px;
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-plus {
    color: var(--primary);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav__link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius);
    transition: all var(--transition-fast);
}

.nav__link:hover,
.nav__link.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__cta {
    display: none;
}

.nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}

.nav__toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.nav__close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--gray-600);
    display: none;
}

/* Mobile Navigation */
@media (max-width: 968px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--white);
        padding: 5rem 2rem;
        box-shadow: var(--shadow-2xl);
        transition: right var(--transition-normal);
        z-index: 100;
    }

    .nav__menu.show {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav__link {
        display: block;
        width: 100%;
        padding: 1rem;
        font-size: 1.125rem;
    }

    .nav__close {
        display: block;
    }
}

@media (min-width: 969px) {
    .nav__toggle {
        display: none;
    }

    .nav__cta {
        display: inline-flex;
    }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdfa 100%);
    z-index: -2;
}

.hero__bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero__bg::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 520px;
    margin-bottom: 2rem;
}

.hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero__stats {
    display: flex;
    gap: 2.5rem;
}

.stat {
    text-align: center;
}

.stat__number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-800);
}

.stat__label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Hero Image */
.hero__image {
    position: relative;
    display: none;
}

.hero__image-wrapper {
    position: relative;
}

.hero__img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    object-fit: cover;
}

.hero__floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: float 3s ease-in-out infinite;
}

.hero__floating-card--1 {
    top: 20%;
    left: -10%;
    animation-delay: 0s;
}

.hero__floating-card--2 {
    bottom: 25%;
    right: -5%;
    animation-delay: 1.5s;
}

.floating-icon {
    font-size: 1.5rem;
}

.hero__floating-card strong {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.hero__floating-card small {
    font-size: 0.75rem;
    color: var(--gray-500);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero__wave svg {
    width: 100%;
    height: 60px;
}

@media (min-width: 768px) {
    .hero__container {
        grid-template-columns: 1fr 1fr;
    }

    .hero__image {
        display: block;
    }

    .hero__wave svg {
        height: 120px;
    }
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.section-header--light {
    color: var(--white);
}

.section-header--light .section-title {
    color: var(--white);
}

.section-tag {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.section-header--light .section-tag {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-description {
    color: var(--gray-500);
    font-size: 1.0625rem;
}

.section-header--light .section-description {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Services Section
   ============================================ */
.services {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    position: relative;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.service-card--medicina::before {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
}

.service-card--estetica::before {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}

.service-card--productos::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.service-card__icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
}

.service-card--medicina .service-card__icon {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
}

.service-card--estetica .service-card__icon {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
}

.service-card--productos .service-card__icon {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
}

.service-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-card__description {
    color: var(--gray-500);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.service-card__list {
    margin-bottom: 1.5rem;
}

.service-card__list li {
    padding: 0.375rem 0;
    font-size: 0.9375rem;
    color: var(--gray-600);
}

.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.service-card__link:hover {
    gap: 0.75rem;
}

/* ============================================
   Why Us Section
   ============================================ */
.why-us {
    padding: var(--section-padding) 0;
    background: var(--gradient-dark);
}

.why-us__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.why-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all var(--transition-normal);
}

.why-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.why-card__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.why-card__title {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.why-card__text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

/* ============================================
   Gallery Section
   ============================================ */
.gallery {
    padding: var(--section-padding) 0;
    background: var(--gray-50);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gallery__item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.gallery__item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery__item:hover img {
    transform: scale(1.05);
}

.gallery__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.gallery__item:hover .gallery__overlay {
    opacity: 1;
}

.gallery__overlay span {
    color: var(--white);
    font-weight: 600;
}

@media (min-width: 768px) {
    .gallery__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .gallery__item--large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery__item--large img {
        height: 100%;
    }

    .gallery__item--tall {
        grid-row: span 2;
    }

    .gallery__item--tall img {
        height: 100%;
    }

    .gallery__item img {
        height: 220px;
    }
}

/* ============================================
   Team Section
   ============================================ */
.team {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.team-card__image {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
}

.team-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-lg);
}

.team-card__social {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: all var(--transition-normal);
}

.team-card:hover .team-card__social {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.team-card__social a {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

.team-card__social a:hover {
    background: var(--primary-dark);
}

.team-card__name {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.team-card__role {
    display: block;
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}

.team-card__bio {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* Single team member layout */
.team__grid--single {
    display: flex;
    justify-content: center;
}

.team-card--featured {
    max-width: 400px;
    padding: 2.5rem;
}

.team-card--featured .team-card__image {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.team-card--featured .team-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    border: 5px solid var(--white);
    box-shadow: var(--shadow-xl);
}

.team-card--featured .team-card__name {
    font-size: 1.5rem;
}

.team-card--featured .team-card__role {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.team-card--featured .team-card__bio {
    font-size: 1rem;
    line-height: 1.7;
}

.team-card--featured .team-card__social a {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
}

/* ============================================
   Testimonials Section
   ============================================ */
.testimonials {
    padding: var(--section-padding) 0;
    background: var(--gradient-primary);
}

.testimonials__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.testimonial-card__stars {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.testimonial-card__text {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-card__author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-card__author strong {
    display: block;
    color: var(--gray-800);
    font-size: 1rem;
}

.testimonial-card__author span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
    padding: var(--section-padding) 0;
    background: var(--gray-50);
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .contact__grid {
        grid-template-columns: 1fr 1.5fr;
    }
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.contact-card__icon {
    font-size: 1.5rem;
}

.contact-card__content h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--gray-800);
}

.contact-card__content p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.contact__social {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-lg);
    font-size: 1.25rem;
    box-shadow: var(--shadow);
    transition: all var(--transition-fast);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Contact Map */
.contact__map {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.map__title {
    font-size: 1rem;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.map__container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.map__container:hover {
    box-shadow: var(--shadow-lg);
    transform: scale(1.01);
}

.map__container iframe {
    display: block;
}

.map__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: var(--radius);
    transition: all var(--transition-normal);
}

.map__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Contact Form */
.contact__form-wrapper {
    position: relative;
}

.contact-form {
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 480px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Form Success */
.form-success {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-xl);
    text-align: center;
    padding: 2rem;
}

.form-success.show {
    display: flex;
}

.form-success__icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary);
    color: var(--white);
    font-size: 2.5rem;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.form-success h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.form-success p {
    color: var(--gray-600);
}

/* Form Actions Buttons Row */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 4rem 0 2rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.footer__tagline {
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.footer__description {
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer__links h4,
.footer__contact h4 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
}

.footer__links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__links a {
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: var(--white);
}

.footer__contact p {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.footer__social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer__social a {
    font-size: 1.25rem;
    transition: transform var(--transition-fast);
}

.footer__social a:hover {
    transform: scale(1.2);
}

.footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ============================================
   Utilities
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Hero Carousel
   ============================================ */
.hero__carousel {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.carousel__container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.05);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel__slide.active {
    opacity: 1;
    transform: scale(1);
}

.carousel__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.carousel__container:hover .carousel__slide.active img {
    transform: scale(1.03);
}

.carousel__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.carousel__btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.carousel__btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.carousel__dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gray-300);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.carousel__dot:hover {
    background: var(--gray-400);
}

.carousel__dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

/* Floating cards positioning for carousel */
.hero__image .hero__floating-card--1 {
    top: 15%;
    left: -15%;
}

.hero__image .hero__floating-card--2 {
    bottom: 20%;
    right: -10%;
}

@media (max-width: 767px) {
    .carousel__container {
        height: 350px;
    }

    .hero__image .hero__floating-card {
        display: none;
    }
}

@media (min-width: 768px) {
    .carousel__container {
        height: 520px;
    }
}

/* ============================================
   Pet Registry Section
   ============================================ */
.pet-registry {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 100%);
}

.registry__container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    min-height: 500px;
}

.registry__panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.registry__panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.registry__card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 520px;
}

.registry__card--wide {
    max-width: 860px;
    text-align: left;
}

.registry__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 50%;
}

.registry__form {
    margin: 2rem 0;
}

.registry__divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray-400);
}

.registry__divider::before,
.registry__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.registry__divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
}

/* Digital ID Card */
.digital-id {
    background: var(--white);
    border-radius: 20px;
    overflow: visible;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* Variante de ancho completo para el panel de carnet */
.digital-id--full {
    max-width: 100%;
    overflow: visible;
}

.digital-id::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: var(--gradient-primary);
    z-index: 0;
}

.digital-id__header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    color: var(--white);
}

.digital-id__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.digital-id__logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

.digital-id__status {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.digital-id__content {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    margin-top: 1rem;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.digital-id__info {
    text-align: center;
    width: 100%;
}

.digital-id__info h2 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--gray-800);
}

.species-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 20px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--gray-200);
}

.info-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9375rem;
}

.medical-notes {
    text-align: left;
    background: #fef2f2;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #fee2e2;
}

.medical-notes label {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.medical-notes p {
    font-size: 0.875rem;
    color: #b91c1c;
    margin: 0;
}

.digital-id__qr {
    text-align: center;
    padding: 1rem;
    background: var(--white);
    border-radius: 12px;
    border: 2px solid var(--gray-100);
}

.digital-id__qr #qrcode img {
    margin: 0 auto;
}

.digital-id__qr span {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.digital-id__footer {
    padding: 1rem;
    background: var(--gray-50);
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

@media print {
    body * {
        visibility: hidden;
    }

    .digital-id,
    .digital-id * {
        visibility: visible;
    }

    .digital-id {
        position: absolute;
        left: 0;
        top: 0;
        box-shadow: none;
        border: 1px solid black;
    }

    .digital-id__footer {
        display: none;
    }
}


/* ============================================
   DID Sections — Acordeón Médico
   ============================================ */
.did-sections {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 0 1.5rem 1rem;
}

.did-section {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.did-section__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .75rem 1rem;
    background: var(--gray-50);
    border: none;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    color: var(--gray-700);
    transition: background var(--transition-fast);
    text-align: left;
    gap: .5rem;
}

.did-section__toggle:hover { background: var(--gray-100); }

.did-section__toggle .toggle-arrow {
    font-size: .7rem;
    transition: transform .25s ease;
    color: var(--gray-400);
    margin-left: auto;
}

.did-section__toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

.did-section__body {
    display: none;
    overflow-x: auto;
}

.did-section__body.show { display: block; }

/* Tabla dentro del carnet */
.did-section__table {
    width: 100%;
    border-collapse: collapse;
    font-size: .8125rem;
}

.did-section__table thead th {
    background: var(--gray-50);
    padding: .5rem .75rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-500);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.did-section__table tbody td {
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

.did-section__table tbody tr:last-child td { border-bottom: none; }
.did-section__table tbody tr:hover td { background: var(--gray-50); }

.did-empty {
    text-align: center;
    padding: 1rem;
    color: var(--gray-400);
    font-style: italic;
    font-size: .8125rem;
}

/* Propietario info en el carnet */
.did-owner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .4rem .75rem;
    padding: .75rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    font-size: .875rem;
}

.did-owner-grid dt {
    font-size: .68rem;
    text-transform: uppercase;
    color: var(--gray-400);
    letter-spacing: .04em;
    font-weight: 600;
}

.did-owner-grid dd {
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 .4rem;
}


/* ============================================
   CHATBOT WIDGET — Happy Dogs
   ============================================ */

/* Floating Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45);
    z-index: 1100;
    border: none;
    transition: all 0.3s ease;
    animation: pulse-chat 2.5s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.6);
}

.chatbot-toggle__icon {
    font-size: 1.6rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.chatbot-toggle__icon--close {
    position: absolute;
    font-size: 1.3rem;
    opacity: 0;
    transform: rotate(-90deg);
}

.chatbot-toggle.open .chatbot-toggle__icon--chat {
    opacity: 0;
    transform: rotate(90deg);
}

.chatbot-toggle.open .chatbot-toggle__icon--close {
    opacity: 1;
    transform: rotate(0deg);
}

.chatbot-toggle__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: bounce-badge 1s ease infinite alternate;
}

.chatbot-toggle__badge.hidden {
    display: none;
}

@keyframes pulse-chat {
    0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@keyframes bounce-badge {
    from { transform: scale(1); }
    to   { transform: scale(1.2); }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 2rem;
    width: 370px;
    max-width: calc(100vw - 2rem);
    height: 520px;
    max-height: calc(100vh - 200px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(37, 99, 235, 0.12);
    z-index: 1099;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
}

.chatbot-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Chat Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-shrink: 0;
}

.chatbot-header__avatar {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.chatbot-header__avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
}

.chatbot-header__online {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-online 2s infinite;
}

@keyframes pulse-online {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.chatbot-header__info {
    flex: 1;
}

.chatbot-header__name {
    color: white;
    font-weight: 700;
    font-size: 0.9375rem;
    line-height: 1.2;
}

.chatbot-header__status {
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    margin-top: 1px;
}

.chatbot-header__actions {
    display: flex;
    gap: 0.25rem;
}

.chatbot-header__btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
}

.chatbot-header__btn:hover {
    background: rgba(255,255,255,0.28);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--gray-50);
    scroll-behavior: smooth;
}

.chatbot-messages::-webkit-scrollbar {
    width: 4px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

/* Individual Messages */
.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    animation: msg-in 0.3s ease;
}

@keyframes msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-message--bot {
    flex-direction: row;
}

.chat-message--user {
    flex-direction: row-reverse;
}

.chat-message__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
}

.chat-message__bubble {
    max-width: 78%;
    padding: 0.625rem 0.875rem;
    border-radius: 18px;
    font-size: 0.875rem;
    line-height: 1.55;
    position: relative;
}

.chat-message--bot .chat-message__bubble {
    background: white;
    color: var(--gray-700);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.chat-message--user .chat-message__bubble {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message__time {
    font-size: 0.65rem;
    margin-top: 0.25rem;
    opacity: 0.55;
    display: block;
    text-align: right;
}

.chat-message--bot .chat-message__time {
    text-align: left;
}

/* Typing Indicator */
.chat-typing {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    animation: msg-in 0.3s ease;
}

.chat-typing__bubble {
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    gap: 5px;
    align-items: center;
}

.chat-typing__dot {
    width: 7px;
    height: 7px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite ease-in-out;
}

.chat-typing__dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%            { transform: translateY(-6px); }
}

/* Quick Replies */
.chatbot-quick-replies {
    padding: 0.625rem 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: white;
    border-top: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.quick-reply-btn {
    padding: 0.35rem 0.75rem;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-reply-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* Input Area */
.chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-top: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    border: 1.5px solid var(--gray-200);
    border-radius: 24px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    font-family: var(--font-family);
    color: var(--gray-700);
    background: var(--gray-50);
    outline: none;
    transition: border-color 0.2s;
    resize: none;
}

.chatbot-input:focus {
    border-color: var(--primary);
    background: white;
}

.chatbot-input::placeholder {
    color: var(--gray-400);
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.chatbot-send-btn:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
}

.chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

/* Date Divider */
.chat-date-divider {
    text-align: center;
    font-size: 0.7rem;
    color: var(--gray-400);
    font-weight: 500;
    margin: 0.25rem 0;
    position: relative;
}

.chat-date-divider::before,
.chat-date-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--gray-200);
}

.chat-date-divider::before { left: 0; }
.chat-date-divider::after  { right: 0; }

/* Welcome Banner inside chat */
.chat-welcome-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.chat-welcome-banner strong {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        right: 0.75rem;
        width: calc(100vw - 1.5rem);
        bottom: 88px;
    }
    .chatbot-toggle {
        right: 1rem;
        bottom: 1.25rem;
        width: 60px;
        height: 60px;
    }
}

/* ============================================
   Formulario Multi-paso — Filas Dinámicas
   ============================================ */

/* Paneles de registro (login / form / card) */
.registry__panel {
    display: none;
}
.registry__panel.active {
    display: block;
    animation: fadeInUp .35s ease;
}

/* Pasos del formulario — ocultar todos excepto el activo */
.reg-pane {
    display: none;
}
.reg-pane.active {
    display: block;
    animation: fadeInUp .25s ease;
}

/* Paso completado */
.reg-step.done .reg-step__num {
    background: var(--secondary);
    color: #fff;
}
.reg-step.done .reg-step__num::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
}
.reg-step.done .reg-step__num {
    position: relative;
    font-size: 0;
}

/* Fila dinámica de vacunas / desparasitación / revisiones */
.dynamic-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: .625rem .75rem;
    margin-bottom: .5rem;
    animation: fadeInUp .2s ease;
}

.dynamic-row input,
.dynamic-row select {
    flex: 1 1 120px;
    min-width: 90px;
    padding: .45rem .6rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .8125rem;
    background: #fff;
    color: var(--gray-700);
    transition: border-color var(--transition-fast);
}

.dynamic-row input:focus,
.dynamic-row select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.btn-remove-row {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    font-size: .75rem;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-remove-row:hover {
    background: #ef4444;
    color: #fff;
}

/* Botón agregar fila */
.btn-add-row {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    background: rgba(37,99,235,.08);
    color: var(--primary);
    border: 1.5px dashed var(--primary);
    border-radius: var(--radius-lg);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: .25rem;
}

.btn-add-row:hover {
    background: var(--primary);
    color: #fff;
    border-style: solid;
}

/* Badges de estado en el carnet */
.status-badge {
    display: inline-block;
    padding: .2rem .55rem;
    border-radius: var(--radius-full);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.status-badge--vigente  { background: #d1fae5; color: #065f46; }
.status-badge--proxima  { background: #fef3c7; color: #92400e; }
.status-badge--vencida  { background: #fee2e2; color: #991b1b; }

/* Botón sm que faltaba */
.btn--sm {
    padding: .45rem 1rem;
    font-size: .8125rem;
}

/* ============================================
   Botón Acceso Médico
   ============================================ */
.btn-medico-access {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    margin-top: .75rem;
    padding: .5rem 1rem;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--transition-fast);
    letter-spacing: .02em;
}
.btn-medico-access:hover { color: var(--primary); }

/* ============================================
   Modal Contraseña Médico
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeInUp .2s ease;
}
.modal-box {
    background: #fff;
    border-radius: var(--radius-2xl);
    padding: 2.5rem 2rem;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: var(--shadow-2xl);
}
.modal-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.modal-box h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.modal-box p  { color: var(--gray-500); font-size: .9rem; margin-bottom: 1.25rem; }
.modal-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    text-align: center;
    letter-spacing: .1em;
    transition: border-color var(--transition-fast);
    margin-bottom: .5rem;
}
.modal-input:focus { outline: none; border-color: var(--primary); }
.modal-error { color: #ef4444; font-size: .825rem; min-height: 1.2rem; margin-bottom: .75rem; }
.modal-actions { display: flex; gap: .75rem; justify-content: center; }

/* ============================================
   Panel Admin — Tabla de Expedientes
   ============================================ */
.admin-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}
.admin-header__icon { font-size: 2rem; }
.admin-header h3 { font-size: 1.2rem; margin-bottom: .15rem; }
.admin-header p  { color: var(--gray-500); font-size: .875rem; }
.admin-header .btn { margin-left: auto; }

.admin-search-bar {
    margin-bottom: .75rem;
}
.admin-search-bar input {
    width: 100%;
    padding: .65rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: .9rem;
    transition: border-color var(--transition-fast);
}
.admin-search-bar input:focus { outline: none; border-color: var(--primary); }

.admin-stats {
    font-size: .8125rem;
    color: var(--gray-500);
    margin-bottom: .75rem;
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.admin-table thead th {
    background: var(--gray-50);
    padding: .65rem .85rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}
.admin-table tbody td {
    padding: .6rem .85rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}
.admin-row:hover td { background: var(--gray-50); }
.admin-table tbody tr:last-child td { border-bottom: none; }

/* ============================================
   Foto de la Mascota — Upload & Preview
   ============================================ */
.pet-photo-upload {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pet-photo-upload:hover { border-color: var(--primary); background: rgba(37,99,235,.03); }
.pet-photo-upload input[type="file"] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; z-index: 2;
}
.pet-photo-upload__content {
    display: flex; flex-direction: column; align-items: center;
    gap: .35rem; color: var(--gray-500); font-size: .875rem; padding: 1.25rem;
    pointer-events: none;
}
.pet-photo-upload__icon { font-size: 2rem; }
.pet-photo-upload__content small { font-size: .75rem; color: var(--gray-400); }
.pet-photo-preview {
    width: 100%; max-height: 180px; object-fit: cover;
    border-radius: var(--radius-lg); display: block;
}

/* ── Foto en el carnet digital ── */
.did-avatar-wrap {
    position: relative; flex-shrink: 0;
}
.did-photo {
    width: 90px; height: 90px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    border: 3px solid var(--white);
    box-shadow: var(--shadow-lg);
    display: block;
}

/* ── Botón Editar ── */
.btn--edit {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(245,158,11,.35);
}
.btn--edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,.5);
}
.btn--sm { padding: .45rem 1rem; font-size: .8125rem; border-radius: var(--radius); }

