/* ===================== Footer Styles ===================== */

/* Footer Theme Variables */
:root {
  --footer-bg: #ffffff;
  --footer-text: #1e293b;
  --footer-muted: #64748b;
  --footer-glass: rgba(255,255,255,0.65);
  --footer-glass-strong: rgba(255,255,255,0.86);
  --footer-border: 1px solid rgba(30,41,59,0.08);
  --footer-shadow: 0 10px 30px rgba(30,41,59,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
  --footer-radius: 18px;
}

[data-theme="dark"] {
  --footer-bg: #1e293b;
  --footer-text: #f1f5f9;
  --footer-muted: #94a3b8;
  --footer-glass: rgba(255,255,255,0.08);
  --footer-glass-strong: rgba(255,255,255,0.14);
  --footer-border: 1px solid rgba(255,255,255,0.15);
  --footer-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.06);
}

.site-footer {
  backdrop-filter: blur(14px) saturate(140%);
  background: var(--footer-glass);
  border: var(--footer-border);
  box-shadow: var(--footer-shadow);
  border-radius: calc(var(--footer-radius) + 4px);
  padding: 30px 20px;
  margin-top: 40px;
  text-align: center;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 8px;
  padding: 30px 0;
  border-bottom: 1px solid var(--footer-border);
}

.footer-logo {
  margin-bottom: 15px;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-company h3 {
  background: linear-gradient(135deg, #FF004C, #884FFB, #00C2FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}

.footer-company p {
  color: var(--footer-muted);
  margin-bottom: 15px;
  line-height: 1.5;
}

.company-details {
  background: var(--footer-glass);
  border: var(--footer-border);
  border-radius: 12px;
  padding: 15px;
  font-size: 13px;
  line-height: 1.4;
}

.company-details p {
  margin-bottom: 4px;
  color: var(--footer-text);
}

.company-details p:first-child {
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-contact h4,
.footer-links h4 {
  color: var(--footer-text);
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
}

.contact-item {
  margin-bottom: 20px;
}

.contact-item div {
  flex: 1;
}

.contact-item strong {
  color: var(--footer-text);
  font-size: 14px;
}

.contact-item a {
  color: #884FFB;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.contact-item a:hover {
  border-bottom-color: #884FFB;
}

.foot-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.btn-foot {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  border: var(--footer-border);
  background: var(--footer-glass);
  text-decoration: none;
  color: var(--footer-text);
  box-shadow: var(--footer-shadow);
  transition: all 0.3s ease;
  text-align: center;
}

.btn-foot:hover {
  background: var(--footer-glass-strong);
  transform: translateY(-1px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
}

.foot-meta {
  color: var(--footer-muted);
  font-size: 14px;
  font-weight: 500;
}

/* Floating Cookie Button */
.cookie-float-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #884FFB, #00C2FF);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(136, 79, 251, 0.3);
  border: 2px solid rgba(255,255,255,0.2);
}

.cookie-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(136, 79, 251, 0.4);
}

.cookie-float-btn span {
  font-size: 20px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.cookie-float-btn:active {
  transform: scale(0.95);
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.95));
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(30,41,59,0.08);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 9999;
    padding: 20px;
    animation: slideUp 0.3s ease-out;
}

[data-theme="dark"] .cookie-banner {
    background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(15,23,42,0.95));
    border-top: 1px solid rgba(255,255,255,0.15);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.cookie-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.cookie-message h4 {
    color: var(--footer-text);
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.cookie-message p {
    color: var(--footer-muted);
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-banner-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cookie-btn-settings {
    background: transparent;
    color: var(--footer-muted);
    border: 1px solid rgba(30,41,59,0.15);
}

.cookie-btn-settings:hover {
    background: rgba(255,255,255,0.5);
    color: var(--footer-text);
}

.cookie-btn-reject {
    background: #FF6B6B;
    color: white;
}

.cookie-btn-reject:hover {
    background: #FF5252;
    transform: translateY(-1px);
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #00D47B, #00C2FF);
    color: white;
}

.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 123, 0.3);
}

/* Cookie Modal Styles */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.cookie-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(30,41,59,0.08);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

[data-theme="dark"] .cookie-modal-content {
    background: rgba(30,41,59,0.95);
    border: 1px solid rgba(255,255,255,0.15);
}

@keyframes modalSlideIn {
    from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.cookie-modal-header {
    padding: 20px 20px 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    color: var(--footer-text);
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--footer-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.cookie-modal-close:hover {
    background: rgba(255,255,255,0.5);
    color: var(--footer-text);
}

.cookie-modal-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.cookie-modal-body p {
    color: var(--footer-muted);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.cookie-modal-body a {
    color: #884FFB;
    text-decoration: none;
}

.cookie-modal-body a:hover {
    text-decoration: underline;
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-category {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(30,41,59,0.08);
    border-radius: 12px;
    padding: 15px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-category-info h4 {
    color: var(--footer-text);
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.cookie-category-info p {
    color: var(--footer-muted);
    margin: 0;
    font-size: 14px;
}

.cookie-toggle-modal {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-toggle-modal.active {
    background: #00D47B;
}

.cookie-toggle-modal.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle-switch {
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cookie-toggle-modal.active .cookie-toggle-switch {
    transform: translateX(20px);
}

.cookie-modal-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    border-top: 1px solid rgba(30,41,59,0.08);
    margin-top: 15px;
    padding-top: 15px;
}

.cookie-btn-primary {
    background: #884FFB;
    color: white;
}

.cookie-btn-primary:hover {
    background: #7B46F6;
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background: transparent;
    color: var(--footer-muted);
    border: 1px solid rgba(30,41,59,0.15);
}

.cookie-btn-secondary:hover {
    background: rgba(255,255,255,0.5);
    color: var(--footer-text);
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .site-footer {
        padding: 24px 16px;
        margin-top: 30px;
    }

    /* FIX: центрирование */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        justify-items: center;
        text-align: center;
    }

    .foot-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-foot {
        padding: 8px 14px;
        font-size: 14px;
    }

    .cookie-float-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
    }

    .cookie-float-btn span {
        font-size: 18px;
    }

    .cookie-banner {
        padding: 15px;
    }

    .cookie-banner-content {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }

    .cookie-banner-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }

    .cookie-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-modal-footer {
        flex-direction: column;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .site-footer {
        padding: 20px 12px;
        margin-top: 24px;
    }

    /* FIX: центрирование */
    .footer-content {
        gap: 25px;
        justify-items: center;
        text-align: center;
    }

    .foot-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .btn-foot {
        padding: 8px 16px;
        width: 160px;
        text-align: center;
    }

    .foot-meta {
        font-size: 13px;
    }

    .cookie-banner {
        padding: 12px;
    }

    .cookie-icon {
        font-size: 24px;
    }

    .cookie-message h4 {
        font-size: 14px;
    }

    .cookie-message p {
        font-size: 13px;
    }

    .cookie-btn {
        font-size: 13px;
        padding: 8px 14px;
    }
}
