/* ==========================================
   YAF PBX - Custom Styles
   Advanced Call Center & VoIP Solutions
   ========================================== */

/* ==========================================
   CSS Variables (Light & Dark Mode)
   ========================================== */
:root {
    /* Brand Colors */
    --primary-navy: #1a2f4f;
    --primary-red: #dc2f3e;
    --accent-cyan: #00d9ff;

    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-navy) 0%, #2a4a6f 100%);
    --gradient-accent: linear-gradient(135deg, var(--primary-red) 0%, #ff4757 100%);
    --gradient-cyan: linear-gradient(135deg, #00d9ff 0%, #00b4d8 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(26, 47, 79, 0.95) 0%, rgba(42, 74, 111, 0.9) 100%);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 30px rgba(0, 217, 255, 0.3);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --bg-primary: #0a1929;
    --bg-secondary: #132f4c;
    --bg-tertiary: #1e3a5f;
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ==========================================
   Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .navbar-nav {
    margin-right: 0 !important;
    margin-left: auto !important;
}

/* ==========================================
   Navigation Bar
   ========================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .navbar {
    background: rgba(10, 25, 41, 0.95);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand .logo {
    height: 50px;
    transition: transform var(--transition-fast);
}

.navbar-brand .logo:hover {
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.nav-link:hover {
    color: var(--primary-red) !important;
}

/* Toggle Buttons */
.btn-toggle {
    background: var(--bg-secondary);
    border: none;
    border-radius: 50px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.btn-toggle:hover {
    background: var(--primary-red);
    color: white;
    transform: rotate(15deg) scale(1.1);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    position: relative;
    background: url('../images/hero-bg.jpg') center/cover no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    animation: fadeInDown 0.8s ease;
}

.hero-badge i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.text-gradient {
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    animation: fadeInUp 1.2s ease;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease;
}

.btn-primary {
    background: var(--gradient-accent);
    border: none;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(220, 47, 62, 0.4);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 50px;
    background: transparent;
    transition: all var(--transition-normal);
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-navy);
    transform: translateY(-3px);
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    font-size: 2.5rem;
    color: rgba(0, 217, 255, 0.3);
    animation: float 6s ease-in-out infinite;
}

.icon-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.icon-2 {
    top: 60%;
    left: 15%;
    animation-delay: 1s;
}

.icon-3 {
    top: 30%;
    right: 10%;
    animation-delay: 2s;
}

.icon-4 {
    top: 70%;
    right: 20%;
    animation-delay: 3s;
}

.icon-5 {
    top: 50%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: white;
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% {
        top: 10px;
        opacity: 1;
    }

    100% {
        top: 30px;
        opacity: 0;
    }
}

/* ==========================================
   Section Styling
   ========================================== */
section {
    padding: 5rem 0;
    position: relative;
}

.section-header {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ==========================================
   Features Section
   ========================================== */
.features-section {
    background: var(--bg-secondary);
}

.feature-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 2.5rem;
    height: 100%;
    display: flex;
    gap: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 217, 255, 0.1);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-cyan);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.feature-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: var(--gradient-cyan);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    transition: all var(--transition-normal);
}

.feature-card:hover .feature-icon {
    transform: rotate(360deg) scale(1.1);
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.feature-list i {
    color: var(--accent-cyan);
    font-size: 1.2rem;
}

/* ==========================================
   Solutions Section
   ========================================== */
.solutions-section {
    background: var(--bg-primary);
}

.solution-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    height: 100%;
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.solution-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
}

.solution-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    transition: all var(--transition-normal);
}

.solution-card:hover .solution-icon {
    transform: scale(1.15);
    box-shadow: 0 10px 30px rgba(220, 47, 62, 0.4);
}

.solution-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.solution-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Statistics */
.stat-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 15px;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--gradient-cyan);
    color: white;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-red);
    display: inline;
}

.stat-card:hover .stat-number {
    color: white;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-red);
    margin-left: 0.25rem;
}

.stat-card:hover .stat-suffix {
    color: white;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 500;
}

.stat-card:hover .stat-label {
    color: white;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-section {
    background: var(--bg-secondary);
}

.contact-info {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    height: 100%;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--bg-tertiary);
}

.contact-item:last-of-type {
    border-bottom: none;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-cyan);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    flex-shrink: 0;
}

.contact-details h5 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-details a,
.contact-details p {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.contact-details a:hover {
    color: var(--primary-red);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--gradient-accent);
    color: white;
    transform: translateY(-5px);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--bg-tertiary);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.1);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--bg-tertiary);
}

.footer-logo {
    height: 60px;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-title {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-red);
    transform: translateX(5px);
}

[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}

.footer-contact {
    list-style: none;
    padding: 0;
}

.footer-contact li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-divider {
    border-color: var(--bg-tertiary);
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .footer-social-links {
        justify-content: flex-end;
    }
}

/* ==========================================
   Back to Top Button
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(220, 47, 62, 0.5);
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .feature-card {
        flex-direction: column;
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-outline-light {
        width: 100%;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-gradient {
    background: var(--gradient-cyan);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.d-none {
    display: none !important;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
}

[data-theme="dark"] .alert-success {
    background: rgba(40, 167, 69, 0.2);
    color: #d4edda;
}

[data-theme="dark"] .alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #f8d7da;
}