:root {
    --primary-color: #002333;
    --accent-color: #C0823E;
    --text-color: #333;
    --light-text: #fff;
    --background: #f8f9fa;
    --footer-bg: #001A26;
    --transition: all 0.3s ease;
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Page transition effect */
body.page-enter {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations for sections */
.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
header {
    background: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    min-height: 90vh;
    background: linear-gradient(rgba(0, 35, 51, 0.75), rgba(0, 35, 51, 0.75)), url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--light-text);
    padding: 100px 0;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 3.8rem;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.2;
    word-wrap: break-word;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    line-height: 1.6;
    opacity: 0.95;
}

.hero-btns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-outline {
    white-space: nowrap;
}

.btn-primary {
    background-color: #0056b3;
    padding: 16px 35px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary:hover {
    background-color: #003d82;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    padding: 14px 35px;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

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

.btn {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 5px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #a06e33;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Sections General */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title .underline {
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0 auto;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-img img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

@media (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.service-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--light-text);
    padding: 60px 0 20px;
}

/* CTA Section */
.cta {
    padding: 100px 0;
    text-align: center;
    background-color: #fff;
}

.cta-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cta-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    background-color: var(--accent-color);
    padding: 18px 45px;
    font-size: 1.1rem;
}

.cta-btn i {
    margin-left: 10px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.footer-logo img {
    height: 50px;
    margin-bottom: 20px;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    opacity: 0.8;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--accent-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 10px 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: #fff;
        transition: 0.4s ease-in-out;
        z-index: 999;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }

    nav.active {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    nav ul li a {
        font-size: 1.2rem;
    }

    .hero {
        min-height: 70vh;
        padding: 60px 0;
        text-align: center;
        justify-content: center;
    }
    
    .hero-content {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero p {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    .hero-btns {
        justify-content: center;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-text {
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }
    
    .btn-primary,
    .btn-outline {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 12px 20px;
    }

    .cta-title {
        font-size: 1.6rem;
    }

    .cta-description {
        font-size: 0.95rem;
    }
    
    .logo img {
        height: 40px;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
}

/* About Page Hero */
.page-title {
    padding: 60px 0;
    color: white;
    text-align: center;
}

.about-hero {
    background: linear-gradient(rgba(0, 35, 51, 0.4), rgba(0, 35, 51, 0.4)), url('../images/Image de A propos..jpg');
    background-size: cover;
    background-position: center;
}

.page-title h1 {
    font-size: 3rem;
    font-weight: 800;
}

@media (max-width: 768px) {
    .page-title h1 {
        font-size: 2rem;
    }
}

/* Hero sections uniform height */
.services-hero,
.about-hero,
.research-hero,
.training-hero,
.page-title {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 100px 0;
}

.services-hero {
    background: linear-gradient(rgba(0, 35, 51, 0.4), rgba(0, 35, 51, 0.4)), url('../images/Images services..jpg') center/cover no-repeat;
}

.services-hero h1,
.about-hero h1,
.research-hero h1,
.training-hero h1,
.page-title h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.services-hero p,
.research-hero p,
.training-hero p {
    font-size: 1.3rem;
    max-width: 700px;
    opacity: 0.95;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .services-hero,
    .about-hero,
    .research-hero,
    .training-hero,
    .page-title {
        min-height: 300px;
        text-align: center;
        justify-content: center;
        padding: 60px 0;
    }
    
    .services-hero h1,
    .about-hero h1,
    .research-hero h1,
    .training-hero h1,
    .page-title h1 {
        font-size: 2.2rem;
    }
    
    .services-hero p,
    .research-hero p,
    .training-hero p {
        font-size: 1.1rem;
    }
}
