/*
 * IAK Energy Group - Custom Stylesheet
 */

/* 1. IMPORTS */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@700;800&family=Inter:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap');

/* 2. ROOT VARIABLES */
:root {
  --bs-primary: #022f58;      /* Deep Blue */
  --bs-secondary: #00a99d;    /* Energetic Teal */
  --bs-accent: #ff002e;        /* Red */
  --bs-light: #f8f9fa;
  --bs-dark: #212529;
  --bs-font-sans-serif: 'Urbanist', sans-serif;
  --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --primary-soft: rgba(7, 26, 53, 0.1);
  --secondary-soft: rgba(0, 169, 157, 0.1);
}

/* 3. GLOBAL STYLES */
body {
  font-family: var(--bs-font-sans-serif);
  line-height: 1.7;
  padding-top: 65px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
}

.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.text-accent {
  color: var(--bs-accent) !important;
}

.bg-primary-soft {
  background-color: var(--primary-soft);
}

.bg-secondary-soft {
  background-color: var(--secondary-soft);
}

.btn-accent {
  background-color: var(--bs-accent);
  border-color: var(--bs-accent);
  color: #fff;
}

.btn-accent:hover {
  background-color: #d15803;
  border-color: #d15803;
  color: #fff;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
    color: var(--bs-primary);
    transition: color 0.3s ease;
}

.icon-link i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.icon-link:hover {
    color: var(--bs-accent);
}

.icon-link:hover i {
    transform: translateX(5px);
}


/* 4. NAVBAR */
.header .navbar {
  /* Smooth transition for background color change */
  transition: background-color 0.4s ease-out;
}

/* Default (top of page) state */
.header nav#mainNav.navbar {
  background-color: #022f58 !important;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(10px); /* For Safari */
}

/* Scrolled state */
.header nav#mainNav.navbar.scrolled-nav {
  background-color: rgba(7, 26, 53, 0.7) !important;
}

/* Styling for the logo, links, and dropdowns remains the same */
.navbar-logo {
  height: 40px;
  width: auto;
}

.nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
}

/* Dropdown Menu Styling */
.dropdown-menu {
  background: rgba(15, 38, 70, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.dropdown-item {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.dropdown-item:hover, .dropdown-item:focus {
  color: #fff;
  background-color: rgba(0, 169, 157, 0.3);
}

.dropdown-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}


/* 5. HERO & PAGE HEADER */
/* =================================================================== */
/* FINAL HERO STYLES (SINGLE VIDEO + GLASS TEXT BOX)                 */
/* =================================================================== */

.hero-video-section {
    height: calc(100vh - 72px); /* Adjust 72px to your navbar's height */
    position: relative;
    overflow: hidden;
    color: #fff;
}

#heroVideo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
}

/* Dark overlay for text legibility */
.hero-video-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* New fade from bottom effect */
    background: linear-gradient(to top, rgba(7, 26, 53, 0.9) 15%, transparent 60%);
    z-index: -1;
}

/* New container to center the glass box */
.hero-content-container {
    height: 100%;
    display: flex;
    /* Aligns the text block to the bottom and left */
    align-items: flex-end;
    justify-content: flex-start;
    text-align: left;
    position: relative;
    z-index: 1;
}

/* ADD this new rule for the text content */
.hero-text-content {
    max-width: 650px; /* Controls the width of the text block for readability */
    padding-bottom: 5rem; /* Pushes the text up from the bottom edge */
    color: #fff;
}


/* ADD this new section for cleaner cards */
.card-clean {
    border: none;
    background-color: #f8f9fa; /* Uses light background color */
    border-radius: 0.5rem;
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-clean:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.08);
}

/* 6. ANIMATIONS & EFFECTS */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-title-fade-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.animated-hero-title { animation: hero-title-fade-in 1s ease-out 0.3s backwards; }
.animated-hero-subtitle { animation: hero-title-fade-in 1s ease-out 0.6s backwards; }
.animated-hero-button { animation: hero-title-fade-in 1s ease-out 0.9s backwards; }

.card-hover-effect {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover-effect:hover {
  transform: translateY(-10px);
  box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important;
}

.icon-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* Leadership Card */
.leadership-card {
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.leadership-card .leadership-bio {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(7, 26, 53, 0.9);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}
.leadership-card:hover .leadership-bio {
    transform: translateY(0);
}

/* Projects Gallery */
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: .375rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    margin-bottom: 2rem;
}
.project-card img {
    transition: transform 0.4s ease;
}
.project-card:hover img {
    transform: scale(1.05);
}
.project-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    text-align: left;
}
.project-card-overlay h5 {
    margin-bottom: 0.25rem;
}
.project-card-overlay p {
    margin-bottom: 1rem;
    opacity: 0.8;
}
.filter-button-group .btn {
    border-radius: 0;
}
.filter-button-group .btn.active {
    background-color: var(--bs-primary);
    color: white;
}


