/* Single Company Page Styles */
.td-single-company-page {
    background: #f9fafb;
    min-height: 100vh;
}

.td-company-hero {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    margin-bottom: 40px;
}

.td-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

.td-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
}

.td-hero-content {
    position: relative;
    z-index: 2;
}

.td-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.td-hero-header {
    display: flex;
    align-items: center;
    gap: 30px;
}

.td-company-logo-large {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    background: white;
}

.td-company-logo-placeholder-large {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.td-hero-info {
    flex: 1;
}

.td-company-title {
    color: white;
    margin: 0 0 15px 0;
    font-size: 36px;
    font-weight: 700;
}

.td-company-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.td-company-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
}

.td-company-meta svg {
    opacity: 0.8;
}

.td-company-meta .separator {
    opacity: 0.5;
}

.td-company-content {
    padding: 40px 0;
}

.td-content-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
}

.td-main-column {
    min-width: 0;
}

.td-content-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.td-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    color: #1e293b;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.td-section-title svg {
    color: #3b82f6;
}

.td-description {
    color: #64748b;
    line-height: 1.8;
    font-size: 16px;
}

.td-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.td-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.td-gallery-item:hover {
    transform: scale(1.05);
}

.td-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.td-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.td-gallery-item:hover .td-gallery-overlay {
    opacity: 1;
}

.td-map-wrapper {
    margin-bottom: 15px;
}

.td-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 15px;
}

.td-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

.td-sidebar-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.td-card-title {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.td-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.td-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    text-decoration: none;
    transition: all 0.2s;
}

.td-contact-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.td-contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    flex-shrink: 0;
}

.td-contact-info {
    flex: 1;
    min-width: 0;
}

.td-contact-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
}

.td-contact-value {
    display: block;
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.td-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 15px;
}

.td-btn-primary {
    background: #3b82f6;
    color: white;
}

.td-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.td-btn-block {
    width: 100%;
    margin-top: 16px;
}

.td-social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.td-social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.td-social-link:hover {
    transform: scale(1.1);
}

.td-social-link.facebook {
    background: #1877f2;
    color: white;
}

.td-social-link.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.td-social-link.twitter {
    background: #1da1f2;
    color: white;
}

.td-social-link.linkedin {
    background: #0077b5;
    color: white;
}

.td-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.td-share-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.td-share-btn:hover {
    transform: translateX(4px);
}

.td-share-btn.facebook {
    background: #1877f2;
    color: white;
}

.td-share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.td-share-btn.whatsapp {
    background: #25d366;
    color: white;
}
/* Botones de compartir - Agregar al final de single-company.css */

/* Botón LinkedIn */
.td-share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.td-share-btn.linkedin:hover {
    background: #005885;
}

/* Botón Copy Link */
.td-share-btn.copy-link {
    background: #6b7280;
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.td-share-btn.copy-link:hover {
    background: #4b5563;
}

/* Animación al copiar */
.td-share-btn.copy-link .copied-text {
    animation: tdFadeIn 0.3s ease;
}

@keyframes tdFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mejorar hover de botones de compartir */
.td-share-btn:active {
    transform: translateX(4px) scale(0.98);
}

/* Responsive para botones de compartir */
@media (max-width: 480px) {
    .td-share-btn {
        font-size: 13px;
        padding: 9px 14px;
    }
    
    .td-share-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Responsive */
@media (max-width: 968px) {
    .td-content-grid {
        grid-template-columns: 1fr;
    }
    
    .td-sidebar {
        position: static;
    }
    
    .td-hero-header {
        flex-direction: column;
        text-align: center;
    }
    
    .td-company-title {
        font-size: 28px;
    }
}
/* ============================================
   🖼️ LIGHTBOX CONTAINER
   ============================================ */

.td-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.td-lightbox.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

/* Overlay oscuro */
.td-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

/* ============================================
   📦 LIGHTBOX CONTENT
   ============================================ */

.td-lightbox-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
}

/* ============================================
   🖼️ IMAGEN
   ============================================ */

.td-lightbox-image-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.td-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.td-lightbox-image.loaded {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   🔄 LOADER
   ============================================ */

.td-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.td-lightbox-loader.active {
    opacity: 1;
    visibility: visible;
}

.td-lightbox-loader .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: td-spin 0.8s linear infinite;
}

@keyframes td-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   🔘 BOTONES
   ============================================ */

/* Botón cerrar */
.td-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.td-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
}

