/* ============================================================
   EcoSafe Footer Plugin - Front-end Styles
   All rules are namespaced under .ecosafe-footer-container
   ============================================================ */

.ecosafe-footer-container,
.ecosafe-footer-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ecosafe-footer-container {
    background: var(--ecosafe-footer-bg, linear-gradient(135deg, #0a0e13 0%, #132443 40%, #0d1117 100%));
    position: relative;
    overflow: hidden;
    direction: rtl;
    --primary: #d74c50;
    --primary-rgb: 215, 76, 80;
    width: 100%;
    margin: 0 auto;
}

.ecosafe-footer-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(var(--primary-rgb), 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(44, 82, 130, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(var(--primary-rgb), 0.04) 0%, transparent 60%),
        linear-gradient(180deg, rgba(10,14,19,.3) 0%, transparent 50%, rgba(var(--primary-rgb),.02) 100%);
    pointer-events: none;
}

.ecosafe-footer-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(var(--primary-rgb), 0.3) 50%, transparent 100%);
    pointer-events: none;
}

.ecosafe-footer-container .footer-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 30px;
}

/* ── Header ─────────────────────────────────────────── */
.ecosafe-footer-container .footer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid rgba(215, 76, 80, 0.25);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease;
}

.ecosafe-footer-container .brand-section  { flex: 1; max-width: 500px; }

.ecosafe-footer-container .brand-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
    filter: brightness(1.1);
}

.ecosafe-footer-container .brand-description {
    color: rgba(255,255,255,.9);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* ── Social ──────────────────────────────────────────── */
.ecosafe-footer-container .social-section { display: flex; gap: 12px; }

.ecosafe-footer-container .social-link {
    width: 44px; height: 44px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(var(--primary-rgb), .2);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(.4,0,.2,1);
    backdrop-filter: blur(10px);
    position: relative; overflow: hidden;
}
.ecosafe-footer-container .social-link::before {
    content: '';
    position: absolute; top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb),.1), transparent);
    transition: left .5s ease;
}
.ecosafe-footer-container .social-link:hover::before { left: 100%; }
.ecosafe-footer-container .social-link:hover {
    background: rgba(var(--primary-rgb), .1);
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(233,104,82,.2);
}
.ecosafe-footer-container .social-link svg {
    width: 18px; height: 18px; fill: #ffffff; transition: fill .3s ease;
}
.ecosafe-footer-container .social-link:hover svg { fill: var(--primary); }

/* ── Contact items ───────────────────────────────────── */
.ecosafe-footer-container .contact-section,
.ecosafe-footer-container .contact-list { display: flex; flex-direction: column; gap: 12px; }

.ecosafe-footer-container .contact-item {
    display: flex; align-items: center; gap: 10px;
    color: rgba(255,255,255,.9);
    font-size: .95rem;
    text-decoration: none;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(var(--primary-rgb), .15);
    backdrop-filter: blur(10px);
}
.ecosafe-footer-container .contact-item:hover {
    color: #ffffff;
    background: rgba(var(--primary-rgb), .08);
    border-color: rgba(var(--primary-rgb), .4);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(233,104,82,.1);
}
.ecosafe-footer-container .contact-item svg {
    width: 16px; height: 16px; fill: var(--primary); flex-shrink: 0;
}
.ecosafe-footer-container .contact-item img {
    width: 16px; height: 16px; object-fit: contain; flex-shrink: 0;
}

/* ── Main grid ───────────────────────────────────────── */
.ecosafe-footer-container .footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 40px;
    margin-bottom: 35px;
    opacity: 1; transform: translateY(0); transition: all .6s ease;
}

.ecosafe-footer-container .footer-column h3 {
    color: var(--primary);
    font-size: 1.1rem; font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase; letter-spacing: .5px;
    position: relative;
}
.ecosafe-footer-container .footer-column h3::after {
    content: '';
    position: absolute; bottom: -5px; right: 0;
    width: 30px; height: 2px;
    background: var(--primary); border-radius: 1px;
}

.ecosafe-footer-container .footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ecosafe-footer-container .footer-links a {
    color: rgba(255,255,255,.85); text-decoration: none;
    font-size: .9rem; transition: all .3s ease; padding: 4px 0;
}
.ecosafe-footer-container .footer-links a:hover { color: var(--primary); padding-right: 10px; }

/* ── Footer bottom ───────────────────────────────────── */
.ecosafe-footer-container .footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 25px;
    border-top: 1px solid rgba(var(--primary-rgb), .25);
    opacity: 1; transform: translateY(0); transition: all .6s ease;
}
.ecosafe-footer-container .copyright { color: rgba(255,255,255,.7); font-size: .85rem; }
.ecosafe-footer-container .footer-legal { display: flex; gap: 20px; }
.ecosafe-footer-container .footer-legal a {
    color: rgba(255,255,255,.7); text-decoration: none;
    font-size: .85rem; transition: color .3s ease;
}
.ecosafe-footer-container .footer-legal a:hover { color: var(--primary); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1024px) {
    .ecosafe-footer-container .footer-main { grid-template-columns: 1fr 1fr; gap: 30px; }
    .ecosafe-footer-container .footer-main .footer-column:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .ecosafe-footer-container .footer-container { padding: 30px 15px 25px; }
    .ecosafe-footer-container .footer-header { flex-direction: column; gap: 20px; text-align: center; }
    .ecosafe-footer-container .footer-main { grid-template-columns: 1fr; gap: 25px; }
    .ecosafe-footer-container .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    .ecosafe-footer-container .footer-legal { flex-wrap: wrap; justify-content: center; gap: 15px; }
}

@media (max-width: 480px) {
    .ecosafe-footer-container .brand-logo { max-width: 160px; }
    .ecosafe-footer-container .social-link { width: 38px; height: 38px; }
}
