/* ==========================================================================
   1. GLOBAL RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}
html {
    scroll-behavior: smooth;
}
body {
    background: #ffffff;
    color: #334155;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}
/* ==========================================================================
   2. ADVANCED SCROLL ANIMATION CLASSES (FIXED VISIBILITY)
   ========================================================================== */
.anim-fade-up, .anim-left, .anim-right, .bg-photo-section, .section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.anim-left { transform: translateX(-40px); }
.anim-right { transform: translateX(40px); }

.show {
    opacity: 1 !important;
    transform: translate(0) !important;
}
.hero-content {
    opacity: 1 !important;
    transform: none !important;
}
/* ==========================================================================
   3. HEADER & PREMIUM DROPDOWN NAVIGATION (FIXED FOR HOVER)
   ========================================================================== */
header {
    position: fixed;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background 0.3s ease;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    position: relative;
}
.logo {
    font-size: 24px;
    font-weight: bold;
    color: #0A66C2;
}
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: #1E293B;
    font-weight: 600;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: #0A66C2;
}
.menu-toggle {
    display: none;
    font-size: 28px;
    color: #0A66C2;
    cursor: pointer;
}

/* Dropdown Wrapper */
.dropdown {
    position: relative;
    display: inline-block;
}

/* டிராப்டவுன் பாக்ஸ் ஆரம்ப நிலை (மறைந்திருக்கும்) */
.dropdown-content {
    display: none; 
    position: absolute;
    background-color: #ffffff;
    min-width: 190px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 10px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
}

/* 🔥 மேஜிக் லைன்: மௌஸை மேலே கொண்டு போகும்போது மட்டும் டிராப்டவுன் ஓபன் ஆகும் */
.dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* டிராப்டவுன் உள்ளே இருக்கும் லிங்க்குகள் மற்றும் பட்டன்கள் */
.dropdown-content a,
.dropdown-content button {
    background: none;
    color: #1E293B !important;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
}

.dropdown-content a:hover,
.dropdown-content button:hover {
    background-color: #f1f5f9;
    color: #0A66C2 !important;
}

/* ==========================================================================
   4. FULL SCREEN SECTIONS WITH PHOTO BACKGROUNDS & OVERLAYS
   ========================================================================== */
.bg-photo-section, .hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 120px 10%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero {
    height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1497366754035-f200968a6e72');
}
.section-overlay, .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.75));
    z-index: 1;
}
.content-wrapper, .about-container-wrapper, .hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff !important;
    width: 100%;
    text-align: center;
}
.section h2, .about-content-box h2 {
    color: #38bdf8 !important;
    font-size: 38px;
    margin-bottom: 30px;
    font-weight: 700;
}
.hero-content h1 {
    font-size: 55px;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}
.hero-content p {
    font-size: 22px;
    margin-bottom: 30px;
    color: #cbd5e1;
}
.btn {
    background: #0A66C2;
    padding: 14px 30px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    display: inline-block;
    font-weight: bold;
    transition: all 0.3s ease;
}
.btn:hover {
    background: #004b93;
    transform: scale(1.05);
}
/* ==========================================================================
   5. ABOUT SECTION SPLIT LAYOUT
   ========================================================================== */
.about-container-wrapper {
    display: flex;
    gap: 50px;
    align-items: center;
    justify-content: space-between;
}
.about-content-box {
    max-width: 550px;
    text-align: left;
}
.about-content-box p {
    font-size: 17px;
    line-height: 1.6;
    color: #e2e8f0;
}
.mission-vision-box {
    background: rgba(255, 255, 255, 0.06);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #38bdf8;
}
.about-stats-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    text-align: center;
}
.stat-card h3 {
    color: #38bdf8;
    font-size: 35px;
    font-weight: 700;
}
/* ==========================================================================
   6. GRID CARDS (SERVICES & PRODUCTS)
   ========================================================================== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.card-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
    text-align: center;
}
.card-item i {
    font-size: 40px;
    color: #38bdf8;
    margin-bottom: 15px;
}
.card-item h3 {
    color: #ffffff;
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}
.card-item p {
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.5;
}
.card-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}
/* ==========================================================================
   7. CAREERS PORTAL MAIN BUTTONS
   ========================================================================== */
.career-portal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}
.portal-btn {
    background: #0A66C2;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.portal-btn:hover {
    background: #38bdf8;
    transform: translateY(-3px);
}
/* ==========================================================================
   8. CAREERS SUB-PORTAL POPUP MODAL OVERLAY & CARDS
   ========================================================================== */
.career-portal-overlay {
    display: none;
    position: fixed;
    z-index: 1500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.portal-box {
    background: #ffffff;
    width: 100%;
    max-width: 850px;
    height: 80vh;
    overflow-y: auto;
    padding: 40px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.close-portal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 35px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
}
.close-portal:hover {
    color: #ef4444;
}
.portal-job-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}
#portalTypeTitle {
    color: #1e293b !important;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}
