@charset "UTF-8";

/* ===================================
   VARIABLES Y RESET
   =================================== */
:root {
    --primary: #0EA5E9;
    --primary-dark: #0284C7;
    --primary-light: #E0F2FE;
    --secondary: #64748B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --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;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s ease;
}

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

html {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    /* Bloquear selección de texto */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Bloquear arrastre de elementos */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* ===================================
   LOADER CON ANIMACIONES SECUENCIALES
   =================================== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Logo - Aparece primero con fade in */
.loader-logo-box {
    opacity: 0;
    animation: fadeInLogo 0.4s ease-out 0.1s forwards;
    max-width: 180px;
    width: 100%;
}

.loader-logo {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

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

/* Status container - Aparece junto con el logo */
.loader-status {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: fadeInStatus 0.4s ease-out 0.1s forwards;
}

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

/* Spinner - gira mientras carga */
.loader-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Check - oculto inicialmente, aparece al final */
.loader-check {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
}

.loader-check svg {
    color: var(--white);
    stroke-width: 3;
}

/* Texto */
.loader-text {
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 600;
}

/* Animaciones finales - se activan desde JS */
.loader.verified .loader-spinner {
    animation: scaleOut 0.2s ease-out forwards;
}

.loader.verified .loader-check {
    animation: checkAppear 0.3s ease-out 0.1s forwards;
}

@keyframes scaleOut {
    to {
        transform: scale(0);
        opacity: 0;
    }
}

@keyframes checkAppear {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===================================
   HEADER
   =================================== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

@supports (padding: max(0px)) {
    .header {
        padding-top: max(16px, env(safe-area-inset-top));
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
}

.logo-img {
    height: 28px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.logo:active {
    transform: scale(0.95);
}

.header-login {
    display: flex;
    align-items: center;
    padding: 8px 18px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.header-login:active {
    background: var(--primary-dark);
    transform: scale(0.95);
}

/* ===================================
   LAYOUT GENERAL
   =================================== */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* ===================================
   CREDENCIAL DIGITAL - NUEVA ESTRUCTURA
   =================================== */
.credential-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 30px 20px 40px;
    color: var(--white);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

/* Overlay oscuro para el fondo de imagen - MÁS TRANSPARENTE */
.credential-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(14, 165, 233, 0.75) 0%, 
        rgba(2, 132, 199, 0.75) 100%
    );
    z-index: 0;
}

.credential-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: inherit;
    filter: blur(3px) grayscale(60%);
    opacity: 0.35;
    z-index: 0;
}

.credential-section .container {
    position: relative;
    z-index: 1;
}

/* Header del negocio - Tipo LinkedIn */
.business-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.business-avatar-small {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.3);
    background: var(--white);
    flex-shrink: 0;
}

.business-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-small {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-placeholder-small span {
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
}

.business-title {
    flex: 1;
    min-width: 0;
}

.business-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.2;
    word-break: break-word;
}

.business-type {
    font-size: 15px;
    opacity: 0.9;
    font-weight: 500;
}

/* Cartelera Informativa - Card estilo con MENOS BLUR y MÁS TRANSPARENTE */
.credential-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    opacity: 0.95;
    letter-spacing: 0.3px;
    text-align: center;
}

/* Grid de información */
.info-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}

.info-value a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.info-value a:active {
    opacity: 0.7;
}

/* Items con split (RUC + Sucursal, Parroquia + Barrio) */
.info-item-split {
    flex-direction: row;
    gap: 16px;
}

.info-split-left,
.info-split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-split-left {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: 16px;
}

/* Botón toggle información */
.info-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.info-toggle:active {
    transform: scale(0.98);
}

.info-toggle.active {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.info-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* Información adicional colapsable */
.info-additional {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 0;
}

.info-additional.show {
    max-height: 500px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===================================
   BOTONES
   =================================== */
.btn-primary,
.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    width: 100%;
    max-width: 100%;
}

.btn-primary {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-md);
}

.btn-primary svg {
    width: 22px;
    height: 22px;
}

.btn-secondary {
    background: var(--primary);
    color: var(--white);
    border: 2px solid var(--primary);
}

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

/* ===================================
   SECCIONES DE CONTENIDO
   =================================== */
.services-section,
.schedule-section,
.gallery-section {
    padding: 45px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
}

.section-title svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* ===================================
   SERVICIOS
   =================================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.service-card {
    background: var(--gray-50);
    padding: 18px 20px;
    border-radius: 14px;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14.5px;
}

.service-card:active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
    transform: scale(0.98);
}

/* ===================================
   HORARIOS
   =================================== */
.schedule-grid {
    display: grid;
    gap: 10px;
}

.schedule-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: var(--gray-50);
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    font-size: 14.5px;
}

.schedule-day {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14.5px;
}

.schedule-time {
    color: var(--primary);
    font-weight: 600;
    text-align: right;
    font-size: 14.5px;
}

