/* 
  FORTRESS SECURITY EDITORIAL - CMS DESIGN SYSTEM
  Consolidated CSS for Frontend & Admin
*/

:root {
    --primary: #bb000f;
    --primary-dim: #ffb4aa;
    --secondary: #994600;
    --surface: #f9f9f9;
    --on-surface: #1a1c1c;
    --surface-container: #eeeeee;
    --surface-low: #f3f3f3;
    --outline: #926e6a;
    --brand-gradient: linear-gradient(135deg, #EE2323 0%, #F4802E 100%);
}

/* Material Symbols Setup */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Custom Design Tokens */
.brand-gradient {
    background: var(--brand-gradient);
}

.glass-nav {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Animations */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

#mobile-menu {
    background-color: #ffffff;
}

.dark #mobile-menu {
    background-color: #09090b;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
    font-family: 'Inter', sans-serif;
}

[dir="rtl"] .font-headline {
    letter-spacing: normal;
}

/* -------------------------------------
   CMS EDITOR OVERLAYS (Admin Mode)
-------------------------------------- */
[msgid], [imgid], [vidid] {
    position: relative;
    outline: 2px dashed rgba(238, 35, 35, 0);
    transition: all 0.2s;
}

[msgid]:hover, [imgid]:hover, [vidid]:hover {
    outline: 2px dashed rgba(238, 35, 35, 0.4);
    background: rgba(238, 35, 35, 0.05);
    cursor: context-menu;
}

#popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
}

#editor-popup {
    position: fixed;
    top: 50%; left: 50%; width: 450px;
    transform: translate(-50%, -50%) scale(0.9);
    background: #1a1c1c;
    color: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #333;
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
}

#editor-popup.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.popup-header h3 {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 12px;
    color: #EE2323;
}

.close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    cursor: pointer;
}

.form-group label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 10px;
    font-weight: 800;
}

textarea, .content-input {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 20px;
}

.save-btn {
    width: 100%;
    background: var(--brand-gradient);
    border: none;
    padding: 15px;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s;
}

.save-btn:hover {
    transform: scale(1.02);
}

/* -------------------------------------
   ADMIN DASHBOARD
-------------------------------------- */
body.admin-body {
    background: #000;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-navbar {
    background: #09090b;
    padding: 1rem 2rem;
    border-bottom: 1px solid #1f1f23;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 100;
}

@media (max-width: 768px) {
    .admin-navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
}

.admin-navbar h1 {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.admin-nav-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .admin-nav-actions {
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
}

#lang-select {
    background: #18181b;
    border: 1px solid #27272a;
    color: #e4e4e7;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

#lang-select:hover {
    border-color: #3f3f46;
}

.btn-view, .btn-logout {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-view {
    background: #222;
    color: #fff;
    border: 1px solid #333;
}

.btn-view:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.btn-logout {
    background: rgba(238,35,35,0.1);
    border: 1px solid rgba(238,35,35,0.2);
    color: #EE2323;
}

.btn-logout:hover {
    background: rgba(238,35,35,0.2);
    border-color: rgba(238,35,35,0.4);
    transform: translateY(-2px);
}

#editor-frame {
    flex: 1;
    border: none;
    background: #fff;
}

/* -------------------------------------
   LOGIN CARD
-------------------------------------- */
body.login-body {
    background: #000;
    color: white;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #111;
    padding: 50px;
    border-radius: 30px;
    border: 1px solid #222;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h2 {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 32px;
    margin-bottom: 30px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-control {
    width: 100%;
    background: #000;
    border: 1px solid #222;
    padding: 15px;
    border-radius: 12px;
    color: #fff;
    margin-bottom: 15px;
    font-family: inherit;
}

.error-msg {
    color: #EE2323;
    font-size: 13px;
    margin-bottom: 20px;
}

/* --- Partners Marquee --- */
.partners-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 3rem 0;
}

.partners-marquee::before,
.partners-marquee::after {
    position: absolute;
    top: 0;
    width: 250px;
    height: 100%;
    content: "";
    z-index: 2;
}

.partners-marquee::before {
    left: 0;
    background: linear-gradient(to right, white 0%, transparent 100%);
}

.partners-marquee::after {
    right: 0;
    background: linear-gradient(to left, white 0%, transparent 100%);
}

.dark .partners-marquee::before {
    background: linear-gradient(to right, #09090b 0%, transparent 100%);
}

.dark .partners-marquee::after {
    background: linear-gradient(to left, #09090b 0%, transparent 100%);
}

.marquee-content {
    display: inline-flex;
    align-items: center;
    gap: 5rem;
    animation: marquee 30s linear infinite;
}

.marquee-item {
    flex-shrink: 0;
    height: 4rem;
    width: auto;
    filter: grayscale(1) opacity(0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.marquee-item:hover {
    filter: grayscale(0) opacity(1);
    transform: scale(1.1);
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- Partners Grid Update --- */
.partners-grid-wrapper {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #bb000f transparent;
}

.partners-grid-wrapper::-webkit-scrollbar {
    width: 6px;
}

.partners-grid-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.partners-grid-wrapper::-webkit-scrollbar-thumb {
    background: #bb000f;
    border-radius: 10px;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
}

.partner-card {
    flex: 0 0 calc(100% - 2rem);
    max-width: 280px;
    aspect-ratio: 3/2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1.5rem;
    transition: all 0.4s ease;
}

@media (min-width: 640px) {
    .partner-card {
        flex: 0 0 calc(50% - 2rem);
    }
}

@media (min-width: 1024px) {
    .partner-card {
        flex: 0 0 calc(25% - 2rem);
    }
}

.partner-card:hover {
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
    transform: translateY(-5px);
}

.dark .partner-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.partner-card img {
    max-height: 100%;
    max-width: 100%;
    object-contain: contain;
    filter: grayscale(1) opacity(0.5);
    transition: all 0.4s ease;
}

.partner-card:hover img {
    filter: grayscale(0) opacity(1);
}
