/* ====================================
   BaytRics - Responsive Stylesheet
   Mobile-First Design
   ==================================== */

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

:root {
    --primary: #2563eb;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --accent: #10b981;
    --error: #ef4444;
}

/* ====================================
   Base Styles
   ==================================== */
body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    position: relative;
}

/* RTL Support for Arabic */
html[data-lang="ar"] {
    direction: rtl;
    font-family: 'Tajawal', 'Poppins', sans-serif;
}

html[data-lang="ar"] nav {
    direction: ltr;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: gradientShift 20s ease infinite;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
}

/* ====================================
   Header - Mobile First
   ==================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s ease;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

/* Language Selector - Dropdown Style */
.lang-selector {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.lang-toggle.active {
    background: rgba(255, 255, 255, 0.2);
}

.flag-icon {
    font-size: 1.2rem;
}

.lang-current {
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.chevron {
    transition: transform 0.3s ease;
}

.lang-toggle.active .chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.9rem;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-option.active {
    background: var(--primary);
}

.flag {
    font-size: 1.2rem;
}

/* ====================================
   Hero Section - Mobile First
   ==================================== */
.hero {
    min-height: 100vh;
    padding: 100px 0 2rem;
    position: relative;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease;
}

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

.tagline {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: fadeIn 1s ease 0.3s both;
}

.main-title {
    font-size: clamp(2.5rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.2s both;
}

.proverb {
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 300;
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.5;
    font-style: italic;
    animation: fadeInUp 1s ease 0.4s both;
    padding: 0 1rem;
}

.proverb::before,
.proverb::after {
    content: '"';
    font-size: 1.3em;
    color: var(--primary);
    opacity: 0.5;
}

/* ====================================
   Features Grid - Mobile First
   ==================================== */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
    padding: 0 1rem;
    animation: fadeInUp 1s ease 0.6s both;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
    .features {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.feature {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: white;
}

.feature p {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ====================================
   Newsletter - Mobile First
   ==================================== */
.newsletter {
    margin-top: 3rem;
    padding: 0 1rem;
    animation: fadeInUp 1s ease 0.8s both;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .newsletter-form {
        flex-direction: row;
    }
}

.email-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.email-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.email-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

.submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    white-space: nowrap;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.form-message {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    display: block;
}

.form-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    display: block;
}

/* ====================================
   Map Section
   ==================================== */
.map-section {
    padding: 4rem 0;
    background: rgba(15, 23, 42, 0.5);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #94a3b8;
}

.map-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

#map {
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.map-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* ====================================
   CRM Section
   ==================================== */
.crm-section {
    padding: 4rem 0;
}

.crm-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .crm-content {
        grid-template-columns: 1fr 1fr;
    }
}

.crm-text h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.crm-text p {
    color: #94a3b8;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.crm-features {
    list-style: none;
    space-y: 1rem;
}

.crm-features li {
    padding: 0.5rem 0;
    color: white;
}

/* Dashboard Preview */
.dashboard-preview {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dashboard-header {
    background: rgba(15, 23, 42, 0.8);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.dashboard-content {
    padding: 1.5rem;
}

.client-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.client-card:hover {
    background: rgba(255, 255, 255, 0.1);
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.client-info {
    flex: 1;
}

.client-info strong {
    display: block;
    color: white;
    margin-bottom: 0.25rem;
}

.client-info span {
    color: #94a3b8;
    font-size: 0.85rem;
}

/* ====================================
   Footer
   ==================================== */
footer {
    padding: 2rem 1rem;
    text-align: center;
    background: rgba(15, 23, 42, 0.9);
    font-size: 0.9rem;
    color: #64748b;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary);
}

.copyright {
    margin-left: auto;
}

/* ====================================
   Floating Elements
   ==================================== */
.float-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}

.float-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: -100px;
}

.float-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: -75px;
    animation-delay: 5s;
}

.float-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* ====================================
   Responsive Breakpoints
   ==================================== */

/* Tablet */
@media (min-width: 768px) {
    header {
        padding: 1.5rem 2rem;
    }
    
    .logo {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 2rem;
    }
    
    .hero {
        padding: 120px 0 3rem;
    }
    
    .tagline {
        font-size: 1.1rem;
    }
    
    .proverb {
        padding: 0;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    header {
        padding: 2rem 3rem;
    }
    
    .container {
        padding: 0 3rem;
    }
    
    .tagline {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }
    
    #map {
        height: 500px;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1280px;
    }
}