.portal-job-card {
    background: #f8fafc !important;
    border-left: 5px solid #0A66C2 !important;
    padding: 25px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.portal-job-card h3 {
    color: #0A66C2 !important;
    font-size: 20px;
    margin-bottom: 8px;
    font-weight: 600;
}
.portal-job-card p {
    color: #475569 !important;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 15px;
}
.portal-job-card button {
    background: #0A66C2 !important;
    color: white !important;
    border: none !important;
    padding: 10px 22px !important;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}
.portal-job-card button:hover {
    background: #1e293b !important;
    transform: translateY(-2px);
}
/* ==========================================================================
   9. APPLICATION FORM POPUP MODAL (STRICTLY HIDDEN BY DEFAULT)
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    position: relative;
    color: #1e293b;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
}
.close-btn:hover {
    color: #ef4444;
}
.job-req-box {
    background: #f8fafc;
    border-left: 4px solid #0A66C2;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 8px 8px 0;
    text-align: left;
}
#jobModal form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
    width: 100%;
}
#jobModal input[type="text"],
#jobModal input[type="email"],
#jobModal input[type="tel"] {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    outline: none !important;
    transition: all 0.3s ease;
}
#jobModal input:focus {
    border-color: #0A66C2 !important;
    box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.15) !important;
}
#jobModal input[type="file"] {
    width: 100% !important;
    padding: 10px !important;
    background: #f1f5f9 !important;
    border: 1px dashed #94a3b8 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    cursor: pointer;
    color: #475569 !important;
}
#jobModal form button[type="submit"] {
    width: 100% !important;
    background: #0A66C2 !important;
    color: white !important;
    border: none !important;
    padding: 14px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}
#jobModal form button[type="submit"]:hover {
    background: #004b93 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.3);
}
/* ==========================================================================
   10. CONTACT SECTION PANEL DESIGN (FIXED GRID SPLIT)
   ========================================================================== */
.contact-flex-wrapper {
    display: flex;
    flex-direction: row;
    gap: 50px;
    max-width: 1100px;
    margin: 40px auto 0 auto;
    text-align: left;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.contact-left-info {
    flex: 1.2;
    text-align: left;
}
.contact-left-info h3 {
    color: #38bdf8 !important;
    font-size: 28px;
    margin-bottom: 15px;
}
.contact-left-info p {
    line-height: 1.6;
    font-size: 16px;
    color: #cbd5e1;
}
.contact-right-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}
.c-box {
    padding: 25px;
    border-radius: 15px;
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    width: 100%;
}
.c-box i {
    font-size: 30px;
    color: #38bdf8;
}
.c-box h4 {
    color: white;
    margin-bottom: 4px;
    font-size: 18px;
}
.c-box p {
    margin: 0;
    color: #cbd5e1;
}
footer {
    background: #1E293B;
    color: white;
    padding: 25px;
    text-align: center;
}
.theme-toggle {
    font-size: 22px;
    color: #0A66C2;
    cursor: pointer;
    margin-left: auto;
    margin-right: 20px;
    transition: transform 0.3s ease;
}
.theme-toggle:hover {
    transform: scale(1.1);
}
/* ==========================================================================
   11. GLOBAL DARK MODE OVERRIDES (CONSOLIDATED)
   ========================================================================== */
body.dark-mode {
    background: #090d16;
    color: #f1f5f9;
}
body.dark-mode header {
    background: #1e293b;
}
body.dark-mode .nav-links a {
    color: #f1f5f9;
}
body.dark-mode .nav-links a:hover {
    color: #38bdf8;
}
body.dark-mode .dropdown-content {
    background-color: #1e293b;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.4);
}
body.dark-mode .dropdown-content a,
body.dark-mode .dropdown-content button {
    color: #f1f5f9 !important;
}
body.dark-mode .dropdown-content a:hover,
body.dark-mode .dropdown-content button:hover {
    background-color: #111827;
    color: #38bdf8 !important;
}
body.dark-mode .portal-box {
    background: #1e293b !important;
    color: #ffffff;
}
body.dark-mode #portalTypeTitle {
    color: #ffffff !important;
}
body.dark-mode .portal-job-card {
    background: #111827 !important;
    border-left-color: #38bdf8 !important;
}
body.dark-mode .portal-job-card h3 {
    color: #38bdf8 !important;
}
body.dark-mode .portal-job-card p {
    color: #cbd5e1 !important;
}
body.dark-mode .portal-job-card button {
    background: #38bdf8 !important;
    color: #0f172a !important;
}
body.dark-mode .portal-job-card button:hover {
    background: #ffffff !important;
}
body.dark-mode .modal-content {
    background: #1e293b;
    color: #ffffff;
}
body.dark-mode #jobModal input[type="text"],
body.dark-mode #jobModal input[type="email"],
body.dark-mode #jobModal input[type="tel"] {
    background-color: #111827 !important;
    border-color: #475569 !important;
    color: #ffffff !important;
}
body.dark-mode #jobModal input[type="file"] {
    background: #151f32 !important;
    border-color: #475569 !important;
    color: #cbd5e1 !important;
}
body.dark-mode #jobModal form button[type="submit"] {
    background: #38bdf8 !important;
    color: #0f172a !important;
}
body.dark-mode #jobModal form button[type="submit"]:hover {
    background: #ffffff !important;
}
body.dark-mode .job-req-box {
    background: #111827;
}
body.dark-mode .theme-toggle {
    color: #f59e0b;
}
/* ==========================================================================
   12. MEDIA QUERIES (MOBILE RESPONSIVENESS FIXES)
   ========================================================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        gap: 20px;
    }
    body.dark-mode .nav-links {
        background: #1e293b;
    }
    .nav-links.active {
        display: flex;
    }
    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 5px 0 0 0;
        width: 100%;
        align-items: center;
    }
    .dropdown-content a,
    .dropdown-content button {
        text-align: center;
    }
    body.dark-mode .dropdown-content button:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    .hero-content h1 {
        font-size: 34px;
    }
    .hero-content p {
        font-size: 18px;
    }
    .about-container-wrapper, .contact-flex-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .about-content-box, .contact-left-info {
        text-align: center;
        max-width: 100%;
    }
    .about-stats-box {
        grid-template-columns: 1fr;
        width: 100%;
    }
    .career-portal-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    .portal-box {
        padding: 25px 15px;
        height: 85vh;
    }
    .c-box {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .bg-photo-section, .hero {
        padding: 80px 5%;
        background-attachment: scroll;
    }
}