/* ===================================
   GALERÍA - SCROLL HORIZONTAL INFINITO
   =================================== */

/* Contenedor principal de scroll */
.gallery-scroll-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    margin: 0 -20px;
    padding: 0 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.gallery-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.gallery-scroll {
    display: flex;
    gap: 16px;
    animation: scrollGallery 20s linear infinite;
    will-change: transform;
    cursor: grab;
}

.gallery-scroll:active {
    cursor: grabbing;
}

.gallery-scroll:hover {
    animation-play-state: paused;
}

.gallery-scroll-item {
    flex-shrink: 0;
    width: 280px;
    height: 210px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.gallery-scroll-item:active {
    transform: scale(0.98);
}

@keyframes scrollGallery {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Grid estático para cuando no hay fotos */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.gallery-item {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--gray-100);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:active {
    transform: scale(0.98);
}

.gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
}

.gallery-placeholder svg {
    position: absolute;
    color: var(--gray-400);
}

.gallery-placeholder span {
    position: absolute;
    bottom: 28px;
    font-size: 13.5px;
    color: var(--gray-500);
    font-weight: 500;
    padding: 0 20px;
    text-align: center;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 45px 20px 28px;
}

@supports (padding: max(0px)) {
    .footer {
        padding-bottom: max(28px, env(safe-area-inset-bottom));
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

.footer-content-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    margin-bottom: 32px;
    text-align: center;
}

.footer-logo-centered {
    display: flex;
    justify-content: center;
}

.footer-logo-centered img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.footer-cta h3 {
    color: var(--white);
    font-size: 19px;
    margin-bottom: 12px;
    font-weight: 700;
}

.footer-cta p {
    font-size: 14.5px;
    color: var(--gray-400);
    margin-bottom: 18px;
    line-height: 1.5;
}

/* ===================================
   MODAL DE PERMISOS
   =================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow: hidden;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background: var(--white);
    margin: auto;
    width: 100%;
    max-width: 100%;
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 20px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 21px;
    font-weight: 700;
    color: var(--gray-900);
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
    flex-shrink: 0;
}

.modal-close:active {
    background: var(--gray-100);
    color: var(--gray-900);
    transform: scale(0.95);
}

.modal-body {
    padding: 22px 20px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Loader dentro del modal */
.modal-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 40px 20px;
}

.modal-loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.modal-loader-logo-box {
    opacity: 0;
    animation: fadeInLogo 0.4s ease-out 0.1s forwards;
    max-width: 140px;
    width: 100%;
}

.modal-loader-logo {
    width: 100%;
    max-width: 140px;
    height: auto;
    object-fit: contain;
}

.modal-loader-status {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeInStatus 0.4s ease-out 0.1s forwards;
    position: relative;
}

.modal-loader-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.modal-loader-check {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
}

.modal-loader-check svg {
    color: var(--white);
}

.modal-loader-text {
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 600;
}

.modal-loader.verified .modal-loader-spinner {
    animation: scaleOut 0.2s ease-out forwards;
}

.modal-loader.verified .modal-loader-check {
    animation: checkAppear 0.3s ease-out 0.1s forwards;
}

/* Loading antiguo - por si se necesita de fallback */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading p {
    color: var(--gray-600);
    font-size: 14px;
}

/* ===================================
   PERMITS GRID
   =================================== */
.permits-section {
    margin-bottom: 24px;
}

.permits-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
}

.permits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.permit-card {
    background: var(--gray-50);
    border-radius: 14px;
    padding: 20px;
    border: 2px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.permit-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--success);
}

.permit-card.external::before {
    background: var(--warning);
}

.permit-card:active {
    transform: scale(0.98);
}

.permit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.permit-status {
    font-size: 24px;
}

.permit-badge {
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.permit-badge.vigente {
    background: #DCFCE7;
    color: #166534;
}

.permit-badge.external {
    background: #FEF3C7;
    color: #92400E;
}

.permit-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
    line-height: 1.3;
}

.permit-detail {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.permit-detail svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.permit-detail strong {
    color: var(--gray-900);
    font-weight: 600;
}

.external-warning {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #92400E;
    margin-top: 10px;
    font-weight: 500;
}

.external-warning svg {
    flex-shrink: 0;
}

.btn-view {
    width: 100%;
    padding: 12px;
    background: var(--white);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-view:active {
    background: var(--primary);
    color: var(--white);
    transform: scale(0.98);
}

/* Sección de otros documentos colapsable */
.other-docs-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--gray-200);
}

.other-docs-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.other-docs-toggle:active {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.other-docs-toggle-icon {
    transition: transform 0.3s ease;
}

.other-docs-toggle.active .other-docs-toggle-icon {
    transform: rotate(180deg);
}

.other-docs-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.other-docs-content.show {
    max-height: 2000px;
    margin-top: 16px;
}

/* ===================================
   ERROR SECTION
   =================================== */
.error-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--white);
}

