/* ICAM Group Website - Main Styles */

:root {
  --primary-color: #0b1b4c;
  --secondary-color: #156dbd;
  --text-dark: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --gray-light: #f5f5f5;
  --gray-medium: #cccccc;
}

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

html {
  scroll-padding-top: 150px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
}

/* Navbar Styles */
.navbar {
  background-color: var(--primary-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.navbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 2rem;
}

.navbar-logo img {
  height: 80px;
  width: auto;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.navbar-menu a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-menu a:hover {
  color: var(--secondary-color);
}

.navbar-menu .btn-primary {
  background-color: var(--secondary-color);
  padding: 0.5rem 1.5rem;
  border-radius: 5px;
  color: var(--white);
}

.navbar-menu .btn-primary:hover {
  background-color: #1177d1;
  color: var(--white);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Main Content */
main {
  min-height: calc(100vh - 200px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 4rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.content-section {
  padding: 3rem 0;
}

.content-section h1,
.content-section h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.content-section h1 {
  font-size: 2.5rem;
}

.content-section h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

.content-section p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-section ul {
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.content-section li {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* Footer Styles */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.footer-section p,
.footer-section a {
  color: var(--white);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-section p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  color: var(--white);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--gray-medium);
}

.division {
	padding: 2rem;
	border: 1px solid var(--gray-medium);
	border-radius: 8px;
}

.division img {
	display: block;
	height: 150px;
	width: auto;
	margin-left: auto;
	margin-right: auto;
}

.division h3 {
	margin-top: 1rem;
	text-align: center;
}

.content-section img {
	height: 200px;
	width: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  font-size: inherit;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #1177d1;
}

.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1em;
  height: 1em;
  margin: -0.5em 0 0 -0.5em;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: btn-loading-spin 0.6s linear infinite;
}

@keyframes btn-loading-spin {
  to { transform: rotate(360deg); }
}

.btn-outline {
  background-color: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.action-section a {
	margin-left: 1rem;
}

.action-section a:first-of-type {
	margin-left: 0;
}

.team-member {
  margin-bottom: 2rem;
}

.team-member img {
  display: block;
}

.team-member-name {
  color: var(--primary-color);
  font-size: 2.0rem;
}

.team-member-role {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.team-member-summary {

}

/* Alert messages */
.alert { padding: 0.9rem 1.2rem; border-radius: 6px; margin-bottom: 1.25rem; font-weight: 500; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Info banner */
.banner {
  background-color: var(--secondary-color);
  color: #fff;
  font-size: 1.2rem;
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  margin-bottom: 3rem;
}

/* Admin */
.admin-menubar {
  background-color: var(--primary-color);
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-menubar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-menubar-brand {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}

.admin-menubar-user {
  position: relative;
}

.admin-menubar-toggle {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.admin-menubar-toggle:hover {
  color: var(--secondary-color);
}

.admin-menubar-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  min-width: 220px;
  overflow: hidden;
  z-index: 1001;
}

.admin-menubar-dropdown.active {
  display: block;
}

.admin-menubar-dropdown-header {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--gray-light);
}

.admin-menubar-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  color: var(--text-dark);
  text-decoration: none;
}

.admin-menubar-dropdown a:hover {
  background: var(--gray-light);
}

/* Pages with an internally-scrolling table (see .admin-table-scroll) need
   the viewport itself to never scroll, so the table is the only scrollable
   region — otherwise a fixed vh height on the table can't account for
   however tall the menubar/header above it end up being. */
body.admin-scroll-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.admin-scroll-page .content-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.admin-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-back-link {
  color: var(--secondary-color);
  font-size: 1.3rem;
  line-height: 1;
}

.admin-back-link:hover {
  color: var(--primary-color);
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.admin-card {
  display: block;
  text-align: center;
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--gray-medium);
  border-radius: 10px;
  color: var(--primary-color);
  text-decoration: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.admin-card i {
  font-size: 2rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.admin-card h2 {
  margin-bottom: 0.5rem;
}

.admin-card p {
  margin: 0;
  color: #555;
}

.admin-card:not(.disabled):hover {
  border-color: var(--secondary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.admin-card.disabled {
  cursor: default;
  opacity: 0.6;
}

.list-editor {
  margin-bottom: 0.75rem;
}

.list-editor-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.list-editor-row input[type="text"] {
  flex: 1;
}

.list-editor-row .btn-icon:disabled {
  opacity: 0.3;
  cursor: default;
}

.admin-table tbody tr.archived-row {
  display: none;
}

.admin-table.show-archived tbody tr.archived-row {
  display: table-row;
  opacity: 0.6;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 3rem;
}

.admin-table-scroll .admin-table {
  margin-bottom: 0;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-medium);
  white-space: nowrap;
}

.admin-table th {
  background-color: var(--gray-light);
  color: var(--primary-color);
}

.admin-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.admin-table th.sortable i {
  font-size: 0.8em;
  color: var(--gray-medium);
  margin-left: 0.25rem;
}

.admin-table th.sortable.sort-active i {
  color: var(--secondary-color);
}

.admin-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--gray-medium);
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.admin-table-scroll .admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.admin-table-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--secondary-color);
  font-size: 1.1rem;
  padding: 0.4rem;
  border-radius: 4px;
  line-height: 1;
}

.btn-icon:hover {
  background-color: var(--gray-light);
}

.delete-course-btn.btn-icon:hover {
  color: #991b1b;
}

/* Contact Form */
.contact-form {
  max-width: 720px;
  margin: 2rem auto 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--primary-color);
  font-size: 0.95rem;
}

.required {
  color: #c0392b;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 1rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(21, 109, 189, 0.15);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-submit {
  text-align: center;
  margin-top: 0.5rem;
}

.form-submit .btn {
  min-width: 180px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Modal Styles */
.modal {
  border: none;
  border-radius: 10px;
  padding: 0;
  max-width: 680px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

#courseModal .modal-dialog {
  max-height: 80vh;
  overflow-y: auto;
}

#courseModal .modal-dialog p {
  margin-bottom: 1rem;
}

#courseModal .modal-dialog ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

#courseModal .modal-dialog li {
  margin-bottom: 0.4rem;
}

.modal-dialog {
  position: relative;
  padding: 2.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: var(--primary-color);
  padding: 0;
}

.modal-close:hover {
  color: var(--secondary-color);
}

.modal-title {
  margin-bottom: 0.4rem;
  color: var(--primary-color);
}

.modal-course-info {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

/* Cookie Consent Banner */
#cookieBanner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-color);
  color: var(--white);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 9999;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

#cookieBanner p {
  margin: 0;
  font-size: 0.9rem;
}

#cookieBanner a {
  color: var(--white);
  text-decoration: underline;
}

#cookieBanner a:hover {
  color: var(--secondary-color);
}

#cookieAccept {
  flex-shrink: 0;
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

#cookieAccept:hover {
  background: #1177d1;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--primary-color);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
    gap: 1rem;
  }

  .navbar-menu.active {
    left: 0;
  }

  .navbar-toggle {
    display: block;
  }

  .container {
	  margin: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.2rem;
  }

  .content-section h1 {
    font-size: 2rem;
    text-align: center;
  }

  .content-section h2 {
    font-size: 1.5rem;
  }

  .content-section img {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .action-section {
	display: flex;
	flex-direction: column;
	align-items: center;
  }

  .action-section a {
    margin-left: 0;
	margin-top: 1rem;
  }

  .action-section a {
	margin-top: 1rem;
  }

  .action-section a:first-of-type {
	margin-top: 0;
 }
}
