/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --kersa-red: #8B1D22;
    --kersa-red-dark: #6a1519;
    --kersa-black: #1a1a1a;
    --kersa-dark-gray: #333333;
    --kersa-light-gray: #f4f4f4;
    --text-white: #ffffff;
    --text-gray: #b0b0b0;
    --font-main: 'Montserrat', sans-serif;
    --transition-speed: 0.3s;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay modifiers for staggered animations */
.reveal.delay-100 {
    transition-delay: 0.1s;
}

.reveal.delay-200 {
    transition-delay: 0.2s;
}

.reveal.delay-300 {
    transition-delay: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--kersa-dark-gray);
    background-color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera - Global */
::-webkit-scrollbar {
    display: none;
    width: 0 !important;
    background: transparent;
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-red {
    color: var(--kersa-red);
}

.bg-red {
    background-color: var(--kersa-red);
}

.text-white {
    color: var(--text-white);
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.uppercase {
    text-transform: uppercase;
}

.font-bold {
    font-weight: 700;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
}

.btn-primary {
    background-color: var(--kersa-red);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--kersa-red-dark);
}

.btn-outline {
    border: 2px solid var(--text-white);
    color: var(--text-white);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--text-white);
    color: var(--kersa-black);
}

/* Header - Top Bar */
.top-bar {
    background-color: var(--text-white);
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    font-weight: 500;
    color: var(--kersa-dark-gray);
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-item i {
    color: var(--kersa-red);
}

/* Header - Main Nav */
.main-header {
    background-color: transparent;
    padding: 20px 0;
    position: absolute;
    width: 100%;
    z-index: 1000;
    box-shadow: none;
    transition: all var(--transition-speed);
}

.main-header .nav-link {
    color: var(--text-white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.main-header .logo img {
    filter: brightness(0) invert(1);
    transition: filter var(--transition-speed);
}

.main-header .search-icon {
    color: var(--text-white);
}

.main-header.scrolled {
    position: fixed;
    top: 0;
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
}

.main-header.scrolled .nav-link {
    color: var(--kersa-dark-gray);
    text-shadow: none;
}

.main-header.scrolled .logo img {
    filter: none;
}

.main-header.scrolled .search-icon {
    color: var(--kersa-dark-gray);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

/* Animations - Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Left/Right variants */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered Delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}


.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--kersa-black);
    position: relative;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--kersa-red);
    transition: width var(--transition-speed);
}

.nav-link:hover {
    color: var(--kersa-red) !important;
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.nav-link.active {
    text-shadow: 0 0 10px rgba(139, 29, 34, 0.8);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-icon {
    font-size: 18px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=2070&auto=format&fit=crop');
    /* Industrial Construction Image */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Dark overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-white);
    width: 100%;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: none;
    /* Fix: Don't capitalize connector words like 'y' */
}

/* Improve contrast for red text on dark hero background */
.hero .text-red {
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    /* Pop out from background */
    filter: brightness(1.1);
    /* Slight boost for legibility */
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 600px;
    opacity: 0.9;
}

/* The "Red Box" Feature from Steeler Reference */
.hero-feature-box {
    position: absolute;
    bottom: 50px;
    right: 0;
    background-color: var(--kersa-red);
    color: var(--text-white);
    padding: 40px;
    max-width: 400px;
    z-index: 3;
}

.feature-box-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.feature-box-text {
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.arrow-btn {

    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--text-white);
    color: var(--kersa-red);
    transition: transform var(--transition-speed);
}

.arrow-btn:hover {
    transform: translateX(5px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-item {
    position: relative;
    height: 350px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background-color: var(--kersa-black);
    /* Fallback back */
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1), opacity 0.5s;
    opacity: 0.95;
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    color: var(--text-white);
    pointer-events: none;
}

.project-item:hover .project-img {
    transform: scale(1.08);
    opacity: 0.8;
}

.project-item:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.project-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--kersa-red);
}

