/* Estilos para el Perfil Público de Empresa */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: #1C1C1E;
    min-height: 100vh;
}

/* --- Contenedor Principal y Layout --- */
.perfil-publico-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    box-sizing: border-box;
}

.perfil-contenido {
    flex: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.perfil-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}

/* --- Encabezado del Perfil --- */
.perfil-encabezado {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    padding: 40px 35px;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
}
.logo-empresa img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo-empresa img:hover {
    transform: scale(1.05);
}

/* Contenedor de toda la info a la derecha del logo */
.info-principal {
    display: flex;
    flex-direction: column; /* ¡CLAVE! Apila los elementos verticalmente */
    flex-grow: 1; /* Ocupa el espacio restante */
    gap: 12px; /* Espacio entre nombre, meta-info y categorías */
}
.info-principal h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 0;
    color: #1C1C1E;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

/* Fila que contiene la ciudad y el plan */
.meta-info {
    display: flex;
    justify-content: space-between; /* ¡CLAVE! Empuja los elementos a los extremos */
    align-items: center;
    width: 100%; /* Asegura que ocupe todo el ancho para que space-between funcione */
    color: #666;
    font-weight: 500;
}

.view-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-weight: 500;
    font-size: 14px;
    margin-top: 5px; /* Pequeño espacio con el elemento superior */
}

.view-count svg {
    flex-shrink: 0;
    color: #007aff; /* Color azul para el icono de ojo */
}

.plan-badge {
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid transparent;
}
.plan-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Plan Emprendedor */
.plan-badge.emprendedor {
    background: rgba(142, 142, 147, 0.15);
    color: #8E8E93;
    border-color: rgba(142, 142, 147, 0.2);
    backdrop-filter: blur(10px);
}

/* Plan Empresa */
.plan-badge.empresa {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
    border-color: rgba(0, 122, 255, 0.25);
    backdrop-filter: blur(10px);
}

.plan-badge.empresa .badge-icon {
    width: 18px;
    height: 18px;
    fill: #007aff; /* Color azul del plan */
}

/* Plan Empresa Certificada (con animación) */
.plan-badge.certificada {
    color: #fff;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    background-size: 200% 200%;
    border-color: rgba(255, 215, 0, 0.4);
    animation: gradient-animation-yellow 3s ease infinite, pulse-glow-yellow 2s infinite alternate;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.plan-badge.certificada .badge-icon {
    width: 16px;
    height: 16px;
    fill: #fff;
}

@keyframes gradient-animation-yellow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse-glow-yellow {
    from { box-shadow: 0 0 5px rgba(255, 193, 7, 0.5), 0 0 10px rgba(255, 143, 0, 0.4); }
    to { box-shadow: 0 0 15px rgba(255, 193, 7, 0.8), 0 0 25px rgba(255, 143, 0, 0.6); }
}
.sello-verificado {
    background-color: #e2f5e7;
    color: #34c759;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
}
.categorias-header {
    margin-top: 0; /* Quitar margen para que el gap controle el espacio */
}

/* --- Secciones Generales --- */
.perfil-seccion { 
    padding: 35px; 
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.06);
    transition: background-color 0.3s ease;
}
.perfil-seccion:last-child { border-bottom: none; }
.perfil-seccion:hover {
    background-color: rgba(248, 250, 252, 0.5);
}
.perfil-seccion h2 { 
    font-size: 24px; 
    font-weight: 700; 
    margin-bottom: 24px; 
    color: #1C1C1E;
    letter-spacing: -0.3px;
}
.perfil-seccion p { 
    line-height: 1.8; 
    color: #3A3A3C;
    font-size: 16px;
}
.tags-container { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
}
.tag { 
    background: rgba(142, 142, 147, 0.15);
    color: #3A3A3C; 
    padding: 10px 18px; 
    border-radius: 20px; 
    font-size: 14px; 
    font-weight: 500;
    border: 1.5px solid rgba(142, 142, 147, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}
.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(142, 142, 147, 0.3);
}
.tag.servicio { 
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
    border-color: rgba(0, 122, 255, 0.25);
}
.tag.servicio:hover {
    background: rgba(0, 122, 255, 0.18);
    border-color: rgba(0, 122, 255, 0.35);
}
 