/* 8. UTILITIES */
#scrollToTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 1000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

/* 9. FOOTER */
footer a {
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
    color: var(--bs-secondary) !important;
}

/* =================================================================== */
/* REIMAGINED CAPABILITIES SECTION STYLES                            */
/* =================================================================== */

.capability-card {
    display: block;
    position: relative;
    overflow: hidden;
    height: 350px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.capability-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.capability-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.capability-card:hover .capability-card-bg {
    transform: scale(1.05);
}

.capability-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(7, 26, 53, 0.95) 20%, rgba(7, 26, 53, 0) 60%);
}

.capability-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem;
    color: #fff;
    width: 100%;
}

.capability-card-content h5 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.capability-card-content p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
}

.card-go-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    transform: translateX(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.capability-card:hover .card-go-arrow {
    transform: translateX(0);
    opacity: 1;
}

/* =================================================================== */
/* REIMAGINED FLAGSHIP PROJECTS SECTION STYLES                       */
/* =================================================================== */

.flagship-projects-section {
    background-color: #fff;
}

.project-slider-container {
    background: var(--bs-light);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}

.project-image-slider {
    position: relative;
    height: 500px;
}

.project-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    border-radius: 0.5rem 0 0 0.5rem;
}

.project-image.active {
    opacity: 1;
}

.project-text-slider {
    position: relative;
    height: 500px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-text {
    position: absolute;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: translateY(20px);
}

.project-text.active {
    position: relative; /* Take up space in the layout when active */
    opacity: 1;
    transform: translateY(0);
}

.project-text h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bs-primary);
    margin-bottom: 1rem;
}

.project-text p {
    color: #555;
    line-height: 1.7;
}

.project-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    margin-top: auto; /* Push navigation to the bottom */
}

.project-counter {
    font-family: var(--bs-font-monospace);
    font-size: 1rem;
    color: #777;
}

.btn-nav {
    background: transparent;
    border: 1px solid #ccc;
    color: #555;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* =================================================================== */
/* REIMAGINED FOOTER STYLES                                          */
/* =================================================================== */

.site-footer {
    background-color: var(--bs-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 0;
}

.footer-logo {
    max-width: 150px;
    height: auto;
}

.footer-tagline {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links h6 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links ul {
    list-style: none;
    padding-left: 0;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 3rem 0;
}

.sub-footer {
    padding-bottom: 2rem;
}

.copyright-text {
    font-size: 0.9rem;
    margin: 0;
}

.footer-social-icons a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    margin-left: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.footer-social-icons a:hover {
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .copyright-text {
        text-align: center;
        margin-bottom: 1rem;
    }
    .footer-social-icons {
        text-align: center;
    }
    .footer-social-icons a {
        margin: 0 0.75rem;
    }
}

/* =================================================================== */
/* NAVBAR CONTROLS STYLES (Language, Search, Contact)                */
/* =================================================================== */

.navbar-controls .nav-item {
    margin-left: 0.5rem;
}

/* Language Selector */
.language-selector .dropdown-toggle {
    font-size: 0.9rem;
    font-weight: 500;
}
.language-selector .dropdown-menu {
    min-width: auto; /* Allow dropdown to be smaller */
}

/* Search Icon */
.search-icon {
    font-size: 1.1rem;
    padding: 0.5rem;
}

/* Contact Button */
.navbar-contact-btn {
    border-radius: 2rem; /* Pill shape */
    padding: 0.4rem 1.2rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.navbar-contact-btn:hover {
    background-color: #fff;
    color: var(--bs-primary);
}


/* Responsive adjustments for mobile menu */
@media (max-width: 991px) {
    .navbar-nav {
        text-align: center;
    }
    .navbar-controls {
        flex-direction: column;
        align-items: center !important;
        margin-top: 1rem;
    }
    .navbar-controls .nav-item {
        margin-left: 0;
        margin-bottom: 1rem;
    }
}

/* =================================================================== */
/* HERO TEXT SLIDESHOW STYLES                                        */
/* =================================================================== */

.text-slider-wrapper {
    position: relative;
    min-height: 350px; /* Set a minimum height to prevent layout shifts */
}

.hero-text-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.hero-text-slide.active {
    opacity: 1;
    transform: translateY(0);
    position: relative; /* Take up space when active */
}

.text-slide-indicators {
    margin-top: 2rem;
    display: flex;
    gap: 12px;
}

.text-slide-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.text-slide-indicators .indicator.active {
    background-color: #fff;
}

/* =================================================================== */
/* FINAL CSS for Sustainability & Leadership (Desktop Nav Fix)       */
/* =================================================================== */

.sl-section {
    background-color: var(--bs-light);
}

.sl-container {
    background-color: var(--bs-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    border-radius: 0.5rem;
}

/* --- Mobile First Base Styles --- */

.sl-text-slider {
    position: relative; /* This is crucial for the new positioning method */
    background-color: var(--bs-primary);
    padding: 2.5rem 2rem;
    border-radius: 0.5rem 0.5rem 0 0; 
}

.sl-text-content {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
}

.sl-text-slide {
    position: absolute;
    top: 0; left: 0; width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: translateY(20px);
}

.sl-text-slide.active {
    opacity: 1;
    transform: translateY(0);
}

.sl-headline {
    font-size: 1.8rem;
    color: #fff; 
    margin-bottom: 1rem;
}

.sl-text-slide p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    font-size: 1rem;
}

.sl-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2); 
    margin-top: 2rem; /* Give space from text on mobile */
}

.sl-counter {
    color: rgba(255, 255, 255, 0.6);
}

.sl-image-container {
    height: 300px;
}

.sl-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 0 0.5rem 0.5rem;
}


/* --- Desktop Styles (for screens 992px and larger) --- */

@media (min-width: 992px) {
    .sl-text-slider {
        padding: 3.5rem;
        padding-bottom: 8rem; /* Increase bottom padding to make space for the absolute nav */
        border-radius: 0.5rem 0 0 0.5rem;
        height: 100%;
        display: block; /* Revert from flex for this positioning method */
    }

    .sl-text-content {
        min-height: 300px; /* Set a min-height for the text area on desktop */
    }
    
    .sl-nav {
        /* New absolute positioning for desktop */
        position: absolute;
        bottom: 3.5rem; /* Position relative to the bottom padding */
        left: 3.5rem;
        right: 3.5rem;
        margin-top: 0; /* Remove the mobile margin */
    }

    .sl-headline {
        font-size: 2.2rem;
    }

    .sl-text-slide p {
        font-size: 1.05rem;
    }

    .sl-image-container {
        height: 100%;
        min-height: 500px;
    }

    .sl-image {
        border-radius: 0 0.5rem 0.5rem 0;
    }
}

/* =================================================================== */
/* STRATEGIC PARTNERS SECTION STYLES (Static Grid)                   */
/* =================================================================== */

.partner-logo-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 2rem 1.5rem;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

.partner-logo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--bs-secondary);
}

