/**
 * CockpitOS Light Theme - Footer Widget Styles
 * 
 * Verantwortlichkeit: Footer Styling (Horizontal & Vertikal)
 * 
 * @package CockpitOS_Light_Theme
 * @version 1.0.0
 */

/* ========================================
   Container
   ======================================== */

.cockpit-footer {
    position: relative;
    width: 100%;
    background-color: #f9fafb;
    padding: 60px 20px;
}

.cockpit-footer__container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   Vertical Layout (Centered) - Optimiert
   ======================================== */

.cockpit-footer--vertical .cockpit-footer__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px; /* Etwas mehr Abstand */
    text-align: center;
}

.cockpit-footer--vertical .cockpit-footer__section {
    max-width: 600px;
    width: 100%;
}

/* Vertical Layout: Menüs auch zentriert */
.cockpit-footer--vertical .cockpit-footer__menu {
    align-items: center;
}

.cockpit-footer--vertical .cockpit-footer__list {
    text-align: center;
}

/* ========================================
   Horizontal Layout (Columns) - Optimiert
   ======================================== */

.cockpit-footer--horizontal .cockpit-footer__columns {
    display: grid;
    gap: 60px 40px; /* Vertikaler Gap größer (falls Wrap) */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Flexibel & responsive */
    align-items: start; /* Oben ausrichten */
}

