/* Base Styles & Variables */
:root {
    --primary-color: #0033A0; 
    --secondary-color: #FF5F1F; 
    --text-color: #333333;
    --bg-light: #F8F9FA;
    --font-main: 'DM Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography & Layout */
h1, h2, h3 { color: var(--primary-color); margin-bottom: 1rem; }
.text-center { text-align: center; }
.section { padding: 80px 20px; }
.container { max-width: 1200px; margin: 0 auto; }
.bg-light { background-color: var(--bg-light); }

/* Navigation Bar */
.navbar {
    position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center;
    padding: 15px 50px; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.1); z-index: 1000;
}
.logo img { height: 50px; }
.nav-links { list-style: none; display: flex; gap: 20px; }
.nav-links a { text-decoration: none; color: var(--primary-color); font-weight: 600; transition: color 0.3s; }
.nav-links a:hover { color: var(--secondary-color); }

.dropdown {
    position: relative;
    padding-bottom: 10px; /* Creates a safe hover zone so the menu doesn't disappear */
    margin-bottom: -10px;
}

.dropdown-menu {
    display: none; /* Hides the menu by default */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    min-width: 260px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-top: 4px solid var(--secondary-color); /* Orange top edge */
    border-radius: 0 0 8px 8px;
    z-index: 2000;
    flex-direction: column;
}

.dropdown:hover .dropdown-menu {
    display: flex; /* Reveals the menu when hovering over "Services" */
}

.dropdown-menu li {
    list-style: none;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.3s, color 0.3s;
}

.dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--secondary-color);
}

/* --- SPLIT HERO SECTION --- */
.hero-split {
    display: flex; min-height: 80vh; background-image: url('images/hero_bg.jpg'); 
    background-size: cover; background-position: center 20%; 
    clip-path: circle(0% at 50% 50%);
    animation: circleReveal 1.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}
@keyframes circleReveal {
    0% { clip-path: circle(0% at 50% 50%); }
    100% { clip-path: circle(150% at 50% 50%); }
}

.hero-text-box {
    flex: 1; background-color: #ff5f1f99; padding: 80px 50px;
    display: flex; flex-direction: column; justify-content: center; backdrop-filter: blur(3px); 
}
.hero-text-box h1, .hero-text-box p {
    color: #fff; opacity: 0; transform: translateY(30px);
    animation: textFadeIn 1.2s ease 0.6s forwards; 
}
@keyframes textFadeIn { to { opacity: 1; transform: translateY(0); } }
.hero-text-box h1 { font-size: 3rem; margin-bottom: 20px; }
.hero-text-box p { font-size: 1.1rem; line-height: 1.8; }
.hero-image-box { flex: 1; }

/* --- GRIDS & CARDS --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card {
    background-color: #ffffff; padding: 30px; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-top: 4px solid var(--secondary-color); transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; display: flex; flex-direction: column; position: relative; z-index: 2; 
}
a.card { text-decoration: none; color: inherit; cursor: pointer; }
.card:hover { transform: translateY(-10px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); }
.card-img { width: 100%; height: 200px; object-fit: cover; border-radius: 5px; margin-bottom: 20px; }

/* --- ABOUT / MISSION SPLIT SECTION --- */
.about-split { display: flex; align-items: center; gap: 60px; }
.about-left { flex: 1; padding-right: 20px; }
.section-subtitle { color: var(--secondary-color); text-transform: uppercase; letter-spacing: 2px; font-size: 1rem; margin-bottom: 15px; font-weight: 700; }
.section-title { color: var(--text-color); font-size: 4rem; line-height: 1.2; font-weight: 700; margin-bottom: 20px; }
.about-right { flex: 1; display: flex; flex-direction: column; gap: 30px; }

/* --- COMPACT SERVICES SECTION --- */
#services { padding: 40px 20px; }
#services h1 { margin-bottom: 20px; }
#services .grid-3 { gap: 20px; }
#services .card { padding: 20px; }
#services .card-img { height: 130px; margin-bottom: 12px; }
#services .card h3 { font-size: 1.15rem; margin-bottom: 8px; }
#services .card p { font-size: 0.9rem; line-height: 1.4; }

/* --- SEAMLESS GEOMETRIC RIBBON SHAPES --- */
.geometric-shape {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background-color: #ff5f1f85; z-index: 0;
}
.shape-ribbon-1 { clip-path: polygon(0 0, 40% 0, 60% 100%, 0 100%); }
.shape-ribbon-2 { clip-path: polygon(0 0, 60% 0, 40% 100%, 0 100%); }
.content-front { position: relative; z-index: 2; }

/* --- QUALITY MANAGEMENT SECTION --- */
.qms-split { display: flex; align-items: center; gap: 60px; }
.qms-left { flex: 1.2; }
.qms-right { flex: 1; text-align: right; }
.qms-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.qms-list li { 
    background: #ffffff; padding: 15px 20px; border-left: 4px solid var(--secondary-color); 
    box-shadow: 0 4px 12px rgba(0,0,0,0.06); font-size: 1.05rem; border-radius: 4px;
    transition: transform 0.2s ease; text-align: left;
}
.qms-list li:hover { transform: translateX(5px); }