.error-content {
    text-align: center;
    max-width: 400px;
}

.error-content svg {
    color: var(--danger);
    margin-bottom: 20px;
}

.error-content h1 {
    font-size: 24px;
    color: var(--gray-900);
    margin-bottom: 14px;
    font-weight: 700;
}

.error-content p {
    color: var(--gray-600);
    margin-bottom: 10px;
    font-size: 15px;
}

.error-content strong {
    color: var(--danger);
    font-weight: 700;
}

.error-hint {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 24px;
}

.error-content .btn-primary {
    margin-top: 16px;
}

/* ===================================
   NOTIFICACIONES
   =================================== */
.notification {
    position: fixed;
    bottom: -100px;
    left: 16px;
    right: 16px;
    background: var(--gray-900);
    color: var(--white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: bottom 0.3s ease;
    text-align: center;
}

.notification.show {
    bottom: 20px;
}

.notification-success {
    background: var(--success);
}

.notification-error {
    background: var(--danger);
}

.notification-info {
    background: var(--primary);
}

/* Prevenir drag y selección de imágenes */
img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

/* Permitir clicks en imágenes que son parte de links */
a img {
    pointer-events: auto;
}

/* ===================================
   UTILITIES
   =================================== */
.text-center {
    text-align: center;
}

/* ===================================
   OPTIMIZACION PARA PANTALLAS PEQUEÑAS
   =================================== */
@media (max-width: 375px) {
    .business-name {
        font-size: 20px;
    }
    
    .business-avatar-small {
        width: 60px;
        height: 60px;
    }
    
    .avatar-placeholder-small span {
        font-size: 20px;
    }
}

/* ===================================
   TABLET (768px+)
   =================================== */
@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .logo-img {
        height: 32px;
        max-width: 140px;
    }

    .credential-section {
        padding: 50px 24px 60px;
    }

    .business-header {
        gap: 18px;
        margin-bottom: 30px;
    }

    .business-avatar-small {
        width: 90px;
        height: 90px;
    }

    .avatar-placeholder-small span {
        font-size: 32px;
    }

    .business-name {
        font-size: 28px;
    }

    .business-type {
        font-size: 17px;
    }

    .credential-card {
        padding: 26px 24px;
    }

    .services-section,
    .schedule-section,
    .gallery-section {
        padding: 60px 24px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .service-card {
        padding: 20px 24px;
        font-size: 15px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .permits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .modal-content {
        width: 90%;
        max-width: 900px;
        border-radius: var(--radius-xl);
    }

    .modal-header {
        padding: 24px 30px;
    }

    .modal-header h2 {
        font-size: 24px;
    }

    .modal-close {
        width: 40px;
        height: 40px;
    }

    .modal-body {
        padding: 30px;
    }

    .footer {
        padding: 60px 24px 30px;
    }

    .footer-logo-centered img {
        height: 50px;
        max-width: 220px;
    }

    .footer-content-centered {
        gap: 40px;
        margin-bottom: 40px;
    }

    .notification {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        max-width: 400px;
    }
}

/* ===================================
   DESKTOP (1024px+)
   =================================== */
@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-scroll-item {
        width: 320px;
        height: 240px;
    }

    .footer-logo-centered img {
        height: 55px;
        max-width: 240px;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-xl);
    }

    .btn-secondary:hover {
        background: var(--primary-dark);
        border-color: var(--primary-dark);
        transform: translateY(-2px);
    }

    .service-card:hover {
        border-color: var(--primary);
        background: var(--primary-light);
        color: var(--primary-dark);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .gallery-item:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
    }

    .modal-close:hover {
        background: var(--gray-100);
        color: var(--gray-900);
    }

    .btn-view:hover {
        background: var(--primary);
        color: var(--white);
    }

    .permit-card:hover {
        border-color: var(--primary);
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

    .info-toggle:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .info-toggle.active:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .header-login:hover {
        background: var(--primary-dark);
        transform: translateY(-1px);
    }
}

/* ===================================
   TOUCH DEVICE OPTIMIZATIONS
   =================================== */
button,
a,
.service-card,
.schedule-item,
.gallery-item,
.permit-card {
    -webkit-tap-highlight-color: rgba(14, 165, 233, 0.1);
    tap-highlight-color: rgba(14, 165, 233, 0.1);
}

input,
select,
textarea,
button {
    font-size: 16px !important;
}

* {
    -webkit-overflow-scrolling: touch;
}

@media (hover: none) and (pointer: coarse) {
    .btn-primary:hover,
    .btn-secondary:hover,
    .service-card:hover,
    .gallery-item:hover,
    .contact-link:hover,
    .modal-close:hover,
    .btn-view:hover,
    .permit-card:hover,
    .info-toggle:hover {
        transform: none;
        box-shadow: none;
        background: initial;
        color: initial;
        border-color: initial;
    }
}