/* ============================================
   FOOTER PROFESIONAL - TecsaS3
   Paleta: #A6DAF7, #6CAFDD, #458BBA, #134D6D, #042A3A
   ============================================ */

:root {
    --footer-primary: #134D6D;
    --footer-secondary: #458BBA;
    --footer-accent: #6CAFDD;
    --footer-light: #A6DAF7;
    --footer-dark: #042A3A;
    --footer-height-collapsed: 40px;
    --footer-height-expanded: 100px;
    --footer-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   FOOTER CONTAINER
   ============================================ */
.footer-professional {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    transition: var(--footer-transition);
}

.footer-professional.collapsed .footer-content {
    max-height: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
}

.footer-professional.collapsed .footer-toggle-icon {
    transform: rotate(180deg);
}

/* ============================================
   TOGGLE TAB (SOLAPA)
   ============================================ */
.footer-toggle {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 32px;
    background: linear-gradient(135deg, var(--footer-primary) 0%, var(--footer-secondary) 100%);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 -4px 12px rgba(19, 77, 109, 0.3);
    transition: var(--footer-transition);
    border: none;
    outline: none;
    z-index: 1051;
}

.footer-toggle:hover {
    background: linear-gradient(135deg, var(--footer-secondary) 0%, var(--footer-primary) 100%);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 -6px 16px rgba(19, 77, 109, 0.4);
}

.footer-toggle:focus {
    outline: 2px solid var(--footer-light);
    outline-offset: 2px;
}

.footer-toggle-icon {
    color: #ffffff;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.footer-toggle-text {
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   FOOTER CONTENT
   ============================================ */
.footer-professional .footer-content {
    background: linear-gradient(135deg, var(--footer-dark) 0%, var(--footer-primary) 100%);
    max-height: var(--footer-height-expanded);
    padding: 8px 0;
    transition: var(--footer-transition);
    opacity: 1;
    overflow: hidden;
    box-shadow: 0 -4px 20px rgba(4, 42, 58, 0.4);
    display: block !important;
}

.footer-professional .footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex !important;
    flex-direction: column;
    gap: 6px;
}

/* ============================================
   STATS ROW
   ============================================ */
.footer-stats-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(4px);
    transition: var(--footer-transition);
}

.footer-stat:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #ffffff;
}

.footer-stat-icon.patients {
    background: linear-gradient(135deg, #6CCB7A 0%, #51B968 100%);
}

.footer-stat-icon.families {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
}

.footer-stat-icon.risk-high {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A52 100%);
}

.footer-stat-icon.risk-medium {
    background: linear-gradient(135deg, #FFD93D 0%, #FFC312 100%);
}

.footer-stat-icon.risk-low {
    background: linear-gradient(135deg, #6CCB7A 0%, #51B968 100%);
}

.footer-stat-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.footer-stat-value {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
}

.footer-stat-label {
    color: var(--footer-light);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   TICKER (NEWS FEED)
   ============================================ */
.footer-professional .footer-ticker-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 30px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 15px;
    display: flex !important;
    align-items: center;
}

.footer-professional .footer-ticker-label {
    flex-shrink: 0;
    padding: 0 12px;
    background: linear-gradient(135deg, var(--footer-secondary) 0%, var(--footer-accent) 100%);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 100%;
    display: flex;
    align-items: center;
    border-radius: 15px 0 0 15px;
    z-index: 2;
}

.footer-professional .footer-ticker-label i {
    margin-right: 6px;
}

.footer-professional .footer-ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.footer-professional .footer-ticker {
    display: inline-block !important;
    white-space: nowrap;
    animation: footerTicker 60s linear infinite;
    will-change: transform;
}

.footer-professional .footer-ticker:hover {
    animation-play-state: paused;
}

.footer-professional .footer-ticker-item {
    display: inline-flex !important;
    align-items: center;
    padding: 0 20px;
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 30px;
    gap: 8px;
    vertical-align: middle;
}

.footer-professional .footer-ticker-item span {
    color: #ffffff;
}

.footer-professional .footer-ticker-item a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-professional .footer-ticker-item a:hover {
    color: var(--footer-light);
    text-decoration: underline;
}

.footer-professional .footer-ticker-separator {
    color: var(--footer-accent);
    font-weight: bold;
    margin: 0 4px;
}

.footer-professional .footer-ticker-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-professional .footer-ticker-badge.news {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: #ffffff;
}

.footer-professional .footer-ticker-badge.stat {
    background: linear-gradient(135deg, #6CCB7A 0%, #51B968 100%);
    color: #ffffff;
}

.footer-professional .footer-ticker-badge.alert {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A52 100%);
    color: #ffffff;
}

@keyframes footerTicker {
    0% {
        transform: translateX(100vw);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ============================================
   COPYRIGHT
   ============================================ */
.footer-copyright {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright a {
    color: var(--footer-light);
    text-decoration: none;
    font-weight: 600;
}

.footer-copyright a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .footer-stats-row {
        gap: 12px;
    }

    .footer-stat {
        padding: 4px 10px;
    }

    .footer-stat-icon {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .footer-stat-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .footer-content {
        max-height: 120px;
    }

    .footer-stats-row {
        gap: 8px;
        justify-content: center;
    }

    .footer-stat {
        padding: 3px 8px;
    }

    .footer-stat-label {
        display: none;
    }

    .footer-ticker-label span {
        display: none;
    }

    .footer-ticker-item {
        font-size: 0.75rem;
        padding: 0 16px;
    }

    .footer-toggle {
        width: 60px;
        height: 28px;
        top: -28px;
    }

    .footer-toggle-text {
        display: none;
    }
}

@media (max-width: 576px) {
    .footer-stats-row {
        display: none;
    }

    .footer-content {
        max-height: 60px;
        padding: 6px 0;
    }

    .footer-ticker-wrapper {
        height: 26px;
        border-radius: 13px;
    }

    .footer-ticker-item {
        font-size: 0.75rem;
        line-height: 26px;
        padding: 0 12px;
    }

    .footer-ticker-badge {
        padding: 2px 6px;
        font-size: 0.6rem;
    }

    .footer-copyright {
        font-size: 0.6rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .footer-ticker {
        animation: none;
    }

    .footer-toggle,
    .footer-stat,
    .footer-content {
        transition: none;
    }
}

/* ============================================
   BODY PADDING ADJUSTMENT
   ============================================ */
body {
    padding-bottom: 110px;
}

body.footer-collapsed {
    padding-bottom: 50px;
}

#content-wrapper {
    padding-bottom: 20px;
}
