/* Imports for animations */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Color Variables */
:root {
    --primary: #0055a4;
    --secondary: #00843d;
    --accent: #f9c300;
    --light: #f5f7fa;
    --dark: #2c3e50;
    --gray: #6c757d;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: -1;
}

.btn:hover::before {
    transform: translateX(0);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.section {
    padding: 5rem 0;
    position: relative;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-right.active {
    opacity: 1;
    transform: translateX(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-left.active {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

/* Header Styles */
header {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    position: relative;
    font-weight: 600;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: transform 0.3s ease;
}

.mobile-menu-btn:hover {
    transform: rotate(90deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6),
            rgba(0, 0, 0, 0.6)),
        url('../images/hero.jpeg') center/cover no-repeat;
    color: white;
    display: flex;
    align-items: center;
    text-align: center;
    margin-top: 72px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% {
        background: rgba(0, 0, 0, 0.4);
    }

    100% {
        background: rgba(0, 0, 0, 0.6);
    }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Animated Background Elements */
.animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    opacity: 0.05;
    border-radius: 50%;
    background: white;
}

.shape1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation: float 15s infinite alternate;
}

.shape2 {
    width: 300px;
    height: 300px;
    top: 60%;
    right: 5%;
    animation: float 20s infinite alternate-reverse;
}

.shape3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 20%;
    animation: float 12s infinite alternate;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(30px, 30px) rotate(180deg);
    }

    100% {
        transform: translate(-30px, 15px) rotate(360deg);
    }
}

/* Parallax Scrolling Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* About Section */
.about {
    background-color: var(--light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    position: relative;
}

.about-text h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 50px;
    height: 4px;
    background-color: var(--primary);
}

.about-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about-image:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.about-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Vision Section */
.vision {
    background-color: white;
    position: relative;
}

.vision::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/api/placeholder/1200/800') center/cover no-repeat;
    opacity: 0.05;
}

.vision-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.vision-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    position: relative;
}

.vision-content h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 50px;
    height: 4px;
    background-color: var(--primary);
}

.vision-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Values Section */
.values {
    background-color: var(--light);
}

.values h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark);
    position: relative;
}

.values h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 50px;
    height: 4px;
    background-color: var(--primary);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.value-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 85, 164, 0.1),
            transparent);
    transition: top 0.5s ease;
    z-index: -1;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.value-card:hover::before {
    top: 0;
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.value-card:hover .value-icon {
    transform: scale(1.2);
}

.value-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

/* Products Section */
.products {
    background-color: white;
}

.products h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark);
    position: relative;
}

.products h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 50px;
    height: 4px;
    background-color: var(--primary);
}

.product-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    position: relative;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.8),
            transparent);
    padding: 2rem;
    color: white;
    transform: translateY(70px);
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-card:hover .product-overlay {
    transform: translateY(0);
}

.product-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-overlay a {
    color: var(--accent);
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
    position: relative;
}

.product-overlay a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.product-overlay a:hover::after {
    width: 100%;
}

/* Saudi Vision 2030 Section */
.vision-2030 {
    background: linear-gradient(rgba(0, 85, 164, 0.9),
            rgba(0, 85, 164, 0.9)),
        url('/api/placeholder/1200/800') center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 4rem 0;
    position: relative;
    background-attachment: fixed;
}

.vision-2030 h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.vision-2030 h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 50px;
    height: 4px;
    background-color: white;
}

.vision-2030 p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 2rem auto;
    opacity: 0.9;
}

/* Contact Section */
.contact {
    background-color: var(--light);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(0, 85, 164, 0.05);
    top: -50px;
    left: -50px;
}

.contact::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(0, 132, 61, 0.05);
    bottom: -100px;
    right: -100px;
}

.contact h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark);
    position: relative;
}

.contact h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 50px;
    height: 4px;
    background-color: var(--primary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.contact-info {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.contact-person {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-person:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-person h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
    transition: transform 0.3s ease;
}

.contact-detail:hover {
    transform: translateX(5px);
}

.contact-icon {
    margin-right: 0.5rem;
    color: var(--primary);
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 85, 164, 0.1);
}

textarea.form-control {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
}

.footer-links li {
    margin-bottom: 0.8rem;
    transition: transform 0.3s ease;
}

.footer-links li:hover {
    transform: translateX(5px);
}

.footer-links a {
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scroll To Top Button */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease,
        transform 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Styles */
@media screen and (max-width: 992px) {

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }
}

@media screen and (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease;
        z-index: 1001;
    }

    .nav-links.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-btns {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Moving Particles Background */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

.particles-js-canvas-el {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.particles-js-canvas-el::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 85, 164, 0.1),
            rgba(0, 85, 164, 0.05));
    z-index: -1;
}

.particles-js-canvas-el::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top,
            rgba(0, 132, 61, 0.1),
            rgba(0, 132, 61, 0.05));
    z-index: -1;
}

/* Footer */
.alert {
    background-color: var(--accent);
    color: white;
    padding: 1rem;
    text-align: center;
    margin-bottom: 2rem;
    display: none;
}

.alert-success {
    background-color: var(--secondary);
}

/* Loader Styles */
#loader {
    display: none;
    /* Initially hidden */
    margin-top: 1rem;
    text-align: center;
}

#loader img {
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    /* Add a spinning animation */
}

/* Spinning animation for the loader */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}