/* ==========================================================================
   Base Styles & Variables
   ========================================================================== */
:root {
    /* Main Color Palette - Premium Contrast */
    --primary-bg: #0a0f1c; /* Deep Dark Blue / Black */
    --secondary-bg: #111827; /* Slightly lighter dark */
    --light-bg: #f8fafc; /* Crisp clean white/gray for sections */
    --white: #ffffff;
    
    /* Accents */
    --electric-blue: #00e5ff;
    --neon-orange: #ff5a00;
    
    /* Legacy / Compatibility Colors used in index.php */
    --primary-color: #0a0f1c; 
    --secondary-color: #00e5ff;
    --accent-color: #ff5a00;
    
    /* Text Colors */
    --text-dark: #1e293b;
    --text-light: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Typography */
    --font-main: 'Cairo', sans-serif;
    
    /* Shadows & Effects */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.1);
    --glow-blue: 0 0 20px rgba(0, 229, 255, 0.5);
    --glow-orange: 0 0 20px rgba(255, 90, 0, 0.5);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 85%; /* Default mobile size (scales everything down) */
    overflow-x: hidden;
    max-width: 100%;
}

/* Global Responsive Scaling */
@media (min-width: 768px) {
    html {
        font-size: 90%; /* Tablets / small laptops - fixes the "zoomed in" feeling */
    }
}

@media (min-width: 1200px) {
    html {
        font-size: 92%; /* Large desktops - elegant, not overly massive */
    }
}

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

body {
    font-family: var(--font-main);
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px dashed var(--electric-blue);
    outline-offset: 4px;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.3;
}

.text-gradient {
    background: linear-gradient(90deg, var(--electric-blue), var(--neon-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
    color: var(--primary-bg);
}

.section-title.dark {
    color: var(--white);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--electric-blue), var(--neon-orange));
    border-radius: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--electric-blue), #0099ff);
    color: var(--primary-bg);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--glow-blue);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--neon-orange), #cc4800);
    z-index: -1;
    transition: var(--transition);
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--glow-orange);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--electric-blue);
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    background: var(--electric-blue);
    color: var(--primary-bg);
    box-shadow: var(--glow-blue);
    transform: translateY(-3px);
}

/* ==========================================================================
   Header & Navbar (Professional)
   ========================================================================== */
.header {
    background: rgba(10, 15, 28, 0.85); /* Dark solidish background to not clash with hero */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-card);
    border-bottom: none;
}

.header.scrolled .nav-links a { color: var(--primary-bg); font-weight: 700; }
.header.scrolled .logo h1 { color: var(--primary-bg); }
.header.scrolled .mobile-menu-btn { color: var(--primary-bg); }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 85px;
}

.logo {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.logo-img-container {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-blue);
    background: #0a0f1c; /* Match generated logo bg perfectly */
}

.logo img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.logo h1 {
    font-size: 2rem;
    margin: 0;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: var(--white);
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.header.scrolled .logo h1 {
    text-shadow: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--white);
    position: relative;
    padding: 0.5rem 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.nav-links a.btn-primary {
    color: var(--primary-bg) !important;
    text-shadow: none !important;
    padding: 0.8rem 2rem;
}

.header.scrolled .nav-links a {
    text-shadow: none;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -2px;
    right: 0;
    background: var(--electric-blue);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
    left: 0;
}

.nav-links a:not(.btn-primary):hover {
    color: var(--electric-blue) !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

/* ==========================================================================
   Hero & Particles
   ========================================================================== */
.hero-wrapper {
    position: relative;
    width: 100%;
    background-color: var(--primary-bg);
    overflow: hidden;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: center;
}

/* Page specific Hero variations */
.page-hero {
    padding: 10rem 0 6rem; /* Extra padding top for header */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(10,15,28,0.8) 0%, rgba(10,15,28,0.5) 100%);
    z-index: 1;
}
.page-hero .hero-content { z-index: 2; }

/* ==========================================================================
   Cards & Layouts
   ========================================================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: 1px solid rgba(0, 229, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, var(--electric-blue), var(--neon-orange));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
}

.glass-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glow-blue);
}

/* Shape Dividers */
.custom-shape-divider-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
    z-index: 3;
}
.custom-shape-divider-bottom svg { display: block; width: calc(100% + 1.3px); height: 80px; }
.custom-shape-divider-bottom .shape-fill { fill: var(--light-bg); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--primary-bg);
    color: var(--text-light);
    padding: 5rem 0 0;
    position: relative;
    border-top: 5px solid var(--electric-blue);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer h3::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 50px; height: 3px;
    background: var(--neon-orange);
}

.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--electric-blue); padding-right: 8px; }

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
}

.social-icons a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.social-icons a:hover {
    background: var(--electric-blue);
    box-shadow: var(--glow-blue);
    transform: translateY(-3px);
    color: var(--primary-bg);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.8rem;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
}
.newsletter-input:focus { outline: 1px solid var(--electric-blue); }

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    background: var(--secondary-bg);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .section-title { font-size: 2.2rem; }
    
    .mobile-menu-btn { display: block; }
    
    .logo h1 { font-size: 1.5rem; letter-spacing: 1px; }
    .logo-img-container { width: 40px; height: 40px; }
    
    .nav-links {
        position: fixed;
        top: 85px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 85px);
        background: rgba(10, 15, 28, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active { right: 0; }
    .nav-links a { color: var(--white) !important; font-size: 1.5rem; text-shadow: none; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    
    .mobile-reverse { display: flex; flex-direction: column-reverse; }
}

/* ==========================================================================
   Floating Action Buttons
   ========================================================================== */
.floating-btn {
    position: fixed;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    animation: pulse-animation 2s infinite;
}

.floating-btn:hover {
    transform: scale(1.1);
    animation: none;
    color: white;
}

.whatsapp-btn {
    right: 30px;
    background-color: #25D366;
}

.whatsapp-btn:hover {
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.6);
}

.phone-btn {
    left: 30px;
    background-color: var(--electric-blue);
    color: var(--primary-bg);
}

.phone-btn:hover {
    box-shadow: var(--glow-blue);
    color: var(--primary-bg);
}

@keyframes pulse-animation {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,0,0, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(0,0,0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0,0,0, 0); }
}
