:root {
    --primary-red: #DC143C;
    --dark-red: #B91C1C;
    --light-red: #EF4444;
    --black: #000000;
    --dark-gray: #1F1F1F;
    --light-gray: #F8F9FA;
    --white: #FFFFFF;
    --text-dark: #2D3748;
    --text-light: #718096;
    --border-color: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    padding-top: 76px; /* Fixed navbar height */
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .navbar-nav {
    text-align: right;
}

[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--black) 100%);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 76px; /* Fixed navbar height */
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-red) !important;
    text-decoration: none;
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-red) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-red);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
    left: 10%;
}

/* Language Selector */
.language-selector .dropdown-toggle {
    background: var(--primary-red);
    border: none;
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-selector .dropdown-toggle:hover {
    background: var(--dark-red);
    transform: translateY(-1px);
}

.language-selector .dropdown-menu {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    min-width: 120px;
}

.language-selector .dropdown-item {
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.language-selector .dropdown-item:hover {
    background: var(--light-gray);
    color: var(--primary-red);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--black) 50%, var(--dark-red) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin-top: 0; /* Removed extra margin - using body padding instead */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(220,20,60,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--white), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 20, 60, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    background: transparent;
    transition: all 0.3s ease;
}

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

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    background: var(--white);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border: none;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--dark-gray);
    font-weight: 700;
    margin-bottom: 1rem;
}

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

/* Service Cards */
.service-card {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    background: var(--white);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(220, 20, 60, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

/* Partner Cards */
.partner-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.partner-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.partner-logo {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
}

/* Tool Cards */
.tool-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
}

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

.tool-badge {
    display: inline-block;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
    display: block;
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--black) 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer h5 {
    color: var(--primary-red);
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Form Styles */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

/* Admin Styles */
.admin-sidebar {
    background: linear-gradient(180deg, var(--dark-gray) 0%, var(--black) 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.admin-nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(220, 20, 60, 0.1);
    border-left-color: var(--primary-red);
    color: var(--white);
}

.admin-content {
    padding: 2rem;
}

.stats-card {
    background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.stats-number {
    font-size: 3rem;
    font-weight: 800;
    display: block;
}

.stats-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Rich Text Editor */
.ql-toolbar {
    border: 2px solid var(--border-color);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.ql-container {
    border: 2px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 10px 10px;
    font-size: 1rem;
}

.ql-editor {
    min-height: 200px;
}

/* AI Assistant */
.ai-assistant {
    background: linear-gradient(45deg, var(--primary-red), var(--dark-red));
    color: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.ai-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin: 0.25rem;
    transition: all 0.3s ease;
}

.ai-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.6s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .navbar-nav .nav-link::after {
    right: 50%;
    left: auto;
}

[dir="rtl"] .navbar-nav .nav-link:hover::after {
    right: 10%;
}

[dir="rtl"] .section-title::after {
    margin: 1rem auto 0;
}

[dir="rtl"] .hero-section {
    margin-top: 0;
    padding-top: 2rem;
}

[dir="rtl"] .container {
    padding-right: 15px;
    padding-left: 15px;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
button:focus,
.btn:focus,
.form-control:focus,
a:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Social Media Links */
.social-links a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: color 0.3s;
    text-decoration: none;
    display: inline-block;
    min-width: 40px;
    min-height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    margin-right: 1rem;
}

.social-links a:hover {
    color: var(--primary-red);
    background: rgba(255, 255, 255, 0.2);
}

/* Fallback text when Font Awesome fails to load */
.social-links a:before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 1;
}

.social-links a[title="LinkedIn"]:before {
    content: "LI";
}

.social-links a[title="Instagram"]:before {
    content: "IG";
}

.social-links a[title="Facebook"]:before {
    content: "FB";
}

.social-links a[title="WhatsApp"]:before {
    content: "WA";
}

/* Hide fallback when Font Awesome icons load properly */
.social-links a i {
    position: relative;
    z-index: 2;
}

/* When Font Awesome loads, the icon will be visible and cover the text */
.social-links a:has(i.fab) {
    font-size: 1.5rem;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-red: #FF0000;
        --dark-red: #CC0000;
        --text-light: #000000;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
