/* main.css - Core styles used across all pages */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Jost', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
    position: relative;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #717578;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5d6063;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: #717578;
}

/* Selection */
::selection {
    background: rgba(113, 117, 120, 0.3);
    color: #333;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 1.2rem 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

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

.navbar-brand {
    position: relative;
    z-index: 1001;
}

.navbar-brand img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-item {
    margin-left: 2.5rem;
}

.nav-link {
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    letter-spacing: 0.5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #717578;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 10px;
}

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

.nav-link.active {
    font-weight: 600;
    color: #717578 !important;
}

/* Hamburger Menu - Enhanced */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    position: absolute;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 2px;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 9px;
    width: 80%;
    right: 0;
}

.hamburger span:nth-child(3) {
    top: 18px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Footer - Enhanced */
.footer {
    background-color: #f8f9fa;
    padding: 4rem 0 1.5rem;
    margin-top: 5rem;
    border-top: 1px solid #eee;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #717578, #a4a7aa, #717578);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.footer-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: #333;
    position: relative;
    display: inline-block;
}

.footer-info h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50%;
    height: 2px;
    background-color: #717578;
}

.footer-info p {
    font-size: 1rem;
    color: #666;
    margin-top: 1rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    color: #666;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.social-icon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #717578;
    transition: width 0.3s ease;
}

.social-icon i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.social-icon:hover {
    color: #333;
}

.social-icon:hover::after {
    width: 100%;
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    color: #777;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* Section Titles - Enhanced */
.section-title {
    font-family: "Jomhuria", serif;
    font-size: 4.5rem;
    text-align: center;
    margin: 3rem 0 2.5rem;
    color: #717578;
    letter-spacing: 5px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #717578;
    border-radius: 10px;
}

/* Buttons - Enhanced */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #717578;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 5px 15px rgba(113, 117, 120, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.btn:hover {
    background-color: #5d6063;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(113, 117, 120, 0.3);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(113, 117, 120, 0.2);
}

/* New - Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #717578;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

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

.back-to-top:hover {
    background-color: #5d6063;
    transform: translateY(-3px);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.fadeIn {
    animation: fadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slideInLeft {
    animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slideInRight {
    animation: slideInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.scaleUp {
    animation: scaleUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Card Styles - New */
.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

/* Media Queries - Enhanced */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
    
    .nav-item {
        margin-left: 1.5rem;
    }
    
    .section-title {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        padding-top: 80px;
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
    }

    .nav-item {
        margin: 1.2rem 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 3.5rem;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-info h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 13px;
    }
    
    .navbar {
        padding: 1rem 0;
    }
    
    .navbar.scrolled {
        padding: 0.7rem 0;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
    }
}