/* 
  Estilos Modernos - Mobile First 
  Paleta: Verdes vibrantes (naturaleza/mascotas), oscuros elegantes, glassmorphism.
*/
:root {
    /* Colors */
    --primary: #2ECC71;
    --primary-light: #48E08B;
    --primary-dark: #27AE60;
    --secondary: #2C3E50;

    --bg-color: #f4f7f6;
    --text-main: #2C3E50;
    --text-muted: #7F8C8D;

    --card-bg: rgba(255, 255, 255, 0.7);
    --card-border: rgba(255, 255, 255, 0.4);

    --whatsapp: #25D366;
    --whatsapp-dark: #128C7E;
    --call: #3498DB;
    --call-dark: #2980B9;
    --danger: #E74C3C;

    /* Layout */
    --border-radius: 20px;
    --padding-std: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 0%, rgba(46, 204, 113, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 100%, rgba(52, 152, 219, 0.05) 0%, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

/* Utils */
.hidden {
    display: none !important;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--primary);
}

.app-container {
    width: 100%;
    max-width: 480px;
    /* Constrain to mobile portrait widths */
    min-height: 100vh;
    padding: var(--padding-std);
    position: relative;
    overflow-x: hidden;
}

/* Glass Panels */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: var(--padding-std);
    margin-bottom: var(--padding-std);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.accent-border {
    position: relative;
    overflow: hidden;
}

.accent-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

/* Typography & Titles */
h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #3498DB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* States */
.state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(46, 204, 113, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

.error-circle {
    width: 80px;
    height: 80px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.error-icon {
    font-size: 2.5rem;
    color: var(--danger);
}

#error-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

#error-message {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    padding: 0 20px;
}

/* ============================
   LANDING PAGE STYLES
   ============================ */

.landing-container {
    padding: 10px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.5rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.font-bold {
    font-weight: 800;
}

.text-primary {
    color: var(--primary);
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 1rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(46, 204, 113, 0.15);
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--secondary);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.text-glow {
    text-shadow: 0 0 20px rgba(46, 204, 113, 0.4);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding: 0 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.4);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-large {
    padding: 18px 24px;
    font-size: 1.1rem;
}

.cta-bump {
    animation: ctaBump 2s infinite ease-in-out;
}

@keyframes ctaBump {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
        box-shadow: 0 15px 30px rgba(46, 204, 113, 0.5);
    }
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-align: left;
    padding: 20px;
}

.feature-card .icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(52, 152, 219, 0.2));
    color: var(--primary-dark);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.landing-footer {
    text-align: center;
    padding: 2rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================
   PROFILE HEADER & CONTENT
   ============================ */

.profile-header {
    text-align: center;
    margin-bottom: 24px;
    padding-top: 10px;
}

.photo-container {
    width: 260px;
    height: 260px;
    margin: 0 auto 16px;
    border-radius: 50%;
    padding: 6px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.3);
}

.photo-container.lost {
    background: linear-gradient(135deg, #ff6b6b, #e74c3c);
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.3);
}

.photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
}

#pet-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.pet-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-species {
    background-color: rgba(46, 204, 113, 0.15);
    color: var(--primary-dark);
}

.badge-breed {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--call-dark);
}

.badge-gender {
    background-color: rgba(155, 89, 182, 0.1);
    color: #8E44AD;
}

.badge-neutered {
    background-color: rgba(241, 196, 15, 0.2);
    color: #D35400;
}



/* Lost Alert */
.lost-alert {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-radius: var(--border-radius);
    padding: 18px 20px;
    margin-bottom: var(--padding-std);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(231, 76, 60, 0.45);
    animation: alertPulse 2s infinite;
}

.lost-alert-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.lost-alert-text {
    flex: 1;
    text-align: center;
}

.lost-alert strong {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
    opacity: 0.9;
}

.lost-alert p {
    font-size: 1rem;
    font-weight: 600;
}

