/* IGT Academy — Complete Stylesheet */
:root {
  --primary: #0a2a66;
  --primary-600: #143d99;
  --accent: #e63946;
  --bg: #f4f6f9;
  --card-bg: #ffffff;
  --muted: #6b7280;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: #222;
  overflow-x: hidden;
}

img, iframe, video, svg {
  max-width: 100%;
  height: auto;
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--primary);
  padding: 10px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  min-height: 60px;   /* prevents collapse */
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ===== LOGO IMAGE FIX ===== */
.logo-area img {
  height: 45px;       /* lock height to fit navbar */
  width: auto;        /* scale width proportionally */
  max-width: 160px;   /* safety cap */
  display: block;
}

.logo {
  color: white;
  font-size: 22px;
  font-weight: bold;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 10px;
}

.nav-links li {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
}

.nav-links a {
  color: white;
  text-decoration: none;
  padding: 14px 18px;
  display: block;
  font-size: 16px;
}

.nav-links a:hover {
  background: var(--primary-600);
}

.search-item {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 560px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.search-input {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  flex: 1 1 180px;
  min-width: 0;
  width: 100%;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}


.search-btn {
  border: none;
  border-radius: 22px;
  padding: 10px 16px;
  background: #ffffff;
  color: #222;
  cursor: pointer;
  font-weight: 600;
}

.search-btn:hover {
  background: #f2f2f2;
}

.welcome {
  color: #ffd966;
  font-weight: bold;
  padding: 0 15px;
}

/* Dropdown */
.dropdown-content {
  display: none;
  position: absolute;
  background: white;
  top: 45px;
  min-width: 220px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 10;
}

.dropdown-content a {
  color: #333;
  padding: 12px;
  display: block;
}

.dropdown-content a:hover {
  background: #f2f2f2;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  padding: 24px 14px 40px;
  text-align: center;
}

.main-content h1 {
  color: var(--primary);
  font-size: 28px;
  line-height: 1.2;
}

.main-content p {
  max-width: 900px;
  margin: auto;
  font-size: 16px;
  color: #555;
  line-height: 1.7;
}

/* ===== LEFT‑RIGHT LIST (lr-list) ===== */
.lr-list {
  max-width: 1200px;
  margin: 36px auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 16px;
}

.lr-item {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: white;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  align-items: flex-start;
}

.lr-img {
  width: 100%;
  max-width: 100%;
  border-radius: 6px;
  overflow: hidden;
}

.lr-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform .36s ease;
  transform: scale(1.04);
}

.lr-item:hover .lr-img img {
  transform: scale(1);
}

.lr-body {
  flex: 1;
  min-width: 0;
}

.lr-body h3 {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 18px;
}

.lr-body p {
  margin: 0;
  color: #333;
  font-size: 15px;
  line-height: 1.65;
  text-align: justify;
}

/* ===== COMPREHENSIVE GUIDE ===== */
.detailed-guide {
  max-width: 1200px;
  margin: 40px auto;
  background: #fff;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.detailed-guide h2 {
  color: var(--primary);
  margin-top: 0;
}

.detailed-guide p {
  color: #333;
  line-height: 1.8;
  text-align: justify;
}

/* ===== PAGES GRID ===== */
.pages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 20px 0;
  max-width: 1100px;
  margin: auto;
}

.pages-grid a {
  text-decoration: none;
  color: var(--primary);
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  text-align: center;
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(180deg, #061738 0%, #0a2a66 100%);
  color: #e8f0ff;
  padding: 36px 20px;
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
}

.footer-desc {
  margin: 0;
  color: #d7e6ff;
  line-height: 1.6;
  font-size: 14px;
}

.social-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.social-btn svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: currentColor;
}

.social-btn--tiktok svg {
  color: #fff;
  filter: drop-shadow(1px 0 #25f4ee) drop-shadow(-1px 0 #fe2c55);
}

.social-btn--youtube svg {
  color: #ff4b4b;
}

.social-btn--instagram svg {
  fill: none;
}

.social-btn--twitter svg {
  color: #1d9bf0;
}

.social-btn--linkedin svg {
  color: #0a91d0;
}

.social-btn:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 5px 14px rgba(0,0,0,0.2);
}

.social-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.contact-block {
  background: rgba(255,255,255,0.03);
  padding: 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-title {
  color: #fff;
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 15px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #e6f2ff;
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-bottom {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: #cfe1ff;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ===== FORM STYLES (login, signup, etc.) ===== */
.container {
  max-width: 980px;
  margin: 20px auto;
  padding: 0 14px;
}

.form-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(10,42,102,0.06);
  padding: 20px;
}

.form-card h1, .form-card h2 {
  color: var(--primary);
  margin: 0 0 12px;
}

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--primary);
}

input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
}

input[type="radio"] {
  margin-right: 6px;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  margin-top: 12px;
}