.partner-logo-img {
    max-height: 60px;
    width: 100%;
    object-fit: contain;
    /* Grayscale by default, transitions to color on hover */
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease-in-out;
}

.partner-logo-card:hover .partner-logo-img {
    filter: grayscale(0%);
    opacity: 1;
}

/* =================================================================== */
/* REIMAGINED "About Us" PAGE STYLES                                 */
/* =================================================================== */

.about-vision-section h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.about-vision-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--bs-accent);
    border-radius: 2px;
}

.featurette .row {
    margin-bottom: 3rem;
}

.leadership-section h4 {
    font-size: 1.8rem;
}

.commitments-section {
    background-color: #fff;
}

.commitment-card {
    text-align: center;
    padding: 2rem;
    background-color: #fff;
    border-radius: 0.5rem;
    height: 100%;
    border: 1px solid transparent;
    transition: all 0.3s ease-in-out;
}

.commitment-card:hover {
    transform: translateY(-5px);
    border-color: #e0e0e0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.commitment-card p {
    color: #555;
    font-size: 0.95rem;
}

/* =================================================================== */
/* REIMAGINED LAYERED PAGE HEADER STYLES                             */
/* =================================================================== */

.layered-header-wrapper {
    background-color: var(--bs-light); /* Sets a background for the area below the image */
    padding-bottom: 4rem;
}

.page-header-image {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Optional: Adds a subtle dark overlay to the image for better contrast */
.page-header-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(7, 26, 53, 0.2);
}

.page-header-content {
    background-color: #fff;
    padding: 3rem;
    border-radius: 0.5rem;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    position: relative;
    z-index: 10;
    /* This negative margin is what creates the overlap effect */
    margin-top: -100px;
}

.page-header-content h1 {
    color: var(--bs-primary);
}

.page-header-content p.lead {
    color: #555;
    font-size: 1.1rem;
}

/* Responsive adjustment for mobile */
@media (max-width: 767px) {
    .page-header-image {
        height: 250px;
    }

    .page-header-content {
        /* Reduce the overlap effect on smaller screens */
        margin-top: -60px;
        padding: 2rem;
    }
}