/* =========================================
   1. BASE ATS STYLES
========================================= */
body { 
    font-family: Arial, Helvetica, sans-serif; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
}

header { background-color: white; margin: 0; height: 72px; position: relative; z-index: 50; }
header .logo a { background-image: url("../images/logo.png"); background-size: 300px; background-repeat: no-repeat; position: relative; top: -18px; display: inline-block; width: 300px; height: 50px; text-indent: -999999px; }
ul.top-menu { margin: 0; padding: 0; position: relative; top: 30px; list-style-type: none; display: flex;}
ul.top-menu li { display: inline-block; margin-right: 25px; margin-left: 20px; }
ul.top-menu li:hover { color: aqua; }
header a { color:black; text-decoration: none; transition: all 0.4s ease-in; }
header a:hover { color: blue; transition: all 0.4s ease-out; }
.header-decor { position: absolute; top: 72px; height: 4px; width: 100%; }
.bottom-styling { text-decoration: none; color: black; display: block; width: fit-content; }
.bottom-styling::after { content: ''; display: block; width: 0; height: 2px; background: #000; transition: width .3s; }
.bottom-styling:hover::after { width: 100%; }
.decor { height: 56px; position: absolute; right: 16px; top: 8px; }

footer { background-color: white; display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 50px; padding-top: 40px; width: 100%; margin: 0; }
footer div.footer-heading { display: flex; flex-direction: column; margin-right: 60px; text-align: left;}
footer a { text-decoration: none; color: gray; transition: all 0.3s ease-in; margin-bottom: 5px; }
footer a:hover { color: black; transition: all 0.3s ease-out; }

/* =========================================
   2. INFRASTRUCTURE MAP SECTION
========================================= */
.infrastructure-map-section {
    padding: 40px 20px;
    background-color: #f4f7f6;
    text-align: center;
}

.map-container {
    position: relative; 
    width: 100%; 
    max-width: 1400px; 
    margin: 0 auto;
    background: #ffffff; 
    border-radius: 12px;
}

.base-map { width: 100%; height: auto; display: block; }

.project-node { position: absolute; width: 20px; height: 20px; z-index: 10; }
.node-dot { width: 18px; height: 18px; background-color: #00A651; border-radius: 50%; position: relative; z-index: 2; box-shadow: 0 0 0 4px rgba(0, 166, 81, 0.2); }
.node-line { position: absolute; border: 1.5px dashed #00A651; z-index: 1; }
.line-bottom-left { width: 40px; height: 40px; border-top: none; border-right: none; top: 9px; right: 9px; border-bottom-left-radius: 6px; }
.line-bottom-left + .node-widget { top: 40px; right: 50px; }
.line-top-right { width: 40px; height: 40px; border-bottom: none; border-left: none; bottom: 9px; left: 9px; border-top-right-radius: 6px; }
.line-top-right + .node-widget { bottom: 40px; left: 50px; }
.line-top-left { width: 40px; height: 40px; border-bottom: none; border-right: none; bottom: 9px; right: 9px; border-top-left-radius: 6px; }
.line-top-left + .node-widget { bottom: 40px; right: 50px; }

/* =========================================
   3. THE HOVER PILL / WIDGET
========================================= */
.node-widget {
    position: absolute;
    background-color: #ffe8d6;
    border: 1px solid #e0c8b6;
    border-radius: 20px; 
    padding: 6px 16px; 
    text-align: left;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    width: max-content; 
    overflow: hidden; 
}

.node-widget h4 { margin: 0; font-size: 0.95rem; color: #333; transition: all 0.3s ease; border-bottom: 2px solid transparent; }
.node-details { max-height: 0; opacity: 0; transition: all 0.3s ease; }
.project-node:hover { z-index: 20; }
.project-node:hover .node-widget { border-radius: 8px; padding: 12px; width: 310px; border-color: #00A651; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.15); }
.project-node:hover .node-widget h4 { margin-bottom: 8px; border-bottom: 2px solid #00A651; padding-bottom: 4px; }
.project-node:hover .node-details { max-height: 200px; opacity: 1; }
.widget-content-flex { display: flex; flex-direction: row; gap: 6px; align-items: center; }
.widget-text { flex: 1; }
.widget-image { width: 60px; flex-shrink: 0; }
.widget-image img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 4px; display: block; }
.node-stats { list-style: none; padding: 0; margin: 0 0 8px 0; font-size: 0.8rem; color: #222; }
.node-stats li { margin-bottom: 3px; }
.click-hint { font-size: 0.7rem; font-weight: bold; color: #00A651; display: inline-block;}

/* =========================================
   4. MODALS (Portrait Gallery Split Layout)
========================================= */
.modal-container { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh; z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); cursor: pointer; }
.modal-content { position: relative; background: #fff; width: 90%; max-width: 900px; border-radius: 12px; z-index: 1001; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3); animation: fadeIn 0.3s ease; }
.modal-body { display: flex; flex-direction: row; padding: 0; max-height: 85vh; }
.modal-image-container { flex: 1; min-width: 0; background: #1a1a1a; display: flex; align-items: center; position: relative; justify-content: center; }
.modal-image-container > img { max-width: 100%; max-height: 85vh; object-fit: contain; }
.image-scroller { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; width: 100%; height: auto; gap: 0; padding: 0; align-items: center; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.4) transparent; }
.image-scroller::-webkit-scrollbar { height: 8px; }
.image-scroller::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 4px; }
.image-scroller::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.4); border-radius: 4px; }
.image-scroller img { flex: 0 0 100%; width: 100%; height: 420px; object-fit: contain; scroll-snap-align: center; scroll-snap-stop: always; padding: 20px; box-sizing: border-box; }
.modal-info { flex: 1; padding: 40px; overflow-y: auto; text-align: left; }
.modal-info h2 { margin-top: 0; color: #222; }
.modal-info p { color: #555; line-height: 1.6; }
.close-btn { position: absolute; top: 15px; right: 15px; background: #f1f1f1; border: none; border-radius: 50%; font-size: 20px; font-weight: bold; cursor: pointer; width: 35px; height: 35px; color: #333; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease; z-index: 2; }
.close-btn:hover { background: #e0e0e0; }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95) translateY(-10px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* =========================================
   5. PROJECT DIRECTORY GRID
========================================= */
.project-grid-section { padding: 60px 20px; background-color: #ffffff; max-width: 1200px; margin: 0 auto; width: 100%; box-sizing: border-box; flex: 1; }
.section-title { text-align: center; font-size: 2.2rem; margin-bottom: 20px; color: #222; }
.category-title { font-size: 1.4rem; color: #00A651; border-bottom: 2px solid #00A651; padding-bottom: 8px; margin-top: 50px; margin-bottom: 25px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.grid-card { background: #f4f7f6; border: 1px solid #eaeaea; border-radius: 10px; overflow: hidden; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.grid-card:hover { transform: translateY(-6px); box-shadow: 0 12px 24px rgba(0,0,0,0.12); border-color: #00A651; }
.card-image { width: 100%; height: 220px; overflow: hidden; background: #1a1a1a; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.grid-card:hover .card-image img { transform: scale(1.05); }
.card-content { padding: 20px; text-align: left; }
.card-content h4 { margin: 0 0 10px 0; color: #333; font-size: 1.15rem; }
.card-content p { margin: 0; color: #666; font-size: 0.9rem; line-height: 1.5; }

/* =========================================
   6. FILTER MENU
========================================= */
.filter-menu { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.filter-btn { background-color: #f4f7f6; border: 2px solid #eaeaea; color: #555; padding: 8px 24px; border-radius: 25px; font-size: 0.95rem; font-weight: bold; cursor: pointer; transition: all 0.3s ease; }
.filter-btn:hover { border-color: #00A651; color: #00A651; }
.filter-btn.active { background-color: #00A651; border-color: #00A651; color: #ffffff; }
.category-group { animation: fadeIn 0.4s ease; }