/* 
   Z Alpha Research and Publishing Hub - Main Stylesheet
   Fully responsive layout with modern typography and aesthetics
*/

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-size: 18px;
  color: #333;
  line-height: 1.6;
  background-color: #fcfcfc;
}

hr {
	border-top: 1px solid #B2BEB5 !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: black;
  margin-bottom: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
}

h2 {
  font-size: 1.8rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-top: 2rem;
}

p {
  margin-bottom: 1.2rem;
  text-align: justify;
}

ul, ol {
  margin: 1.2rem 0 1.2rem 1.5rem;
}

li {
  margin-bottom: 0.6rem;
  text-align: justify;
 
}

strong {
  color: #111;
}

a {
  color: #0056A3;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: #00bf63;
}

hr {
  border: 0;
  height: 1px;
  background: #e2e8f0;
  margin: 2rem 0;
}

/* Layout container */
.container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border-radius: 8px;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

/* Header styling */
.site-header {
  background: #ffffff;
  border-bottom: 3px solid #0056A3;
  padding: 1.5rem 1rem;
}

.header-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.header-logo {
  height: 90px;
  max-height: 15vh;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.05);
}

.header-title {
  color: #00bf63;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin: 0;
  text-align: center;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.header-title sup {
  font-size: 0.55em;
  top: -0.5em;
}

/* Top Navigation Bar */
.navbar {
  font-size: 20px;
  background: #0056A3;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1170px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Nav Menu and items */
.nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}

.navbar .dropdown {
  position: relative;
}

.navbar .dropbtn {
  color: white;
  padding: 1rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  display: block;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar a.dropbtn:hover, 
.navbar .dropdown:hover > .dropbtn,
.navbar .dropdown.open > .dropbtn {
  background: #00407a;
  color: #00bf63;
}

/* Dropdown submenus */
.dropdown-content {
  display: none;
  position: absolute;
  background: #ffffff;
  min-width: 280px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 0 0 6px 6px;
  z-index: 999;
  border-top: 3px solid #00bf63;
  animation: slideIn 0.2s ease;
}

.dropdown-content a {
  color: #333;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: #f8fafc;
  color: #0056A3;
  padding-left: 1.5rem;
}

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

/* Mobile Nav Toggle Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 1rem;
}

.nav-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: white;
  border-radius: 10px;
  transition: all 0.3s ease-in-out;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer Section */
.site-footer {
  background-color: #0056A3;
  color: white;
  padding: 2rem 1.5rem;
  text-align: center;
  width: 100%;
  border-top: 4px solid #00bf63;
  margin-top: auto;
}

.footer-container {
  max-width: 1170px;
  margin: 0 auto;
}

.site-footer p {
  text-align: center;
  margin: 0.5rem 0;
  color: #e2e8f0;
}

.site-footer p:first-child {
  font-weight: 600;
  color: white;
}

/* Table Responsiveness */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
}

th {
  background-color: #f8fafc;
  color: #0056A3;
  font-weight: 600;
}

/* Responsive Table styling for profile/contact/insights tables */
.container table {
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
}

/* Board Profile Styles (.table in eb.html) */
.table td img {
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
  max-width: 100%;
  object-fit: cover;
}

.table td img:hover {
  transform: scale(1.03);
}

/* Books page images */
.container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  margin-bottom: 1rem;
  vertical-align: middle;
}

/* Tooltip design in eb.html */
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 2px dashed #00bf63;
  color: #0056A3;
  cursor: pointer;
  font-weight: bold;
  padding: 2px 4px;
}

.tooltiptext {
  visibility: hidden;
  width: min(90vw, 650px);
  background-color: #ffffff;
  color: #333333;
  text-align: justify;
  border-radius: 8px;
  padding: 1.25rem;
  position: absolute;
  z-index: 100;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  border: 2px solid #00bf63;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  top: 100%;
  line-height: 1.5;
  font-weight: normal;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  /* Mobile menu logic */
  .nav-toggle {
    display: flex;
  }

  .nav-container {
    justify-content: flex-end;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #0056A3;
    position: absolute;
    top: 100%;
    left: 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-top: 1px solid #00407a;
  }

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

  .navbar .dropdown {
    width: 100%;
  }

  .navbar .dropbtn {
    width: 100%;
    text-align: left;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #004b8f;
  }

  .dropdown-content {
    position: static;
    display: none;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    border-top: none;
    background-color: #00407a;
    border-left: 4px solid #00bf63;
  }

  .navbar .dropdown.open .dropdown-content {
    display: block;
  }

  .dropdown-content a {
    color: #e2e8f0;
    padding-left: 2rem;
    border-bottom: 1px solid #004b8f;
  }

  .dropdown-content a:hover {
    background-color: #003362;
    color: white;
    padding-left: 2.25rem;
  }

  /* Hamburger transformation when active */
  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  
  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}

@media (max-width: 768px) {
  /* Compact typography on smaller screens */
  body {
    font-size: 16px;
  }

  .container {
    padding: 1.25rem 1rem;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    border-radius: 0;
    box-shadow: none;
  }

  .header-logo {
    height: 60px;
  }

  /* Stack table columns on mobile */
  .container table, 
  .container tbody, 
  .container tr, 
  .container td {
    display: block;
    width: 100% !important;
  }

  .container tr {
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    background-color: #f8fafc;
  }

  .container td {
    border: none;
    padding: 0.5rem 0;
  }

  .container td h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
  }

  /* Specific fix for Board profiles (eb.html) */
  .table tr {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .table td {
    text-align: center;
  }

  .table td img {
    float: none !important;
    margin: 0 auto 1rem auto !important;
  }

  /* Image layouts inside books.html - display side by side images vertically */
  .container img + img {
    margin-top: 1rem;
  }

  .tooltiptext {
    width: 280px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* Content specific utilities */
.content {
  display: none;
}
.content.active {
  display: block;
}

/* Contact page styling */
.contact-table {
  border: none;
  width: 100%;
}
.contact-table tr {
  border: none !important;
  background-color: transparent !important;
  padding: 0 !important;
}
.contact-table td {
  border: none !important;
  width: 50%;
  padding: 1.5rem !important;
  vertical-align: top;
}
@media (max-width: 768px) {
  .contact-table tr {
    display: flex !important;
    flex-direction: column !important;
  }
  .contact-table td {
    width: 100% !important;
    padding: 0.75rem 0 !important;
  }
}

