/* =========================
   ROOT VARIABLES
========================= */
:root {
  --primary: rgb(125,205,203);
  --light-green: rgba(185, 232, 185, 0.738);
  --header-bg: rgb(245,245,203);
  --hover-green: #4CAF50;
  --table-header: #2E8B57;
}

/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BODY + FLEX LAYOUT FOR FOOTER
========================= */
body {
  background-color: rgb(165, 205, 165);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  font-family: 'Source Sans 3', sans-serif;
  line-height: 1.7;
  letter-spacing: 0.03em;
  text-align: justify;
  color: black;
  font-size: 19px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  padding: 0 20px;
}

/* Hyphenation Added */
.article,
.index,
.investment,
.service,
.org {
  hyphens: auto;
}

/* =========================
   HEADER
========================= */
header {
  background-color: var(--header-bg);
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  padding: 15px;
}

/* =========================
   INDEX / INVESTMENT / ARTICLE / SERVICE / ORGANIZATION PAGES
========================= */
.index, .investment, .article, .service, .org {
  margin: 90px auto;
  max-width: 900px;
  padding: 35px 50px;
  outline: 5px solid var(--light-green);
  background-color: var(--light-green);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article {
  background-color: rgba(229, 232, 229, 0.7);
  outline: 5px solid white;
}

.article-title { text-decoration: underline; margin-bottom: 20px; }

.investment-list, .srv-list, .org ul {
  padding-left: 50px;
  margin-top: 20px;
}

.investment-list li, .srv-list li, .org li {
  margin: 15px 0;
}

/* =========================
   IMAGES
========================= */
.umrahimg {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px;
  width: 150px;
  max-width: 100%;
  height: auto;
  transition: box-shadow 0.3s ease;
}

.umrahimg:hover {
  box-shadow: 0 0 2px 1px rgba(0, 140, 186, 0.5);
}

/* =========================
   TABLE STYLING
========================= */
.table-container {
  overflow-x: auto;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  margin-top: 20px;
}

th, td {
  border: 1px solid #ccc;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background-color: var(--table-header);
  color: black;
  text-transform: uppercase;
}

tr:nth-child(even) { background-color: #f2f2f2; }

td ul { padding-left: 15px; margin: 0; list-style-type: disc; }

/* =========================
   THANK YOU TEXT
========================= */
.ty {
  color: green;
  font-weight: bold;
  text-align: center;
  margin: 50px auto;
  padding: 20px;
  font-size: 1.2em;
}

/* =========================
   FOOTER
========================= */
.f {
  font-weight: bold;
  text-align: center;
  padding: 30px;
  background-color: var(--header-bg);
  border-top: 2px solid black;
  width: 100%;
  margin-top: 50px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.f a {
  color: black;
  text-decoration: none;
  transition: 0.3s;
}

.f a:hover { text-decoration: underline; color: var(--hover-green); }

a:focus {
  outline: 2px solid var(--hover-green);
  outline-offset: 2px;
}

/* =========================
   FIXED BUTTONS
========================= */
.fixed-btnr, .fixed-btnl {
  position: fixed;
  bottom: 35px;
  padding: 12px 20px;
  background-color: var(--primary);
  color: black;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  z-index: 1000;
  transition: 0.3s;
}

.fixed-btnr:hover, .fixed-btnl:hover { background-color: var(--hover-green); }

.fixed-btnr:focus, .fixed-btnl:focus {
  outline: 2px solid var(--hover-green);
  box-shadow: 0 0 4px 2px rgba(0, 140, 186, 0.7);
}

.fixed-btnr { right: 50px; }
.fixed-btnl { left: 50px; }

/* =========================
   NAVIGATION BAR
========================= */
.navbar {
  background-color: var(--primary);
  padding: 0 40px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.navbar-menu {
  list-style: none;
  display: flex;
  flex-direction: row;
  gap: 40px;
  margin: 0;
  padding: 0;
  justify-content: center;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 15px;
}

.navbar-menu li { position: relative; }

.navbar-menu li a, .dropbtn {
  display: block;
  color: black;
  padding: 18px 0;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

/* Hover underline animation */
.navbar-menu li a::after,
.dropbtn::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: 5px;
  background: black;
  transition: width 0.3s ease;
}

.navbar-menu li a:hover::after,
.dropdown:hover .dropbtn::after { width: 100%; }

/* Dropdown menu */
.navbar-menu .dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  top: 100%;
  left: 0;
  border-radius: 6px;
  overflow: hidden;
  z-index: 1000;
}

.navbar-menu .dropdown-content a {
  color: black;
  text-transform: none;
  font-weight: normal;
  padding: 12px 16px;
}

.navbar-menu .dropdown-content a:hover { 
  background-color: var(--hover-green); 
  color: white; 
}

/* Show dropdown on desktop hover */
@media (min-width: 769px) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
}

/* =========================
   HAMBURGER BUTTON
========================= */
.hamburger {
  display: none;
  font-size: 45px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  color: black;
}

/* =========================
   MOBILE NAVIGATION
========================= */
@media screen and (max-width: 768px) {
  .hamburger {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    font-size: 35px;
  }

  .navbar-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary);
    border-top: 1px solid rgba(0,0,0,0.1);
    z-index: 999;
  }

  .navbar-menu.active {
    display: flex;
  }

  .navbar-menu li { width: 100%; }

  .navbar-menu li a, .dropbtn {
    width: 100%;
    padding: 12px 20px;
    color: black;
  }

  .navbar-menu .dropdown-content {
    position: relative;
    display: none;
    width: 100%;
    flex-direction: column;
    background-color: var(--light-green);
    border-radius: 0;
  }

  .dropdown.active > .dropdown-content {
    display: flex;
  }
}

/* =========================
   SMOOTH SCROLL
========================= */
html { scroll-behavior: smooth; }

/* =========================
   MOBILE TABLE ADJUSTMENTS
========================= */
@media screen and (max-width: 600px) {
  body { font-size: 17px; }
  .fixed-btnr { right: 15px; bottom: 20px; }
  .fixed-btnl { left: 15px; bottom: 20px; }

  table, thead, tbody, th, td, tr { display: block; }
  thead tr { display: none; }

  td {
    position: relative;
    padding-left: 50%;
    border: none;
    border-bottom: 1px solid #ddd;
  }

  td::before {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 45%;
    white-space: nowrap;
    font-weight: bold;
    content: attr(data-label);
  }
}

