/* ==========================================
   Mohamed Mostafa Platform - Main Stylesheet
   ========================================== */

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

:root {
    /* Dark Mode - Black & Gold Theme - Enhanced */
    --primary: #fbbf24;
    --secondary: #f59e0b;
    --accent: #fde68a;
    --dark: #0a0a0a;
    --darker: #000000;
    --bg-dark: #0f0f0f;
    --bg-darker: #050505;
    --card-dark: #151515;
    --card-darker: #0d0d0d;
    --light: #1a1a1a;
    --white: #ffffff;
    --text: #f5f5f5;
    --text-light: #b8b8b8;
    --text-muted: #888888;
    --border: #252525;
    --border-light: #2a2a2a;
    
    /* Professional Dark Gradients */
    --gradient-primary: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-accent: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
    --gradient-dark: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(251, 191, 36, 0.15) 0%, rgba(245, 158, 11, 0.15) 100%);
    --gradient-hover: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
    
    /* Dark Shadows with Gold Glow - Reduced */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 2px 4px -1px rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 8px -2px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 8px 16px -4px rgba(0, 0, 0, 0.5), 0 4px 8px -2px rgba(0, 0, 0, 0.3);
    --shadow-2xl: 0 12px 24px -6px rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 0 10px rgba(251, 191, 36, 0.15), 0 0 20px rgba(251, 191, 36, 0.05);
    --shadow-gold-lg: 0 0 15px rgba(251, 191, 36, 0.2), 0 0 30px rgba(251, 191, 36, 0.1);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--primary);
    color: var(--dark);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
}

h1 { font-size: 3.5rem; letter-spacing: -2px; }
h2 { font-size: 2.8rem; letter-spacing: -1.5px; }
h3 { font-size: 1.8rem; letter-spacing: -0.5px; }
h4 { font-size: 1.4rem; }

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

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

a:hover {
    color: var(--secondary);
}

/* Global Page Loader */
.page-loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    transform: translateY(-10px);
}

.page-loader.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.loader-content {
    text-align: center;
    color: var(--white);
    background: rgba(21, 21, 21, 0.95);
    padding: 2rem 3rem;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: var(--shadow-gold);
}

.loader-spinner {
    position: relative;
    width: 78px;
    height: 78px;
    margin: 0 auto 1.2rem auto;
}

.loader-spinner::before,
.loader-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #fbbf24;
    border-right-color: rgba(251, 191, 36, 0.4);
    border-left-color: rgba(251, 191, 36, 0.15);
    border-bottom-color: rgba(251, 191, 36, 0.05);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3), inset 0 0 12px rgba(251, 191, 36, 0.25);
    animation: loader-spin 1.2s linear infinite;
}

.loader-spinner::after {
    inset: 12px;
    border-width: 2px;
    border-top-color: rgba(251, 191, 36, 0.8);
    border-right-color: rgba(251, 191, 36, 0.3);
    border-left-color: rgba(251, 191, 36, 0.1);
    border-bottom-color: rgba(251, 191, 36, 0.05);
    animation-duration: 0.9s;
    animation-direction: reverse;
    filter: blur(0.2px);
}

.loader-content p {
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #fbbf24;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.4rem;
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.05);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Buttons */
.btn {
    padding: 0.9rem 2.2rem;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
    text-align: center;
}

/* Remove backgrounds from SVG icons in buttons */
.btn svg,
.btn svg *,
a svg,
a svg * {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--dark);
    box-shadow: var(--shadow-gold);
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold-lg);
    color: var(--dark);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: var(--dark);
    box-shadow: var(--shadow-gold);
    font-weight: 700;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-gold-lg);
    color: var(--dark);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-block svg {
    flex-shrink: 0;
}

/* Container */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==========================================
   FLOATING BUTTONS - Enhanced Design
   ========================================== */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 8px 35px rgba(37, 211, 102, 0.7);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
    stroke: #ffffff;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: var(--transition);
    z-index: 999;
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8), 0 0 0 10px rgba(37, 211, 102, 0.15);
    }
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.08);
    background: #25D366 !important;
    box-shadow: 0 8px 35px rgba(37, 211, 102, 0.7), 0 0 0 10px rgba(37, 211, 102, 0.2);
    animation: none;
    color: #ffffff;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
    transition: var(--transition);
}

.whatsapp-float:hover svg {
    fill: #ffffff !important;
}

.whatsapp-tooltip {
    position: absolute;
    left: -140px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--card-dark);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: var(--shadow-lg);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid var(--card-dark);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Responsive Floating Buttons */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }

    .whatsapp-float {
        bottom: 80px;
        right: 20px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

.container-fluid {
    width: 100%;
    padding: 0 15px;
}

/* Section Styling */
section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(65, 84, 241, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.section-title {
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(65, 84, 241, 0.3);
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.card-text {
    color: var(--text-light);
    line-height: 1.8;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation for Children */
.scroll-animate.animate-in:nth-child(1) {
    transition-delay: 0.1s;
}

.scroll-animate.animate-in:nth-child(2) {
    transition-delay: 0.2s;
}

.scroll-animate.animate-in:nth-child(3) {
    transition-delay: 0.3s;
}

.scroll-animate.animate-in:nth-child(4) {
    transition-delay: 0.4s;
}

.scroll-animate.animate-in:nth-child(5) {
    transition-delay: 0.5s;
}

.scroll-animate.animate-in:nth-child(6) {
    transition-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    z-index: 998;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse-whatsapp 2s ease-in-out infinite;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 10px 40px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.5);
    animation: none;
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background: var(--dark);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-md-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

/* Responsive */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.5rem; }
    
    section { padding: 60px 0; }
    
    .col-md-4,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.2rem; letter-spacing: -1.5px; }
    h2 { font-size: 1.8rem; }
    
    .btn {
        padding: 0.8rem 1.8rem;
        font-size: 0.9rem;
        justify-content: center;
        text-align: center;
    }
    
    .btn-block {
        padding: 0.9rem 1.5rem;
        width: 100%;
    }
    
    section { padding: 50px 0; }
}

/* Extra Small Mobile - 360px and below */
@media (max-width: 360px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .btn-block {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 70px;
        right: 15px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

