/*============================
  1. VARIABLES
============================*/
:root {
    /* Color scheme */
    --primary-color: #F5F5F5;         /* Light Gray */
    --accent-gray: #4A4A4A;           /* Graphite Gray */
    --accent-blue: #287233;           /* Cobalt Blue */
    --accent-bronze: #B87333;         /* Copper Bronze */
    --secondary-silver: #C0C0C0;      /* Steel Silver */
    --secondary-black: #1A1A1A;       /* Dark Gray */
    
    /* Typography variables */
    --heading-font: 'Montserrat', sans-serif;
    --body-font: 'Open Sans', sans-serif;
}

button{
     background-color: #287233; 
}
/*============================
  2. BASE & TYPOGRAPHY
============================*/
body {
    background-color: var(--secondary-black);
    color: var(--accent-gray);
    font-family: var(--body-font);
    font-weight: 400;
    line-height: 1.6;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1.2rem;
}

/*============================
  3. PAGE LOADING
============================*/
/* Page Loading Styles */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(184, 115, 51, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--accent-bronze);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Progressive Content Reveal */
.content-section {
    transform: translateY(1%);
    transition: transform 0.4s ease-out;
    will-change: transform;
}

.content-ready .content-section {
    transform: translateY(0);
}

/* Staggered reveal effect */
.content-section:nth-child(2) { transition-delay: 0.05s; }
.content-section:nth-child(3) { transition-delay: 0.1s; }
.content-section:nth-child(4) { transition-delay: 0.15s; }
.content-section:nth-child(5) { transition-delay: 0.2s; }

/*============================
  4. NAVIGATION
============================*/
.navbar {
    background-color: var(--secondary-silver);
    font-family: var(--heading-font);
    position: relative;
    z-index: 1030; /* Bootstrap's default navbar z-index */
}

.navbar-brand img {
    height: 20%; /* Size for the small logo */
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--accent-gray);
    padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: var(--secondary-black);
}

.navbar-dark .navbar-nav .active > .nav-link,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--accent-bronze);
}

.language-switcher {
    cursor: pointer;
}

/*============================
  5. HERO SECTION
============================*/
.hero-section {
    height: 80vh;
    overflow: hidden;
    position: relative;
    z-index: 0; /* Lower z-index than navbar */
}

.hero-image {
    position: relative;
    height: 100%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Position the hero content correctly */
.container.position-absolute {
    z-index: 1; /* Higher than hero-section but lower than navbar */
}

/*============================
  6. SERVICES SECTION
============================*/
#services {
    background-color: var(--secondary-black);
    color: var(--primary-color);
    padding: 2rem 0;
}

.service-row {
    margin-bottom: 3rem;
}

.service-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    height: 300px; /* Fixed height to match the image */
}

.service-image-container:hover {
    transform: translateY(-5px);
}

.service-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-image-container:hover .service-image {
    transform: scale(1.05);
}

.service-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: rgba(26, 26, 26, 0.8);
    transition: background-color 0.3s ease;
}

.service-title-overlay h3 {
    margin: 0;
    font-size: 1.4rem;
}

.service-title-overlay a {
    color: var(--primary-color);
}

.service-title-overlay:hover {
    background: rgba(184, 115, 51, 0.9);
}

.service-content {
    padding: 1.5rem;
    background-color: rgba(74, 74, 74, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--accent-bronze);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 300px; /* Match the height of images on desktop */
}

/* Responsive adjustments for services section */
@media (max-width: 767.98px) {
    .service-image-container,
    .service-image,
    .service-content {
        height: auto; /* Let content determine height on mobile */
    }
    
    .service-content {
        padding: 1rem;
        margin-bottom: 0;
    }
    
    .service-row {
        margin-bottom: 2rem; /* Less spacing between rows on mobile */
    }
    
    .service-image {
        max-height: 250px; /* Slightly smaller images on mobile */
    }
}

/*============================
  7. PORTFOLIO SECTION
============================*/
/* Portfolio styles */
.portfolio-item {
    position: relative;
    transition: transform 0.3s ease;
    height: 100%;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-details {
    padding: 15px;
    background: white;
    border-radius: 0 0 5px 5px;
}

/* Ensure portfolio items are equal height */
#portfolio-container .col-md-4 {
    display: flex;
    flex-direction: column;
}

#portfolio-container .service-image-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#portfolio-container .portfolio-details {
    flex: 0;
}

/* Modal styling */
#projectCarousel .carousel-item img {
    height: 400px;
    object-fit: cover;
    border-radius: 4px;
}

#projectModal .modal-content {
    border-radius: 8px;
}

#projectModal .modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

#projectModal .modal-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
}

/*============================
  8. FOOTER SECTION
============================*/
/* Footer styles */
footer {
    color: var(--secondary-black);
    background-color: var(--secondary-silver); 
    border-top: 4px solid var(--accent-bronze);
}

.footer-lang-switch {
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.footer-lang-switch:hover {
    opacity: 0.8;
    text-decoration: underline;
}

footer h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline !important;
}

footer hr {
    border-color: rgba(255, 255, 255, 0.1);
}