#lost-alert-message {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 6px;
}

/* Medical Alert */
.medical-alert {
    background: linear-gradient(135deg, #FF416C, #FF4B2B);
    color: white;
    border-radius: var(--border-radius);
    padding: 18px 20px;
    margin-bottom: var(--padding-std);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(255, 65, 108, 0.4);
    animation: alertPulse 2s infinite;
}

.medical-alert .alert-icon {
    font-size: 2.2rem;
}

.medical-alert strong {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
    opacity: 0.9;
}

.medical-alert p {
    font-size: 1.1rem;
    font-weight: 600;
}

@keyframes alertPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(255, 65, 108, 0.4);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 15px 35px rgba(255, 65, 108, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(255, 65, 108, 0.4);
    }
}

/* Info Lists */
.info-list {
    list-style: none;
    display: grid;
    gap: 15px;
    margin-bottom: 15px;
}

.info-list li {
    background: rgba(255, 255, 255, 0.4);
    padding: 12px;
    border-radius: 12px;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.info-value {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--secondary);
}

.notes-container {
    background: rgba(255, 255, 255, 0.4);
    padding: 15px;
    border-radius: 12px;
}

.notes-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--secondary);
    font-style: italic;
    margin-bottom: 15px;
}

/* Owner Section */
.flex-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.owner-avatar {
    width: 60px;
    height: 60px;
    background: rgba(52, 152, 219, 0.1);
    color: var(--call);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.owner-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 20px;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    user-select: none;
}

.btn-whatsapp {
    background-color: var(--whatsapp);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:active {
    background-color: var(--whatsapp-dark);
    transform: scale(0.98);
}

.btn-call {
    background-color: var(--call);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.25);
}

.btn-call:active {
    background-color: var(--call-dark);
    transform: scale(0.98);
}

.owner-location {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
}

.btn-map {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.25);
}

.btn-map:active {
    opacity: 0.85;
    transform: scale(0.98);
}

.map-embed {
    margin: 16px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.map-embed a {
    display: block;
}

.map-embed iframe {
    display: block;
    pointer-events: none;
}

.btn-email {
    background: linear-gradient(135deg, #8e44ad, #6c3483);
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.25);
}

.btn-email:active {
    opacity: 0.85;
    transform: scale(0.98);
}

.btn-resend-location {
    background: linear-gradient(135deg, #2980B9, #1A6B9A);
    box-shadow: 0 8px 20px rgba(41, 128, 185, 0.25);
}

.btn-resend-location:active {
    opacity: 0.85;
    transform: scale(0.98);
}

.btn-resend-location:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.location-icon {
    font-size: 1.2rem;
    margin-top: 2px;
}

.address-text {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* Footer Branding */
.branding {
    text-align: center;
    padding: 10px 0 20px;
    color: var(--text-muted);
}

.branding p {
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.branding-logo {
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0.5;
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(46, 204, 113, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

@keyframes pulse-lost {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.5);
    }

    70% {
        box-shadow: 0 0 0 18px rgba(231, 76, 60, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

.lost.pulse {
    animation: pulse-lost 1.5s infinite;
}

/* ============================
   CALL BOTTOM SHEET
   ============================ */

.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    animation: fadeIn 0.2s ease forwards;
}

.call-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 16px 20px 36px;
    z-index: 101;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.call-sheet.hidden {
    display: none !important;
}

@keyframes sheetUp {
    from { transform: translateX(-50%) translateY(100%); }
    to   { transform: translateX(-50%) translateY(0); }
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 4px;
    margin: 0 auto 12px;
}

.sheet-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 4px;
}

.sheet-btn {
    font-size: 1rem;
}

.sheet-btn-alt {
    background-color: #5a7fd4;
    box-shadow: 0 8px 20px rgba(90, 127, 212, 0.25);
}

.sheet-btn-cancel {
    background: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    padding: 12px;
    cursor: pointer;
    text-align: center;
    margin-top: 4px;
}