/* ===================================
   Skyline Soft L.L.C - Global Styles
   =================================== */

:root {
    --skyline-dark: #060b16;
    --skyline-accent: #64B5F6;
    --skyline-gold: #c5a059;
    --skyline-glass: rgba(255, 255, 255, 0.03);
    --skyline-deep: #050c18;
}

/* ===== Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--skyline-dark);
    color: #fff;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* English font when LTR */
html[dir="ltr"] body {
    font-family: 'Inter', 'Cairo', sans-serif;
}

/* ===== Background Grid ===== */
.bg-grid {
    background-image: linear-gradient(to right, rgba(100, 181, 246, 0.05) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(100, 181, 246, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--skyline-dark); }
::-webkit-scrollbar-thumb { background: var(--skyline-accent); border-radius: 10px; }

/* ===== Glass Panel ===== */
.glass-panel {
    background: var(--skyline-glass);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-panel:hover {
    border-color: var(--skyline-accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(100, 181, 246, 0.1);
}

/* ===== Gradient Heading ===== */
.gradient-heading {
    background: linear-gradient(135deg, #fff 30%, var(--skyline-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Gradient Text Animation ===== */
.gradient-text {
    background: linear-gradient(90deg, #fff, var(--skyline-accent), #fff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* ===== Nav Links ===== */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--skyline-accent);
    transition: width 0.3s ease;
}

html[dir="ltr"] .nav-link::after {
    right: auto;
    left: 0;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--skyline-accent) !important;
}

/* ===== Blob Background Effect ===== */
.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(100, 181, 246, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(50px);
    pointer-events: none;
}

/* ===== Floating Animation ===== */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ===== Hosting Period Toggle ===== */
.hosting-period-btn {
    cursor: pointer;
}

.active-period {
    background: var(--skyline-accent);
    color: #000 !important;
    font-weight: 800;
}

/* ===== Price Cards ===== */
.price-card-popular {
    border: 2px solid var(--skyline-accent);
    position: relative;
}

.price-card-popular::before {
    content: "الأكثر شيوعاً";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--skyline-accent);
    color: #000;
    padding: 2px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

html[dir="ltr"] .price-card-popular::before {
    content: "Most Popular";
}

/* ===== Subsidiary Cards ===== */
.subsidiary-card {
    overflow: hidden;
    position: relative;
}

.subsidiary-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(100, 181, 246, 0.1));
    pointer-events: none;
}

/* ===== Tech Badges ===== */
.tech-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(100, 181, 246, 0.05);
    border: 1px solid rgba(100, 181, 246, 0.2);
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    color: var(--skyline-accent);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: var(--skyline-accent);
    color: #000;
    transform: translateY(-3px);
}

/* ===== Loading Spinner ===== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(100, 181, 246, 0.1);
    border-top-color: var(--skyline-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Loading Bar ===== */
.loading-bar {
    animation: loadingBar 1.5s ease-in-out infinite;
}

@keyframes loadingBar {
    0% { width: 0%; margin-left: 0; }
    50% { width: 70%; margin-left: 15%; }
    100% { width: 0%; margin-left: 100%; }
}

/* ===== Page Transition ===== */
#app-content {
    opacity: 1;
    transform: translateY(0);
}

/* ===== AOS Override for SPA =====
   AOS CSS hides [data-aos] elements with opacity:0.
   For dynamically loaded SPA content, we need to override this
   until AOS has properly initialized and detected the elements. */
#app-content [data-aos]:not(.aos-init) {
    opacity: 1 !important;
    transform: none !important;
}

/* ===== Form Styles ===== */
input:focus, textarea:focus {
    outline: none;
    border-color: var(--skyline-accent) !important;
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

/* ===== Success / Error Messages ===== */
.form-success {
    background: rgba(100, 181, 246, 0.1);
    border: 1px solid var(--skyline-accent);
    color: var(--skyline-accent);
}

.form-error {
    background: rgba(255, 60, 60, 0.1);
    border: 1px solid #ff3c3c;
    color: #ff3c3c;
}

/* ===== Line Clamp ===== */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .text-8xl { font-size: 3rem !important; }
    .text-7xl { font-size: 2.5rem !important; }
    .text-6xl { font-size: 2.25rem !important; }
    .text-5xl { font-size: 2rem !important; }
}

/* ===== Navbar scroll effect ===== */
.nav-scrolled {
    background: rgba(6, 11, 22, 0.95) !important;
    border-bottom-color: rgba(100, 181, 246, 0.15) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Button Hover Effects ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: white;
    transition: all 0.4s ease;
    z-index: -1;
}

html[dir="ltr"] .btn-primary::before {
    right: auto;
    left: -100%;
}

.btn-primary:hover::before { right: 0; }
html[dir="ltr"] .btn-primary:hover::before { left: 0; right: auto; }
.btn-primary:hover { color: black; }

/* ===== Language Toggle ===== */
#lang-toggle {
    transition: all 0.3s ease;
}

#lang-toggle:hover {
    background: rgba(100, 181, 246, 0.1);
    border-color: var(--skyline-accent);
}

/* ===== RTL-specific arrow icon flip ===== */
html[dir="ltr"] .rtl-icon.fa-arrow-left {
    transform: scaleX(-1);
}

/* ===== LTR text alignment adjustments ===== */
html[dir="ltr"] .text-right {
    text-align: left;
}

/* ===== Logical spacing ===== */
/* Use margin-inline-start/end for icons next to text */
.me-2 {
    margin-inline-end: 0.5rem;
}

.ms-2 {
    margin-inline-start: 0.5rem;
}
