/* Global Styles */
:root {
    --primary-color: #FF8800;
    /* Pure Orange */
    --secondary-color: linear-gradient(180deg, #FFF8E1 0%, #FFECB3 100%);
    /* Amber/Cream Gradient */
    --accent-color: #E65100;
    /* Darker Orange for hover */
    --text-color: #333333;
    --light-text: #666666;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, #FF8800 0%, #FFAA00 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background: var(--secondary-color);
}

.animate-slow {
    transition: all 2s ease-out !important;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

h1 {
    font-size: 4rem;
    color: var(--text-color);
}

h2 {
    font-size: 3rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.text-gradient {
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.4);
}

.btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.logo span {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.btn-primary {
    color: var(--white);
    padding: 10px 25px;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px auto;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 30px;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.hero-shape {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255, 102, 0, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
}

/* Services Section */
.services-detailed {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid #f0f0f0;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    transition: var(--transition);
}

.service-item:hover {
    background: var(--secondary-color);
    transform: translateX(10px);
}

.service-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
    background: rgba(255, 102, 0, 0.1);
    padding: 10px;
    border-radius: 50%;
}

.service-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.service-text p {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.portfolio-img {
    height: 250px;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.1);
}

.portfolio-info {
    padding: 20px;
    text-align: center;
}

.portfolio-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.portfolio-info p {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

/* About */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-content h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 20px;
}

.about-content p {
    color: var(--light-text);
    margin-bottom: 30px;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.stat-box {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--secondary-color);
}

.stat-box .count {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-box .label {
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* Contact Section */
.contact-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Wilayas Section */
.wilaya-tag {
    display: inline-block;
    padding: 10px 25px;
    background: var(--white);
    border: 1px solid rgba(255, 136, 0, 0.2);
    border-radius: 50px;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    font-size: 1rem;
}

.wilaya-tag:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 102, 0, 0.3);
}

/* Footer */
footer {
    background: #f9f9f9;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.footer-logo span {
    color: var(--primary-color);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--light-text);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.9rem;
}

/* Footer QR Code */
.footer-qrcode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-img {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    background: #fff;
    padding: 5px;
    box-shadow: var(--shadow);
}

.qr-buttons {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-sm:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .about-container {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 40px 0;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        transition: 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-btns {
        flex-direction: column;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .service-list {
        grid-template-columns: 1fr;
    }

    .services-detailed {
        padding: 20px;
    }
}

/* Detail Ball Animation */
.detail-ball {
    width: 250px;
    height: 250px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 60px auto 0;
    box-shadow: 0 15px 40px rgba(255, 136, 0, 0.4);
    padding: 30px;
    line-height: 1.3;
    /* Animation overrides */
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
    transition: all 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    /* Bouncy effect */
}

.detail-ball.is-visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

/* Bird Animation Hero */
@import url('https://fonts.googleapis.com/css?family=Arima+Madurai:300');

.bird-hero {
    z-index: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 35rem;
    /* Background removed */
    background: transparent;
    padding: 2rem;
    margin-top: 60px;
    /* Offset for fixed navbar */
}

.bird-hero h1 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    font-size: 4rem;
    letter-spacing: -3px;
    text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 3;
    text-align: center;
}

.bird {
    background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/174479/bird-cells-new.svg);
    background-size: auto 100%;
    width: 88px;
    height: 125px;
    will-change: background-position;
    animation-name: fly-cycle;
    animation-timing-function: steps(10);
    animation-iteration-count: infinite;
    filter: sepia(100%) saturate(500%) hue-rotate(-30deg);
    /* Make birds orange */
}

.bird--one {
    animation-duration: 1s;
    animation-delay: -0.5s;
}

.bird--two {
    animation-duration: 0.9s;
    animation-delay: -0.75s;
}

.bird--three {
    animation-duration: 1.25s;
    animation-delay: -0.25s;
}

.bird--four {
    animation-duration: 1.1s;
    animation-delay: -0.5s;
}

.bird-container {
    position: absolute;
    top: 20%;
    left: -10%;
    transform: scale(0) translateX(-10vw);
    will-change: transform;
    animation-name: fly-right-one;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.bird-container--one {
    animation-duration: 15s;
    animation-delay: 0;
}

.bird-container--two {
    animation-duration: 16s;
    animation-delay: 1s;
}

.bird-container--three {
    animation-duration: 14.6s;
    animation-delay: 9.5s;
}

.bird-container--four {
    animation-duration: 16s;
    animation-delay: 10.25s;
}

@keyframes fly-cycle {
    100% {
        background-position: -900px 0;
    }
}

@keyframes fly-right-one {
    0% {
        transform: scale(0.3) translateX(-10vw);
    }

    10% {
        transform: translateY(2vh) translateX(10vw) scale(0.4);
    }

    20% {
        transform: translateY(0vh) translateX(30vw) scale(0.5);
    }

    30% {
        transform: translateY(4vh) translateX(50vw) scale(0.6);
    }

    40% {
        transform: translateY(2vh) translateX(70vw) scale(0.6);
    }

    50% {
        transform: translateY(0vh) translateX(90vw) scale(0.6);
    }

    60% {
        transform: translateY(0vh) translateX(110vw) scale(0.6);
    }

    100% {
        transform: translateY(0vh) translateX(110vw) scale(0.6);
    }
}

@keyframes fly-right-two {
    0% {
        transform: translateY(-2vh) translateX(-10vw) scale(0.5);
    }

    10% {
        transform: translateY(0vh) translateX(10vw) scale(0.4);
    }

    20% {
        transform: translateY(-4vh) translateX(30vw) scale(0.6);
    }

    30% {
        transform: translateY(1vh) translateX(50vw) scale(0.45);
    }

    40% {
        transform: translateY(-2.5vh) translateX(70vw) scale(0.5);
    }

    50% {
        transform: translateY(0vh) translateX(90vw) scale(0.45);
    }

    51% {
        transform: translateY(0vh) translateX(110vw) scale(0.45);
    }

    100% {
        transform: translateY(0vh) translateX(110vw) scale(0.45);
    }
}

/* QR Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

#modal-qrcode {
    margin: 20px auto;
    display: flex;
    justify-content: center;
}

#modal-qrcode img {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 10px;
}

#qrcode-container {
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

#qrcode-container:hover {
    transform: scale(1.05);
}

/* Loading Screen */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-dots {
    display: flex;
    gap: 15px;
}

.loader-dots span {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loader-bounce 0.5s infinite alternate;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.1s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.2s;
}

#loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

@keyframes loader-bounce {
    to {
        transform: translateY(-20px);
        opacity: 0.7;
    }
}

/* Lifecycle Progress Bar */
.project-lifecycle {
    width: 100%;
    max-width: 500px;
    margin: 3rem auto 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.lifecycle-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.lifecycle-step-text {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.lifecycle-percentage {
    color: var(--light-text);
    font-size: 0.85rem;
}

.progress-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 136, 0, 0.15);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.3);
}

/* Dark Mode Styles */
body.dark-mode {
    --text-color: #f0f0f0;
    --light-text: #b0b0b0;
    --white: #1a1a1a;
    --secondary-color: linear-gradient(180deg, #2c2c2c 0%, #1f1f1f 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background-color: #121212;
}

body.dark-mode .navbar {
    background: rgba(18, 18, 18, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .nav-link {
    color: #f0f0f0;
}

body.dark-mode .services-detailed,
body.dark-mode .portfolio-item,
body.dark-mode .stat-box,
body.dark-mode .wilaya-tag {
    background: #252525;
    border-color: #333;
}

body.dark-mode .service-item:hover {
    background: #333;
}

body.dark-mode .project-lifecycle {
    background: rgba(30, 30, 30, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode footer {
    background: #0f0f0f;
    border-top: 1px solid #333;
}

/* Make sure birds remain visible */
body.dark-mode .bird {
    filter: sepia(100%) saturate(500%) hue-rotate(-30deg) brightness(1.2) drop-shadow(0 0 5px rgba(255, 136, 0, 0.5));
}

body.dark-mode .hero h1 {
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.8);
}

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: rotate(15deg);
}

body.dark-mode .theme-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}