:root {
    --primary-color: #2F99AC;
    --secondary-color: #464854;
    --accent-color: #2EB09F;
    --light-accent: #53B891;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark: #212529;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--secondary-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--secondary-color);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background-color: var(--white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 800;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

/* Buttons */
.btn {
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 176, 159, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(47, 153, 172, 0.1) 0%, rgba(83, 184, 145, 0.1) 100%);
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/hero-bg.png') no-repeat center/cover;
    opacity: 0.05;
    z-index: 0;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* RTL Support */
[dir="rtl"] .section-title::after {
    left: auto;
    right: 0;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 767.98px) {
    .hero {
        padding: 5rem 0 4rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section {
        padding: 3rem 0;
    }
}

/* Custom Utility Classes */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

/* Form Controls */
.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(46, 176, 159, 0.25);
}

/* Alert Messages */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Hero Right Content Styling */
.hero-right-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.logo-agents-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 100%;
}

.logo-section {
    flex-shrink: 0;
    text-align: center;
}

.hero-logo {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.hero-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.15));
}

.agents-section {
    flex: 1;
}

/* Enhanced Agents Grid Styling */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.agent-item {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.agent-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, var(--accent-color), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 13px;
}

.agent-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.15),
        0 0 0 3px rgba(46, 176, 159, 0.1);
    border-color: var(--accent-color);
}

.agent-item:hover::before {
    opacity: 0.05;
}

.agent-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
    filter: grayscale(20%);
}

.agent-item:hover .agent-img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

/* Responsive adjustments for agents */
@media (max-width: 767.98px) {
    .logo-agents-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-logo {
        max-width: 120px;
    }

    .agents-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
        padding: 0.8rem;
    }

    .agent-item {
        height: 100px;
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .agents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }

    .agent-item {
        height: 90px;
        padding: 0.8rem;
    }
}
