/**
 * Estilos para Widget de Footer Dinâmico LEDS
 * 
 * @package LEDS_Elementor_Widgets
 * @version 1.0.0
 */

/* ========================================
   CONTAINER PRINCIPAL
   ======================================== */

.leds-footer-widget {
    background: linear-gradient(135deg, #121926 0%, #0D121C 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}


/* ========================================
   TÍTULO PRINCIPAL
   ======================================== */

.leds-footer-title {
    font-family: var(--family-highlight, 'Poppins', sans-serif);
    font-size: var(--font-size-3xl, 32px);
    font-weight: var(--font-weight-bold, 700);
    color: #ffffff;
    text-align: center;
    margin: 0 0 40px 0;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .leds-footer-title {
        font-size: var(--font-size-2xl, 24px);
        margin-bottom: 30px;
    }
}

/* ========================================
   COLUNAS DO FOOTER
   ======================================== */

.leds-footer-columns {
    display: grid;
    gap: 30px;
    position: relative;
    z-index: 2;
    margin-top: 20px;
}

/* Grid responsivo baseado no número de colunas */
.leds-footer-columns[data-columns="1"] {
    grid-template-columns: 1fr;
}

.leds-footer-columns[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.leds-footer-columns[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.leds-footer-columns[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.leds-footer-columns[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.leds-footer-columns[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* Responsividade das colunas */
@media (max-width: 1200px) {
    .leds-footer-columns[data-columns="5"],
    .leds-footer-columns[data-columns="6"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .leds-footer-columns[data-columns="4"],
    .leds-footer-columns[data-columns="5"],
    .leds-footer-columns[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .leds-footer-columns {
        grid-template-columns: 1fr !important;
        gap: 25px;
    }
}

/* ========================================
   COLUNA INDIVIDUAL
   ======================================== */

.leds-footer-column {
    min-width: 0; /* Permite quebra de texto */
}

.leds-footer-column-title {
    font-family: var(--family-highlight, 'Poppins', sans-serif);
    font-size: var(--font-size-lg, 18px);
    font-weight: var(--font-weight-semi-bold, 600);
    color: #ffffff;
    margin: 0 0 16px 0;
    line-height: 1.3;
    position: relative;
}

.leds-footer-column-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-surface-brand-primary-medium, #00AEEF);
    border-radius: 1px;
}


@media (max-width: 768px) {
    .leds-footer-column-title::after {
        content: '';
        position: absolute;
        bottom: -8px;
        height: 1px;
        background: #00AEEF;
        border-radius: 1px;
        left: 0px;
        width: 100%;
        opacity: 0.2;
    }
}


/* ========================================
   LINKS DO FOOTER
   ======================================== */

.leds-footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leds-footer-link {
    font-family: var(--font-family-base, 'Inter', sans-serif);
    font-size: var(--font-size-md, 16px);
    font-weight: 400;
    color: var(--color-text-base-minor-alt, #CDD5DF);
    text-decoration: none;
    line-height: 1.5;
    transition: all 0.3s ease;
    position: relative;
    padding: 4px 0;
    display: inline-block;
}

.leds-footer-link:hover {
    color: var(--color-surface-brand-primary-medium, #00AEEF);
    transform: translateX(5px);
}

.leds-footer-link:focus {
    outline: 2px solid var(--color-surface-brand-primary-medium, #00AEEF);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Indicador visual para links externos */
.leds-footer-link[target="_blank"]::after {
    content: '↗';
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.7;
}

/* ========================================
   ÍCONES DO FOOTER
   ======================================== */

.leds-footer-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.leds-footer-icon-link,
.leds-footer-icon-static {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.leds-footer-icon-link {
    cursor: pointer;
}

.leds-footer-icon-link:hover svg{
    color: #00AEEF !important;
    fill: #00AEEF !important;
}

.leds-footer-icon-link svg,
.leds-footer-icon-static svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    color: #ffffff;
    transition: color 0.3s ease;
}

.leds-footer-icon-link:hover svg {
    color: #ffffff;
}

/* Tooltip para ícones */
.leds-footer-icon-link[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #23282d;
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.leds-footer-icon-link[title]:hover::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #23282d;
    z-index: 10;
}

/* Responsividade dos ícones */
@media (max-width: 768px) {
    .leds-footer-icons {
        justify-content: center;
        margin-top: 15px;
        padding-top: 12px;
    }
    
    .leds-footer-icon-link,
    .leds-footer-icon-static {
        width: 28px;
        height: 28px;
    }
    
    .leds-footer-icon-link svg,
    .leds-footer-icon-static svg {
        width: 18px;
        height: 18px;
    }
}

/* ========================================
   INTEGRAÇÃO COM ELEMENTOR
   ======================================== */

/* Remover margens padrão do Elementor */
.elementor-widget-leds-footer .elementor-widget-container {
    padding: 0;
    margin: 0;
}

/* Garantir que o widget funcione bem em containers */
.elementor-widget-leds-footer {
    width: 100%;
}

/* ========================================
   VARIAÇÕES DE LAYOUT
   ======================================== */

/* Layout compacto para menos colunas */
.leds-footer-columns[data-columns="1"] .leds-footer-column,
.leds-footer-columns[data-columns="2"] .leds-footer-column {
    text-align: center;
}

.leds-footer-columns[data-columns="1"] .leds-footer-column-title::after,
.leds-footer-columns[data-columns="2"] .leds-footer-column-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ========================================
   ESTADOS E ANIMAÇÕES
   ======================================== */

/* Animação de entrada */
.leds-footer-column {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.leds-footer-column:nth-child(1) { animation-delay: 0.1s; }
.leds-footer-column:nth-child(2) { animation-delay: 0.2s; }
.leds-footer-column:nth-child(3) { animation-delay: 0.3s; }
.leds-footer-column:nth-child(4) { animation-delay: 0.4s; }
.leds-footer-column:nth-child(5) { animation-delay: 0.5s; }
.leds-footer-column:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effect na coluna */
.leds-footer-column:hover .leds-footer-column-title::after {
    width: 50px;
    transition: width 0.3s ease;
}

/* ========================================
   MODO ESCURO/CLARO
   ======================================== */

/* Variação clara (pode ser ativada via classe) */
.leds-footer-widget.light-mode {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #212529;
}

.leds-footer-widget.light-mode .leds-footer-title {
    color: #212529;
}

.leds-footer-widget.light-mode .leds-footer-column-title {
    color: #495057;
}

.leds-footer-widget.light-mode .leds-footer-link {
    color: #6c757d;
}

.leds-footer-widget.light-mode .leds-footer-link:hover {
    color: var(--color-surface-brand-primary-medium, #00AEEF);
}

/* ========================================
   ACESSIBILIDADE
   ======================================== */

/* Melhor contraste para leitores de tela */
@media (prefers-contrast: high) {
    .leds-footer-link {
        color: #ffffff;
    }
    
    .leds-footer-column-title::after {
        background: #ffffff;
    }
}

/* Reduzir animações se solicitado */
@media (prefers-reduced-motion: reduce) {
    .leds-footer-column {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .leds-footer-link {
        transition: none;
    }
    
    .leds-footer-link:hover {
        transform: none;
    }
}

/* ========================================
   IMPRESSÃO
   ======================================== */

@media print {
    .leds-footer-widget {
        background: none !important;
        color: #000 !important;
        box-shadow: none !important;
    }
    
    .leds-footer-svg {
        display: none;
    }
    
    .leds-footer-title,
    .leds-footer-column-title {
        color: #000 !important;
    }
    
    .leds-footer-link {
        color: #000 !important;
        text-decoration: underline;
    }
    
    .leds-footer-columns {
        display: block;
    }
    
    .leds-footer-column {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* ========================================
   RESPONSIVIDADE AVANÇADA
   ======================================== */

/* Extra small devices */
@media (max-width: 576px) {
    .leds-footer-widget {
        padding: 40px 15px 30px 15px;
    }
    
    .leds-footer-title {
        font-size: var(--font-size-xl, 20px);
        margin-bottom: 25px;
    }
    
    .leds-footer-columns {
        gap: 20px;
    }
    
    .leds-footer-column-title {
        font-size: var(--font-size-md, 16px);
        margin-bottom: 12px;
    }
    
    .leds-footer-link {
        font-size: 14px;
    }
    
    .leds-footer-svg {
        display: none; /* Ocultar SVG em telas muito pequenas */
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .leds-footer-columns {
        gap: 40px;
    }
    
    .leds-footer-title {
        font-size: 36px;
        margin-bottom: 50px;
    }
}

/* ========================================
   COMPATIBILIDADE COM TEMAS
   ======================================== */

/* Reset de estilos que podem interferir */
.leds-footer-widget * {
    box-sizing: border-box;
}

.leds-footer-widget a {
    text-decoration: none;
}

.leds-footer-widget h2,
.leds-footer-widget h3 {
    font-weight: inherit;
    line-height: inherit;
}

/* ========================================
   LOADING STATE
   ======================================== */

.leds-footer-widget.loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.leds-footer-widget.loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #00AEEF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