.form-actions .btn {
  width: 100%;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-600);
}

.btn-primary:disabled {
  background: #d3d3d3;
  color: #888;
  cursor: not-allowed;
  opacity: 0.5;
  border: 2px solid #999;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:disabled:hover {
  background: #d3d3d3;
}

.btn-outline {
  background: transparent;
  border: 1px solid #cbd5e1;
  color: var(--primary);
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

/* ===== AVATAR IN NAVBAR ===== */
.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    vertical-align: middle;
}

.nav-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffd966;
    font-size: 14px;
    font-weight: bold;
    color: #0a2a66;
    border: 2px solid white;
}

/* Reduce padding on the dropdown link that contains the avatar */
.avatar-dropdown {
    padding: 6px 8px !important;
    line-height: 1;
}

.nav-links li:last-child a.avatar-dropdown {
    padding: 6px 8px !important;
}

/* Right-aligned dropdown for the avatar menu */
.dropdown-content-right {
    right: 0;
    left: auto;
}

.nav-links li:last-child .dropdown-content {
    right: 0;
    left: auto;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 769px) {
  .main-content {
    padding: 50px 20px;
  }
  .main-content h1 {
    font-size: 36px;
  }
  .main-content p {
    font-size: 18px;
  }
  .pages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 30px;
  }
  .container {
    margin: 32px auto;
    padding: 0 16px;
  }
  .form-card {
    padding: 28px;
  }
  .form-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .form-grid .col-half {
    width: 48%;
  }
  .form-grid .col-full {
    width: 100%;
  }
  .form-actions {
    flex-direction: row;
    align-items: center;
  }
  .form-actions .btn {
    width: auto;
  }
  .footer-container {
    grid-template-columns: 1fr 320px;
  }
  .lr-item {
    flex-direction: row;
  }
  .lr-img {
    flex: 0 0 320px;
    max-width: 320px;
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
    padding: 12px 16px;
  }
  .logo-area img {
    height: 36px;       /* slightly smaller on mobile */
    width: auto;
    max-width: 130px;
  }
  .logo {
    font-size: 18px;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .nav-links a {
    padding: 12px;
  }
  .search-item {
    width: 100%;
    justify-content: center;
  }
  .search-form {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }
  .search-input,
  .search-btn {
    width: 100%;
  }
  .search-btn {
    text-align: center;
    padding: 12px 16px;
  }
  .search-suggestions {
    left: 0;
    right: 0;
  }
  .dropdown-content {
    position: relative;
    top: 0;
    box-shadow: none;
  }
  .main-content h1 {
    font-size: 26px;
  }
  .contact-block {
    order: 2;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding: 24px 12px 32px;
  }
  .main-content h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
    overflow-wrap: anywhere;
  }
  .lr-list {
    margin: 24px auto;
    padding: 0 12px;
  }
  .lr-item,
  .detailed-guide,
  .form-card {
    padding: 16px;
  }
  .footer {
    padding: 28px 16px;
  }
  .footer-container {
    gap: 22px;
  }
  .footer-bottom {
    padding: 14px 0 0;
    overflow-wrap: anywhere;
  }
  .social-btn {
    min-height: 40px;
  }
  .contact-block {
    padding: 14px;
  }
  .form-card input,
  .form-card select,
  .form-card textarea,
  .form-card button {
    max-width: 100%;
  }
}

/* ===== ACCESSIBILITY ===== */
a:focus, button:focus, input:focus, select:focus {
  outline: 3px solid rgba(14,76,167,0.12);
  outline-offset: 2px;
}

/* ===== USER-GENERATED CONTENT ISOLATION ===== */
/* CSS isolation for blog posts, lessons, and other user HTML content */
/* Prevents user-provided CSS from conflicting with site styles */

.post-content-wrapper,
.lesson-content-wrapper {
  width: 100%;
  margin: 24px 0;
}

.post-content-wrapper iframe,
.lesson-content-wrapper iframe {
  width: 100% !important;
  border: none !important;
  overflow: hidden !important;
  background: white !important;
  display: block !important;
  margin: 16px 0 !important;
}

/* Fallback for direct content display (if iframe not used) */
.post-content-isolated,
.lesson-content-isolated {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.post-content-isolated img,
.lesson-content-isolated img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 6px;
  display: block;
}

.post-content-isolated h1,
.post-content-isolated h2,
.post-content-isolated h3,
.post-content-isolated h4,
.post-content-isolated h5,
.post-content-isolated h6,
.lesson-content-isolated h1,
.lesson-content-isolated h2,
.lesson-content-isolated h3,
.lesson-content-isolated h4,
.lesson-content-isolated h5,
.lesson-content-isolated h6 {
  margin: 20px 0 12px;
  line-height: 1.3;
  color: #1a202c;
}

.post-content-isolated p,
.lesson-content-isolated p {
  margin: 12px 0;
  line-height: 1.6;
}