/* --- FLIP CLOCK COUNTER --- */
.flip-clock-container { display: inline-flex; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
.flip-digit {
    background-color: #FF5F1F; color: #ffffff; font-size: 4rem; font-weight: 700;
    padding: 10px 15px; border-radius: 8px; position: relative;
    box-shadow: 0 6px 15px rgba(0, 0, 0.5, 0.5); line-height: 1.1; font-family: 'Courier New', Courier, monospace;
}
.flip-digit::after {
    content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 2px;
    background-color: #DE5219; transform: translateY(-50%); z-index: 1;
}
/* --- CLICKABLE TITLE HOVER EFFECT --- */
.title-link {
    display: inline-block;
    text-decoration: none;
    color: inherit;
    padding: 10px 30px;
    margin-bottom: 10px;
    border-radius: 8px;
    background-color: #ffffff; /* Solid white background by default */
    border: 2px solid var(--secondary-color); /* Permanent Orange Border */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Slight resting shadow */
    transition: all 0.3s ease;
}

.title-link:hover {
    transform: translateY(-5px); /* Pops up on hover */
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); /* Shadow gets deeper on hover */
}

.title-link h1 {
    margin-bottom: 0;
}
.title-link h1 { margin-bottom: 0; }

#certifications .container, #partners .container { border: 5px solid var(--secondary-color); border-radius: 12px; padding: 40px; }
.cert-grid { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; margin-top: 40px; }
.cert-grid img { height: 80px; object-fit: contain; transition: transform 0.3s; }
.cert-grid img:hover { transform: translateY(-4px); }
.partner-subtitle { color: var(--secondary-color); text-transform: uppercase; letter-spacing: 1.5px; font-size: 1.2rem; font-weight: 700; margin-bottom: 40px; }
.marquee-wrapper { overflow: hidden; white-space: nowrap; margin-top: 40px; position: relative; width: 100%; }
.marquee-track { display: inline-flex; gap: 50px; align-items: center; animation: scroll-left 20s linear infinite; }
.marquee-track img { height: 60px; object-fit: contain; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- FOOTER & CONTACT FORM --- */
.footer-split { background-color: #002266; color: #fff; display: flex; flex-wrap: wrap; padding: 60px 50px; gap: 50px; }
.footer-info { flex: 1; min-width: 300px; }
.footer-logo { height: 60px; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer-info p { margin-bottom: 10px; font-size: 0.95rem; opacity: 0.9;}
.copyright { margin-top: 40px; font-size: 0.8rem; opacity: 0.6; }
.footer-form { flex: 1; min-width: 300px; }
.footer-form h3 { color: #fff; margin-bottom: 20px; }
.input-group { margin-bottom: 15px; }
.input-group input, .input-group textarea { width: 100%; padding: 12px 15px; background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 4px; color: #fff; font-family: var(--font-main); font-size: 1rem; transition: border 0.3s; }
.input-group input:focus, .input-group textarea:focus { outline: none; border-color: var(--secondary-color); }
.input-group input::placeholder, .input-group textarea::placeholder { color: rgba(255, 255, 255, 0.6); }
.submit-btn { background-color: var(--secondary-color); color: #fff; border: none; padding: 12px 30px; font-size: 1rem; font-weight: bold; border-radius: 4px; cursor: pointer; font-family: var(--font-main); transition: background 0.3s; }
.submit-btn:hover { background-color: #e04e14; }

/* --- ANIMATIONS --- */
.hidden-slide { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.visible-slide { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* --- COMPACT LEADERSHIP & ORG CHART --- */
#leadership.section, #org-chart-wrapper.section { padding-top: 0 !important; padding-bottom: 20px !important; }
#leadership-wrapper, #org-chart-wrapper { padding: 40px 20px !important; }
#leadership .card-img { height: 220px !important; object-fit: cover; }
#org-chart-wrapper img { max-width: 750px !important; width: 100%; margin: 0 auto; }
/* --- MOBILE LANDSCAPE WARNING (Phones Only) --- */
#landscape-warning { display: none; }
/* Using 'pointer: coarse' targets touch screens (phones/tablets), ignoring desktop mice */
@media screen and (max-width: 850px) and (orientation: landscape) and (pointer: coarse) {
    #landscape-warning { 
        display: flex; 
        position: fixed; 
        top: 0; left: 0; right: 0; bottom: 0; 
        background: rgba(0, 51, 160, 0.95); 
        color: white; 
        z-index: 9999; 
        align-items: center; 
        justify-content: center; 
        text-align: center; 
        padding: 20px; 
    }
    .warning-content { border: 2px solid white; padding: 40px; border-radius: 10px; }
    body > *:not(#landscape-warning) { display: none; }
}

@media screen and (max-width: 768px) {
    .hero-split { flex-direction: column; }
    .hero-text-box { padding: 50px 20px; text-align: center; background-color: rgba(255, 95, 31, 0.95); }
    .hero-image-box { display: none; } 
    .hero-text-box h1 { font-size: 2.2rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .navbar { justify-content: center; }
    .footer-split { flex-direction: column; padding: 40px 20px; }
    .about-split { flex-direction: column; text-align: center; gap: 30px; }
    .about-left { padding-right: 0; }
    .about-right { display: flex; flex-direction: column; width: 100%; gap: 20px; }
    .section-title { font-size: 2.2rem; }
    .card { height: auto !important; padding: 25px 20px; }
    .hidden-slide { transform: translateY(20px); }
    .shape-ribbon-1 { clip-path: polygon(0 0, 75% 0, 95% 100%, 0 100%); }
    .shape-ribbon-2 { clip-path: polygon(0 0, 95% 0, 75% 100%, 0 100%); }
    .qms-split { flex-direction: column-reverse; gap: 30px; }
    .qms-right { text-align: center; }
}
