/* ===== Color Palette from Logo ===== */
:root {
    --primary-blue: #3B8FC4;
    --primary-gold: #F4B942;
    --primary-green: #2D7A4F;
    --light-blue: #A8D5E8;
    --white: #FFFFFF;
    --dark: #1a1a1a;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Alexandria', sans-serif;
    color: var(--dark);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.section-title {
    color: var(--primary-blue);
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gold), var(--primary-green));
    border-radius: 2px;
}

/* ===== Navigation ===== */
.navbar {
    transition: all 0.3s ease;
}

.navbar-brand h5 {
    color: var(--primary-blue);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-gold);
    transition: all 0.3s ease;
    transform: translateX(50%);
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue) !important;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.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 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}
.hero-section h6 {
    color: var(--white);
    font-weight: 600;
    font-size: 1.2rem;
}
.min-vh-75 {
    min-height: 75vh;
}

/* ===== Cards ===== */
.card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.service-card:hover,
.sector-card:hover,
.locality-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
}

/* ===== Icon Boxes ===== */
.icon-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.service-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.sector-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

/* ===== Locality Cards ===== */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.card-img-overlay-custom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    display: flex;
    align-items: flex-end;
}

.locality-card .card-img-top {
    transition: transform 0.3s ease;
}

.locality-card:hover .card-img-top {
    transform: scale(1.1);
}

/* ===== Buttons ===== */
.btn {
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #2d7aa8;
    border-color: #2d7aa8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 143, 196, 0.3);
}

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

.btn-warning:hover {
    background: #e0a730;
    border-color: #e0a730;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 185, 66, 0.3);
}

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

.btn-success:hover {
    background: #236339;
    border-color: #236339;
}

/* ===== Background Colors ===== */
.bg-primary {
    background-color: var(--primary-blue) !important;
}

.bg-success {
    background-color: var(--primary-green) !important;
}

.bg-warning {
    background-color: var(--primary-gold) !important;
}

.bg-primary-subtle {
    background-color: rgba(59, 143, 196, 0.1) !important;
}

.bg-success-subtle {
    background-color: rgba(45, 122, 79, 0.1) !important;
}

.bg-warning-subtle {
    background-color: rgba(244, 185, 66, 0.1) !important;
}

/* ===== Text Colors ===== */
.text-primary {
    color: var(--primary-blue) !important;
}

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

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

/* ===== News Cards ===== */
.news-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

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

.news-date {
    background: var(--primary-blue);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-block;
}

/* ===== Media Gallery ===== */
.media-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.media-item img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.media-item:hover img {
    transform: scale(1.1);
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-overlay i {
    font-size: 3rem;
    color: white;
}

/* ===== Footer ===== */
footer {
    background: linear-gradient(135deg, var(--dark) 0%, #2d2d2d 100%);
}

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

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

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-icon,
    .sector-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

/* ===== Loading Animation ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: var(--primary-gold);
    animation: spin 1s ease-in-out infinite;
}

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

/* ===== Language Toggle ===== */
[lang="en"] {
    direction: ltr !important;
}

[lang="ar"] {
    direction: rtl !important;
}