/* About Section */
.section-padding {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.section-subtitle {
    color: var(--kersa-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--kersa-black);
}

.about-text p {
    margin-bottom: 20px;
    color: var(--kersa-dark-gray);
    font-size: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    background-color: var(--kersa-light-gray);
    padding: 30px;
    text-align: center;
    border-bottom: 4px solid var(--kersa-red);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--kersa-red);
    display: block;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Services Section */
.bg-light-gray {
    background-color: #f9f9f9;
}

.text-center {
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.service-card {
    background: var(--text-white);
    padding: 40px;
    border-top: 5px solid transparent;
    transition: all var(--transition-speed);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    border-top-color: var(--kersa-red);
    transform: translateY(-10px);
}

.service-icon {
    font-size: 40px;
    color: var(--kersa-red);
    margin-bottom: 20px;
    display: inline-block;
}

.service-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.service-link {
    display: inline-block;
    margin-top: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--kersa-black);
    text-transform: uppercase;
}

.service-link:hover {
    color: var(--kersa-red);
}

/* Page Header (For Subpages) */
.page-header {
    background-color: var(--kersa-black);
    padding: 120px 0 60px;
    /* Space for fixed header */
    text-align: center;
    color: var(--text-white);
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: capitalize;
    /* Corrected from previous task logic */
}

.page-breadcrumb {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Footer (Dark Industrial Theme) */
footer {
    background-color: var(--kersa-black);
    color: var(--text-white);
    padding: 80px 0 30px;
    margin-top: auto;
    /* Push to bottom if content is short */
    border-top: 4px solid var(--kersa-red);
    /* Accent border */
}

.footer-widget h4 {
    color: var(--text-white);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--kersa-red);
    transform: translateX(5px);
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: #ccc;
}

.footer-contact-item i {
    color: var(--kersa-red);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}


.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-widget h4 {
    color: var(--text-white);
    font-size: 1.2rem;
    margin-bottom: 25px;
    text-transform: uppercase;
    font-weight: 700;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #999;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--kersa-red);
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    margin-bottom: 20px;
    color: #999;
}

.footer-contact-item i {
    color: var(--kersa-red);
    margin-right: 15px;
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design - Adaptive System */

/* Tablets and Mobile (max-width: 992px) */
@media (max-width: 992px) {

    /* Navigation - Overlay Menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        margin: 20px 0;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    .nav-menu .nav-link {
        font-size: 1.5rem;
        color: var(--kersa-dark-gray) !important;
        /* Override desktop white color */
        text-shadow: none;
        font-weight: 800;
        /* Make it bolder for better mobile readability */
        display: block;
        padding: 5px 0;
    }

    .nav-menu .nav-link:hover {
        color: var(--kersa-red) !important;
    }

    /* Hide Desktop Elements */
    .desktop-only,
    .top-bar,
    .search-icon {
        display: none !important;
    }

    /* Mobile Menu Button */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
        margin-left: auto;
        /* Push to right */
    }

    .mobile-menu-btn .bar {
        display: block;
        width: 28px;
        height: 3px;
        margin: 6px auto;
        background-color: var(--text-white);
        transition: all 0.3s ease-in-out;
        border-radius: 2px;
    }

    /* Adaptive Burger Color */
    .main-header.scrolled .mobile-menu-btn .bar,
    .mobile-menu-btn.active .bar {
        background-color: var(--kersa-red);
    }

    /* Burger Animation */
    .mobile-menu-btn.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Mobile Devices (Adaptive < 576px) */
@media (max-width: 576px) {
    .container {
        padding: 0 20px;
    }

    /* Header Fixes */
    .header-actions {
        gap: 15px;
    }

    .main-header {
        background-color: transparent !important;
        position: absolute !important;
        padding-top: 20px;
    }

    .logo img {
        height: 40px;
    }

    /* Fluid Hero Layout */
    .hero {
        height: auto;
        /* Allow growth */
        min-height: 100vh;
        padding: 100px 0 40px;
        /* Top padding for header, bottom for whitespace */
        display: flex;
        flex-direction: column;
        justify-content: center;
        background-position: 70% center;
        /* Adjust image focus */
    }

    .hero-content {
        text-align: center;
        width: 100%;
    }

    .hero-text {
        width: 100%;
        margin-bottom: 40px;
    }

    /* Fluid Typography using clamp() */
    .hero-title {
        font-size: clamp(2.2rem, 8vw, 3rem);
        /* Responsive font scaling */
        line-height: 1.1;
        margin-bottom: 20px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 10px;
    }

    /* Stacked Buttons */
    .hero-buttons {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 15px;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        margin: 0 !important;
    }

    /* Feature Box (Red Box) - Flow Layout */
    .hero-feature-box {
        position: relative;
        /* Not absolute anymore */
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 30px;
        bottom: auto;
        right: auto;
        border-radius: 4px;
        /* Slight modern touch */
        text-align: left;
    }

    /* Ensure Visibility */
    .reveal,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}