.td-lightbox-close:active {
    transform: scale(0.95) rotate(90deg);
}

/* Botones de navegación */
.td-lightbox-prev,
.td-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.td-lightbox-prev:hover,
.td-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.td-lightbox-prev:active,
.td-lightbox-next:active {
    transform: translateY(-50%) scale(0.95);
}

.td-lightbox-prev {
    left: 20px;
}

.td-lightbox-next {
    right: 20px;
}

/* ============================================
   📊 CONTADOR
   ============================================ */

.td-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.td-lightbox-counter .current {
    color: #3b82f6;
    font-weight: 600;
}

/* ============================================
   📝 CAPTION (OPCIONAL)
   ============================================ */

.td-lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   🔒 BLOQUEO DE SCROLL
   ============================================ */

body.td-lightbox-open {
    overflow: hidden;
    padding-right: 0; /* Prevenir salto por scrollbar */
}

/* ============================================
   📱 RESPONSIVE - MÓVIL
   ============================================ */

@media (max-width: 768px) {
    .td-lightbox-content {
        padding: 80px 10px 80px;
    }
    
    .td-lightbox-image-wrapper {
        max-width: 95%;
        max-height: 80vh;
    }
    
    .td-lightbox-image {
        max-height: 80vh;
        border-radius: 4px;
    }
    
    /* Botones más pequeños en móvil */
    .td-lightbox-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }
    
    .td-lightbox-prev,
    .td-lightbox-next {
        width: 44px;
        height: 44px;
    }
    
    .td-lightbox-prev {
        left: 10px;
    }
    
    .td-lightbox-next {
        right: 10px;
    }
    
    /* Contador en móvil */
    .td-lightbox-counter {
        top: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Caption más pequeño */
    .td-lightbox-caption {
        bottom: 20px;
        max-width: 90%;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ============================================
   🎨 MEJORAS DE ACCESIBILIDAD
   ============================================ */

/* Focus states para navegación por teclado */
.td-lightbox-close:focus,
.td-lightbox-prev:focus,
.td-lightbox-next:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reducir movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    .td-lightbox,
    .td-lightbox-image,
    .td-lightbox-close,
    .td-lightbox-prev,
    .td-lightbox-next {
        transition: none;
    }
    
    .td-lightbox-close:hover {
        transform: scale(1.05);
    }
    
    .td-lightbox-prev:hover,
    .td-lightbox-next:hover {
        transform: translateY(-50%) scale(1.05);
    }
}

/* ============================================
   ✨ ANIMACIONES ADICIONALES
   ============================================ */

/* Fade in del lightbox */
@keyframes td-fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.td-lightbox.active .td-lightbox-overlay {
    animation: td-fadeIn 0.3s ease;
}

/* Zoom in de la imagen */
@keyframes td-zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.td-lightbox-image.loaded {
    animation: td-zoomIn 0.3s ease;
}

/* ============================================
   🎯 MEJORAS VISUALES
   ============================================ */

/* Cursor personalizado sobre la overlay */
.td-lightbox-overlay {
    cursor: zoom-out;
}

/* Hint visual en botones */
.td-lightbox-close::after,
.td-lightbox-prev::after,
.td-lightbox-next::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.td-lightbox-close:hover::after,
.td-lightbox-prev:hover::after,
.td-lightbox-next:hover::after {
    opacity: 1;
}

/* ============================================
   🌐 SOPORTE PARA NAVEGADORES ANTIGUOS
   ============================================ */

/* Fallback para navegadores sin backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .td-lightbox-overlay {
        background: rgba(0, 0, 0, 0.98);
    }
    
    .td-lightbox-close,
    .td-lightbox-prev,
    .td-lightbox-next,
    .td-lightbox-counter,
    .td-lightbox-caption {
        backdrop-filter: none;
    }
}

/* ============================================
   🎬 TRANSICIONES SUAVES
   ============================================ */

.td-lightbox * {
    box-sizing: border-box;
}

/* Smooth scroll para iOS */
.td-lightbox-content {
    -webkit-overflow-scrolling: touch;
}