/* Fallback: 3 Spalten wenn genug Platz */
@media (min-width: 1025px) {
    .cockpit-footer--horizontal .cockpit-footer__columns {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   Section
   ======================================== */

.cockpit-footer__section {
    margin-bottom: 0;
}

.cockpit-footer__section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.cockpit-footer__section-content {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #6b7280;
}

.cockpit-footer__section-content p {
    margin: 0 0 10px 0;
}

.cockpit-footer__section-content p:last-child {
    margin-bottom: 0;
}

.cockpit-footer__section-content a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.cockpit-footer__section-content a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ========================================
   List
   ======================================== */

.cockpit-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cockpit-footer__list-item {
    margin-bottom: 8px;
    line-height: 1.6;
}

.cockpit-footer__list-item:last-child {
    margin-bottom: 0;
}

/* ========================================
   Menu
   ======================================== */

.cockpit-footer__menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cockpit-footer__menu li {
    margin: 0;
}

.cockpit-footer__menu a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.cockpit-footer__menu a:hover {
    color: #2563eb;
}

/* ========================================
   Horizontal Footer Menu (mit Linien oben & unten)
   ======================================== */

.cockpit-footer__menu-container {
    margin-top: 40px;
    padding: 24px 0; /* Reduziert für bessere Symmetrie */
    border-top: 1px solid #e5e7eb; /* Linie oben */
    border-bottom: 1px solid #e5e7eb; /* Linie unten */
}

.cockpit-footer__horizontal-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0; /* Kein zusätzlicher Gap - wird durch padding der Links geregelt */
}

.cockpit-footer__horizontal-menu li {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.cockpit-footer__horizontal-menu li:not(:last-child)::after {
    content: '•';
    color: #d1d5db;
    margin: 0 16px;
    font-size: 0.75rem;
}

.cockpit-footer__horizontal-menu a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
    font-size: 0.9375rem;
    line-height: 1.6;
    padding: 0; /* Kein Padding - Container-Padding sorgt für Symmetrie */
}

.cockpit-footer__horizontal-menu a:hover {
    color: #2563eb;
    transform: translateY(-1px);
}

.cockpit-footer__menu-container[style*="text-align: left"] .cockpit-footer__horizontal-menu {
    justify-content: flex-start;
}

.cockpit-footer__menu-container[style*="text-align: right"] .cockpit-footer__horizontal-menu {
    justify-content: flex-end;
}

/* ========================================
   Back to Top Button
   ======================================== */

.cockpit-footer__back-to-top {
    position: fixed;
    bottom: 2rem; /* 32px - einheitlich mit Cookie Button */
    width: 56px; /* Einheitliche Größe */
    height: 56px;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cockpit-footer__back-to-top.position-left {
    left: 2rem; /* 32px - einheitlich */
}

.cockpit-footer__back-to-top.position-right {
    right: 2rem; /* 32px - einheitlich */
}

.cockpit-footer__back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cockpit-footer__back-to-top:hover {
    background-color: #1d4ed8;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.cockpit-footer__back-to-top:active {
    transform: translateY(-2px) scale(0.95);
}

.cockpit-footer__back-to-top i,
.cockpit-footer__back-to-top svg {
    font-size: 24px; /* Einheitlich */
    width: 24px;
    height: 24px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .cockpit-footer--horizontal .cockpit-footer__columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px; /* Konsistent mit Mobile */
    }
    
    .cockpit-footer__menu-container {
        margin-top: 40px;
        padding: 24px 0; /* Symmetrisch */
    }
}

@media (max-width: 768px) {
    .cockpit-footer {
        padding: 40px 20px;
    }
    
    .cockpit-footer--horizontal .cockpit-footer__columns {
        grid-template-columns: 1fr;
        gap: 40px; /* Etwas mehr Abstand zwischen Sections */
    }
    
    .cockpit-footer--vertical .cockpit-footer__content {
        gap: 30px;
    }
    
    .cockpit-footer__section-title {
        font-size: 1rem;
    }
    
    .cockpit-footer__section-content {
        font-size: 0.875rem;
    }
    
    /* Mobile: Menü-Container angepasst */
    .cockpit-footer__menu-container {
        margin-top: 30px;
        padding: 12px 0; /* Reduziert für Symmetrie (Links haben 8px padding) */
    }
    
    /* Mobile: Menü vertikal (besser lesbar) */
    .cockpit-footer__horizontal-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0; /* Gap durch Link-Padding geregelt */
        width: 100%; /* Full width für besseres Alignment */
    }
    
    /* Mobile: Li-Elemente als Block (bündige Einrückung) */
    .cockpit-footer__horizontal-menu li,
    .cockpit-footer__horizontal-menu .menu-item {
        display: block !important; /* KEIN inline-flex auf Mobile! */
        width: 100% !important;
        margin: 0 !important; /* Überschreibt Elementor-Controls */
        margin-left: 0 !important; /* WICHTIG: Überschreibt li + li margin */
        margin-right: 0 !important;
        padding: 0 !important;
        float: none !important; /* Kein Float von WordPress */
        text-align: inherit; /* Alignment vom Container */
    }
    
    /* Mobile: Separator komplett entfernen */
    .cockpit-footer__horizontal-menu li::after {
        display: none !important; /* Keine Bullets auf Mobile */
        content: none !important; /* Content komplett entfernen */
        margin: 0 !important;
        width: 0 !important;
    }
    
    .cockpit-footer__horizontal-menu a {
        font-size: 1rem; /* Größer für Touch */
        padding: 8px 0 !important; /* Touch-Area = Total 20px mit Container (12+8=20) */
        padding-left: 0 !important; /* Kein padding-left von WordPress */
        padding-right: 0 !important; /* Kein padding-right von WordPress */
        margin: 0 !important; /* Kein margin von WordPress */
        display: block !important; /* Block für volle Breite */
        width: 100%;
        text-align: inherit; /* Alignment vom Container übernehmen */
    }
    
    /* Mobile: Text-Alignment respektieren */
    .cockpit-footer__menu-container[style*="text-align: center"] .cockpit-footer__horizontal-menu {
        align-items: center;
    }
    
    .cockpit-footer__menu-container[style*="text-align: center"] .cockpit-footer__horizontal-menu a {
        text-align: center;
    }
    
    .cockpit-footer__menu-container[style*="text-align: right"] .cockpit-footer__horizontal-menu {
        align-items: flex-end;
    }
    
    .cockpit-footer__menu-container[style*="text-align: right"] .cockpit-footer__horizontal-menu a {
        text-align: right;
    }
    
    .cockpit-footer__back-to-top {
        bottom: 1rem; /* 16px - einheitlich */
        width: 48px; /* Einheitlich mit Mobile Standards (Apple Touch Target) */
        height: 48px;
    }
    
    .cockpit-footer__back-to-top.position-left {
        left: 1rem; /* 16px - einheitlich */
    }
    
    .cockpit-footer__back-to-top.position-right {
        right: 1rem; /* 16px - einheitlich */
    }
    
    .cockpit-footer__back-to-top i,
    .cockpit-footer__back-to-top svg {
        font-size: 20px; /* Einheitlich */
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .cockpit-footer {
        padding: 30px 16px;
    }
    
    .cockpit-footer--horizontal .cockpit-footer__columns {
        gap: 32px; /* Etwas enger auf sehr kleinen Screens */
    }
    
    .cockpit-footer__section-title {
        font-size: 0.9375rem;
    }
    
    .cockpit-footer__menu-container {
        margin-top: 24px;
        padding: 10px 0; /* Symmetrie: 10px + 8px (Link) = 18px total */
    }
    
    /* Links behalten 8px padding für Touch-Area */
    
    /* Back to Top behält Mobile-Größe (48px) auch auf kleinen Screens */
}

/* ========================================
   Accessibility
   ======================================== */

.cockpit-footer__back-to-top:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.cockpit-footer__section-content a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