/* Estilos para la información destacada antes de la descripción */
.info-destacada-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background-color: #f9f9f9;
    border: 1px solid #e5e5ea;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px; /* Espacio antes de la descripción */
}
.info-destacada-item .label {
    display: block;
    font-size: 14px;
    color: #888;
    margin-bottom: 5px;
    font-weight: 500;
}
.info-destacada-item .value {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
}

/* --- Contacto Interactivo --- */
.contacto-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 16px; 
}
.contacto-item { 
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px; 
    padding: 20px; 
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    position: relative; 
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.contacto-item:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
}
.contacto-item .label { 
    display: block; 
    font-size: 13px; 
    color: #8E8E93; 
    margin-bottom: 8px;
    font-weight: 500;
}
.contacto-item .value { 
    font-size: 17px; 
    font-weight: 600; 
    color: #1C1C1E;
}
.contacto-item .copy-feedback { 
    position: absolute; 
    top: 18px; 
    right: 18px; 
    font-size: 12px; 
    font-weight: 600; 
    color: #007AFF; 
    opacity: 0; 
    transition: all 0.3s ease;
    background: rgba(0, 122, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}
.contacto-item:hover .copy-feedback { 
    opacity: 1;
    transform: scale(1.05);
}
.contacto-item.copied { 
    border-color: #34C759;
    background: rgba(52, 199, 89, 0.1);
}
.contacto-item.copied .copy-feedback { 
    color: #34C759;
    background: rgba(52, 199, 89, 0.15);
}

/* --- Sidebar y Reseñas --- */
.sidebar-card { 
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 24px; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    padding: 28px; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}
.sidebar-card h3 { 
    font-size: 20px; 
    font-weight: 700; 
    margin-bottom: 20px;
    color: #1C1C1E;
    letter-spacing: -0.3px;
}
.sin-reseñas { 
    font-size: 15px; 
    color: #8E8E93; 
    text-align: center; 
    padding: 15px 0;
    line-height: 1.6;
}
.calificacion-resumen { 
    text-align: center; 
}
.promedio-numero { 
    font-size: 52px; 
    font-weight: 700; 
    color: #1C1C1E;
    letter-spacing: -1px;
    margin-bottom: 8px;
}
.total-valoraciones { 
    font-size: 15px; 
    color: #8E8E93; 
    margin-top: 8px;
    font-weight: 500;
}

/* Estrellas (Display) */
.estrellas-resumen, .estrellas-reseña { display: inline-block; font-size: 24px; font-family: Times; line-height: 1; }
.estrellas-resumen::before, .estrellas-reseña::before { content: '★★★★★'; letter-spacing: 3px; background: linear-gradient(90deg, #ffc107 var(--rating-percent, 0%), #e5e5ea var(--rating-percent, 0%)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.estrellas-resumen, .estrellas-reseña { --rating-percent: calc(var(--rating) / 5 * 100%); }
.estrellas-reseña { font-size: 16px; }

/* Formulario de Reseña */
.form-subtitulo { 
    font-size: 14px; 
    color: #8E8E93; 
    margin-bottom: 20px;
    line-height: 1.5;
}
.form-grupo { 
    margin-bottom: 20px; 
}
.form-grupo label { 
    display: block; 
    font-size: 15px; 
    font-weight: 600; 
    margin-bottom: 8px;
    color: #1C1C1E;
}
.form-grupo input, .form-grupo textarea { 
    width: 100%; 
    padding: 14px 18px; 
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px; 
    font-size: 15px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.form-grupo input:focus, .form-grupo textarea:focus {
    outline: none;
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
}
.btn-submit-reseña { 
    width: 100%; 
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    color: white; 
    border: none; 
    padding: 16px; 
    border-radius: 20px; 
    font-weight: 600; 
    font-size: 16px;
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}
.btn-submit-reseña:hover { 
    background: linear-gradient(135deg, #0051D5 0%, #003D9E 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}
.btn-submit-reseña:active {
    transform: translateY(0);
}

/* Estrellas (Input) */
.rating-input { display: flex; flex-direction: row-reverse; justify-content: center; }
.rating-input input { display: none; }
.rating-input label { font-size: 28px; color: #ccc; cursor: pointer; transition: color 0.2s ease; }
.rating-input label::before { content: '★'; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: #ffc107; }

/* Lista de Reseñas */
.lista-reseñas { 
    display: flex; 
    flex-direction: column; 
    gap: 24px; 
}
.reseña-item { 
    border-top: 1.5px solid rgba(0, 0, 0, 0.06);
    padding-top: 24px;
    transition: all 0.3s ease;
}
.reseña-item:first-child { 
    border-top: none; 
    padding-top: 0; 
}
.reseña-item:hover {
    padding-left: 8px;
}
.reseña-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 12px; 
}
.nombre-autor { 
    font-weight: 600;
    font-size: 16px;
    color: #1C1C1E;
}
.comentario-texto { 
    font-style: italic; 
    color: #3A3A3C;
    line-height: 1.6;
    font-size: 15px;
}
.fecha-reseña { 
    font-size: 13px; 
    color: #8E8E93; 
    display: block; 
    text-align: right; 
    margin-top: 10px;
    font-weight: 500;
}

/* --- Responsividad --- */

/* TABLET (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .perfil-publico-container {
        flex-direction: column;
        margin: 20px auto;
        padding: 0 16px;
        gap: 20px;
    }
    
    .perfil-sidebar {
        position: static;
        flex: auto;
        width: 100%;
    }
    
    .perfil-encabezado {
        flex-direction: row;
        padding: 30px 24px;
        gap: 20px;
    }
    
    .logo-empresa img {
        width: 90px;
        height: 90px;
    }
    
    .info-principal h1 {
        font-size: 28px;
    }
    
    .meta-info {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .perfil-seccion {
        padding: 24px;
    }
    
    .perfil-seccion h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .perfil-seccion p {
        font-size: 15px;
        line-height: 1.7;
    }
    
    .tags-container {
        gap: 10px;
    }
    
    .tag {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .contacto-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .contacto-item {
        padding: 16px;
    }
    
    .sidebar-card {
        padding: 20px;
    }
    
    /* Badge de certificado solo con icono en tablet */
    .plan-badge.certificada {
        padding: 8px !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    
    .plan-badge.certificada .badge-icon-certificada {
        width: 24px !important;
        height: 24px !important;
        margin: 0 !important;
        display: block !important;
        flex-shrink: 0 !important;
    }
    
    .plan-badge.certificada .badge-text {
        display: none !important;
    }
}

/* Logo del sitio flotante para móvil y tablet */
.mobile-site-logo {
    display: none;
}

/* MÓVIL Y TABLET (hasta 1024px) */
@media (max-width: 1024px) {
    /* Logo del sitio flotante en móvil y tablet */
    .mobile-site-logo {
        display: flex !important;
        justify-content: center;
        align-items: center;
        position: fixed !important;
        top: 12px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 999 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        padding: 10px 20px !important;
        border-radius: 50px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.8) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .mobile-logo-img {
        height: 32px !important;
        max-width: 140px !important;
        object-fit: contain !important;
    }
}

/* OCULTAR BURBUJAS EN PC (min-width: 1025px) */
@media (min-width: 1025px) {
    .mobile-site-logo,
    .mobile-site-logo *,
    .mobile-site-logo a,
    .mobile-site-logo img,
    .mobile-user-profile,
    .mobile-user-profile *,
    .mobile-user-profile img,
    .mobile-user-profile span,
    .mobile-user-profile-guest,
    .mobile-user-profile-guest *,
    .mobile-user-profile-guest svg {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        height: 0 !important;
        width: 0 !important;
        max-height: 0 !important;
        max-width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
    }
    
    body.page-perfil-publico {
        padding-top: 0 !important;
    }
    
    /* Asegurar que el header se muestre en PC - solo quitar ocultación, mantener estilos originales */
    .directorio-header-transparent,
    .directorio-header-white,
    .public-header,
    #main-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    .header-content {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* MÓVIL (hasta 768px) - Ajustes adicionales */
@media (max-width: 768px) {
    .mobile-site-logo {
        padding: 8px 16px;
    }
    
    .mobile-logo-img {
        height: 28px;
        max-width: 120px;
    }
    
    .perfil-publico-container {
        flex-direction: column;
        margin: 60px auto 12px auto; /* Margen superior para el logo flotante */
        padding: 0 12px;
        gap: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .perfil-contenido {
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .perfil-encabezado {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
        gap: 14px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .logo-empresa {
        display: flex;
        justify-content: center;
    }
    
    .logo-empresa img {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }
    
    .info-principal {
        align-items: center;
        gap: 12px;
    }
    
    .info-principal h1 {
        font-size: 24px;
        line-height: 1.3;
        text-align: center;
    }
    
    .meta-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    
    .location-info {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 14px;
    }
    
    .plan-badge {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    /* Badge de certificado solo con icono en móvil */
    .plan-badge.certificada {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
        padding: 6px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    
    .plan-badge.certificada .badge-icon-certificada {
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        display: block !important;
        flex-shrink: 0 !important;
    }
    
    .plan-badge.certificada .badge-text {
        display: none !important;
    }
    
    .tags-container {
        justify-content: center;
        gap: 8px;
    }
    
    .tag {
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 16px;
    }
    
    .info-principal {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .info-principal h1 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .tags-container {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .tag {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .perfil-seccion {
        padding: 20px 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .perfil-seccion h2 {
        font-size: 18px;
        margin-bottom: 14px;
        text-align: center;
        word-wrap: break-word;
    }
    
    .perfil-seccion p {
        font-size: 14px;
        line-height: 1.6;
        text-align: left;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .contacto-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contacto-item {
        padding: 16px;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .contacto-item .label {
        font-size: 12px;
        margin-bottom: 6px;
        word-wrap: break-word;
    }
    
    .contacto-item .value {
        font-size: 15px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        display: block;
        line-height: 1.4;
    }
    
    /* Corregir botón de chat */
    .contacto-item.chat-button {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .contacto-item.chat-button .label {
        margin-bottom: 0;
    }
    
    .contacto-item.chat-button .value {
        font-size: 15px;
        font-weight: 600;
        color: #007aff;
    }
    
    .contacto-item.chat-button .copy-feedback {
        display: none;
    }
    
    .sidebar-card {
        padding: 20px 16px;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .sidebar-card h3 {
        font-size: 18px;
        margin-bottom: 16px;
        word-wrap: break-word;
    }
    
    .form-grupo {
        margin-bottom: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .form-grupo label {
        font-size: 14px;
        margin-bottom: 6px;
        word-wrap: break-word;
    }
    
    .form-grupo input,
    .form-grupo textarea {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .btn-submit-reseña {
        padding: 14px;
        font-size: 15px;
        border-radius: 16px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .admin-contacto-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .admin-contacto-item {
        padding: 16px;
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .galeria-publica-wrapper {
        height: 120px;
        padding-bottom: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .galeria-publica {
        width: max-content;
        min-width: 100%;
    }
    
    .galeria-publica-item {
        flex-shrink: 0;
    }
    
    .galeria-publica-item img {
        width: 180px;
        border-radius: 16px;
        display: block;
    }
    
    /* Asegurar que no haya overflow horizontal */
    * {
        max-width: 100%;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Corregir elementos que se cortan */
    .perfil-sidebar {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .lista-reseñas {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .reseña-item {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .comentario-texto {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

/* --- Estilos para el Buscador del Header --- */
.header-search-form { flex-grow: 1; display: flex; max-width: 500px; }
.header-search-form input { width: 100%; padding: 10px 18px; border: 1px solid #e5e5ea; border-radius: 50px 0 0 50px; font-size: 14px; outline: none; background-color: #f8f9fa; transition: border-color 0.2s ease; }
.header-search-form input:focus { border-color: #007aff; }
.header-search-form button { padding: 10px 20px; border: none; background-color: #007aff; color: white; font-size: 14px; font-weight: 500; border-radius: 0 50px 50px 0; cursor: pointer; transition: background-color 0.2s ease; }
.header-search-form button:hover { background-color: #005bb5; }
@media (max-width: 768px) { .header-search-form { display: none; } }

/* --- Estilos para el Icono de Localización --- */
.meta-info .location-info { display: inline-flex; align-items: center; gap: 6px; }
.meta-info .location-info svg { flex-shrink: 0; color: #d93025; }

/* --- INICIO: NUEVOS ESTILOS PARA EL MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Evita clicks cuando está oculto */
}
.modal-overlay:not([style*="display: none"]) {
    opacity: 1;
    pointer-events: auto; /* Permite clicks cuando está visible */
}

.modal-contenido {
    background-color: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay:not([style*="display: none"]) .modal-contenido {
    transform: scale(1);
}

.modal-cerrar {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
.modal-cerrar:hover {
    color: #333;
}

#modal-icono {
    margin-bottom: 20px;
}
.modal-svg {
    width: 60px;
    height: 60px;
}
.modal-svg.success { fill: #28a745; }
.modal-svg.error { fill: #dc3545; }

.modal-contenido h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.modal-contenido p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-boton {
    background-color: #007aff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.modal-boton:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
}

/* Estilos para el modal de licitación */
#modal-licitacion .modal-contenido {
    text-align: left;
}
#modal-licitacion .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5ea;
}
#modal-licitacion .modal-header h3 {
    font-size: 20px;
    margin: 0;
}
#modal-licitacion .form-grupo label {
    text-align: left;
}
#modal-licitacion .modal-footer {
    text-align: right;
    margin-top: 10px;
}
/* --- FIN: NUEVOS ESTILOS --- */

/* Estilos para la sección de contactos administrativos */
.admin-contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.admin-contacto-item {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.admin-contacto-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 122, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 122, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.admin-contacto-item .cargo {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #007aff;
    margin-bottom: 8px;
}

.admin-contacto-item .nombre {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 15px;
}

.admin-contacto-item .datos-contacto {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.admin-contacto-item .datos-contacto a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.admin-contacto-item .datos-contacto a:hover {
    color: #007aff;
    text-decoration: underline;
}

.admin-contacto-item .datos-contacto span {
    color: #ccc;
}

.contenido-bloqueado {
    text-align: center;
    padding: 50px 40px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.contenido-bloqueado svg {
    width: 40px;
    height: 40px;
    color: #007aff;
    margin-bottom: 15px;
}

.contenido-bloqueado h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.contenido-bloqueado p {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
}

.boton-desbloqueo {
    display: inline-block;
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
    border: none;
}

.boton-desbloqueo:hover {
    background: linear-gradient(135deg, #0051D5 0%, #003D9E 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

/* --- Estilos para la Sección de Licitación (Modificados) --- */
.cta-licitacion {
    background-color: #fff;
    text-align: center;
    padding: 30px;
    border-top: 0px solid #e5e5ea;
}

/* Estilos para el modal de imagen */
.image-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Un poco más alto que el otro modal */
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.image-modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 5px;
}


.cta-licitacion h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 20px;
}

.boton-licitacion {
    display: inline-block;
    background-color: #007aff;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.boton-licitacion:hover {
    background-color: #005bb5;

}
