:root {
    --primary: #DA291C; /* Oilmin Red */
    --secondary: #1A1A1A; /* Black */
    --dark: #000000;
    --light: #F4F4F4;
    --white: #FFFFFF;
    --yellow: #FFC72C;
    --text-grey: #555555;
    --transition: all 0.3s ease;
}

/* Reset & Basics */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Roboto', sans-serif; line-height: 1.6; color: var(--secondary); background: var(--white); }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block;}

/* Utilities */
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.text-red { color: var(--primary); }
.text-center { text-align: center; }
.bg-light { background-color: var(--light); }
.rounded { border-radius: 8px; }
.shadow { box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.p-4 { padding: 1.5rem; }
.border-dashed { border: 2px dashed #ccc; }
.mb-5 { margin-bottom: 3rem; }

/* Buttons */
.btn { display: inline-block; padding: 12px 30px; border-radius: 4px; font-weight: 700; text-transform: uppercase; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--dark); border-color: var(--dark); }
.btn-outline { border: 2px solid var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }

/* Top Bar */
.top-bar { background: var(--dark); color: var(--white); padding: 10px 0; font-size: 0.9rem; border-bottom: 2px solid var(--yellow); }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.contact-info span { margin-right: 20px; }
.social-links a { color: var(--white); margin-left: 15px; }

/* Logo Styling */
.logo a {
    white-space: nowrap;
    display: inline-block;
}

.logo h1 {
    white-space: nowrap;
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0;
}

header { 
    background: var(--white); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

header .container { 
    display: flex; 
    justify-content: flex-start;    /*changed from space-between*/
    align-items: center;
    gap: 60px;
    height: 90px; 
}

.nav-menu { 
    display: flex; 
    align-items: center;
    margin-left: auto;  /* pushes the nav to the far right */
    gap: 0;             /* keep as needed */
}

.nav-links { 
    display: flex; 
    gap: 25px; 
    align-items: center; 
    height: 100%; 
}

.nav-links li {
    display: flex;
    align-items: center; 
    height: 100%;
    position: relative; /* Important for dropdown positioning */
}

.nav-links a { 
    font-weight: 500; 
    font-size: 1rem; 
    color: var(--secondary); 
    position: relative;
    display: flex; /* Add this */
    align-items: center; /* Add this */
    height: 100%; /* Add this */
    padding: 0 5px; /* Add padding for better clickability */
    white-space: nowrap;
}

.nav-links > li > a:hover, 
.nav-links > li > a.active { 
    color: var(--primary); 
}

.nav-links > li > a:hover::after { 
    width: 100%; 
}

.nav-links > li > a::after {
    content: ''; 
    position: absolute; 
    bottom: 0; /* Changed from -5px to 0 */
    left: 0; 
    width: 0; 
    height: 2px;
    background: var(--primary); 
    transition: var(--transition);
}

.nav-btn { 
    margin-left: 20px; 
    font-size: 0.9rem; 
    padding: 10px 25px;
    white-space: nowrap;
}

.hamburger { 
    display: none; 
    font-size: 1.8rem; 
    cursor: pointer; 
    color: var(--secondary); 
}

/* Desktop Dropdowns */
.dropdown { 
    position: relative; 
    padding: 0; 
}

.dropdown-content { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background: var(--white); 
    min-width: 240px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.15); 
    padding: 10px 0; 
    border-top: 4px solid var(--primary);
    border-radius: 0 0 5px 5px;
    z-index: 1001;
}

.dropdown:hover .dropdown-content { 
    display: block; 
    animation: fadeIn 0.3s ease; 
}

.dropdown-content li {
    height: auto; /* Override parent height */
}

.dropdown-content li a { 
    display: block; 
    padding: 12px 20px; 
    font-size: 0.95rem; 
    border-bottom: 1px solid #f0f0f0;
    height: auto; /* Override parent height */
}

.dropdown-content li:last-child a { 
    border-bottom: none; 
}

.dropdown-content li a::after { 
    display: none; 
} 

.dropdown-content li a:hover { 
    background: var(--light); 
    color: var(--primary); 
    padding-left: 25px; 
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Menu */
.mobile-menu { position: fixed; top: 0; right: -100%; width: 300px; height: 100vh; background: var(--white); z-index: 1100; padding: 60px 20px; transition: 0.4s; box-shadow: -5px 0 15px rgba(0,0,0,0.1); overflow-y: auto; display: flex; flex-direction: column; }
.mobile-menu.active { right: 0; }
.close-menu { position: absolute; top: 20px; right: 20px; font-size: 2rem; cursor: pointer; color: var(--primary); }

.mobile-menu a { display: block; padding: 15px 0; font-size: 1.1rem; border-bottom: 1px solid #eee; font-weight: 500; }
.mobile-dropdown-header { font-size: 0.9rem; text-transform: uppercase; color: #999; margin-top: 15px; letter-spacing: 1px; }
.mobile-submenu { padding-left: 15px; background: #f9f9f9; border-left: 3px solid var(--primary); margin-bottom: 10px; }
.mobile-submenu a { font-size: 1rem; padding: 10px 0; border-bottom: 1px solid #e0e0e0; }

/* Hero Sections */
.hero { background: url('../images/hero-bg.webp') no-repeat center center/cover; height: 80vh; position: relative; display: flex; align-items: center; color: var(--white); }
.hero-small { /* Used for internal pages like CSR */
    background: url('https://placehold.co/1920x400/1A1A1A/FFF?text=Internal+Banner') no-repeat center center/cover;
    height: 300px; 
    position: relative; 
    display: flex; 
    align-items: center; 
    color: var(--white);
}
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.7)); }
.hero-content { position: relative; z-index: 1; max-width: 900px; margin: 0 auto; text-align: center; padding: 20px; }
.hero h1, .hero-small h1 { font-size: 3.5rem; margin-bottom: 20px; font-weight: 900; letter-spacing: -1px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero p { font-size: 1.25rem; margin-bottom: 30px; font-weight: 300; }
.hero-btns { display: flex; gap: 20px; justify-content: center; }

/* Section Title */
.section-title h2, .section-title h1 { font-size: 2.5rem; margin-bottom: 15px; font-weight: 800; }
.divider { height: 5px; width: 80px; background: var(--primary); margin-bottom: 30px; }
.divider.center { margin: 0 auto 50px auto; }

/* Grids & Rows */
.row { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.col-lg-6 { flex: 1; min-width: 300px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.check-list { margin-top: 20px; }
.check-list li { margin-bottom: 15px; display: flex; align-items: flex-start; gap: 15px; }
.check-list i { color: var(--primary); margin-top: 5px; }
/* Reverse columns on mobile for certain rows */
@media (max-width: 768px) {
    .reverse-mobile { flex-direction: column-reverse; }
}


/* Service/Product Cards */
.service-card { background: var(--white); padding: 40px 30px; border-radius: 5px; text-align: center; transition: var(--transition); border-bottom: 4px solid transparent; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-bottom-color: var(--primary); }
.icon-lg { font-size: 3rem; color: var(--primary); margin-bottom: 25px; }
.service-card h3 { margin-bottom: 15px; font-size: 1.4rem; }
.read-more { color: var(--primary); font-weight: 700; margin-top: 15px; display: inline-block; font-size: 0.9rem; text-transform: uppercase; }

/* --- PAGE SPECIFIC STYLES --- */

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.gallery-item img {
    width: 100%;
    height: 300px; /* Fixed height for uniformity */
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.gallery-item:hover .caption {
    opacity: 1;
}

/* News Styles */
.news-article {
    background: var(--white);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: flex-start;
    gap: 25px;
}
.news-article-img {
    flex: 0 0 200px; 
}
.news-article-img img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}
.news-article-content {
    flex-grow: 1;
}
.news-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 10px;
}
.news-article h3 {
    color: var(--secondary);
    margin-bottom: 10px;
    font-size: 1.4rem;
}
.news-article:hover h3 {
    color: var(--primary);
}

/* Careers/List Group Styles */
.list-group-item {
    display: block;
    padding: 15px;
    border: 1px solid #eee;
    margin-bottom: 5px;
    border-radius: 4px;
    transition: background 0.3s;
    font-weight: 500;
}
.list-group-item:hover {
    background: var(--light);
    color: var(--primary);
    border-color: #ddd;
}

/* Contact Form Styles */
.contact-form {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--secondary);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
}

/* Footer (unchanged) */
footer { background: var(--secondary); color: #ccc; padding: 70px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-bottom: 50px; }
.footer-col h3 { color: var(--white); margin-bottom: 25px; border-left: 3px solid var(--primary); padding-left: 15px; font-size: 1.2rem; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { transition: 0.3s; }
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }
.copyright { text-align: center; padding-top: 20px; border-top: 1px solid #333; font-size: 0.9rem; color: #777; }

/* Lightbox Styles - ADD THIS to the end of your style.css file (before Responsive section) */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex !important;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    color: var(--primary);
}

.lightbox img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
}

#lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .lightbox img {
        max-width: 95%;
        max-height: 70vh;
    }
    .lightbox-close {
        right: 20px;
        font-size: 40px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-menu { display: none; }
    .hamburger { display: block; }
    .hero h1, .hero-small h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    .top-bar { display: none; } 
    .hero h1, .hero-small h1 { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; }
    .section-padding { padding: 50px 0; }
    .news-article { flex-direction: column; }
    .news-article-img { flex: 0 0 100%; }
    .news-article-img img { width: 100%; }
    .row { gap: 20px; }
    .col-lg-6 { min-width: 100%; }
}