@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  --red-primary: #cc0000;
  --red-dark: #990000;
  --red-header: #b80000;
  --red-gradient-start: #e10c13;
  --red-gradient-end: #8b0000;
  --navy: #003366;
  --navy-light: #132d5e;
  --gold: #ffcc00;
  --gold-light: #d4b52a;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --page-bg: #f4f4f4;
  --text-dark: #222;
  --text-gray: #555;
  --border-gray: #dee2e6;
  --footer-bg: #8b0000;
}

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

body {
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--page-bg);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--red-gradient-start);
  color: var(--white);
  padding: 12px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left img {
  height: 70px;
  width: auto;
}

.header-center {
  text-align: center;
  flex: 1;
  padding: 0 20px;
}

.header-center h1 {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--white);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right img {
  height: 60px;
  width: auto;
}

.lang-flags {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
}

.lang-flags img {
  width: 22px;
  height: 15px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.4);
}

/* Hamburger - hidden on desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: 0.3s;
}

/* ===== NAVIGATION ===== */
.main-nav {
  background: var(--red-dark);
  padding: 0;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.main-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.main-nav ul li a {
  display: block;
  color: var(--white);
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  background: rgba(255,255,255,0.12);
  text-decoration: underline;
}

/* ===== HERO ROW ===== */
.hero-row {
  display: flex;
  gap: 25px;
  max-width: 1100px;
  margin: 40px auto;
  align-items: stretch;
}

.hero-row .page-intro {
  flex: 1;
  margin: 0;
  border-radius: 4px;
}

/* ===== HERO / CAROUSEL (fade) ===== */
.hero-carousel {
  position: relative;
  width: 100%;
  flex: 1.1;
  max-width: none;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 300px;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-slide .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #000;
  color: var(--white);
  padding: 20px 15px 12px;
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
}

/* ===== PAGE INTRO ===== */
.page-intro {
  max-width: 1100px;
  margin: 40px auto;
  padding: 25px 30px;
}

.page-intro h2 {
  color: var(--navy);
  font-size: 1.8em;
  margin-bottom: 12px;
}

.page-intro p {
  color: var(--text-gray);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ===== CONTENT CONTAINER ===== */
.content-container {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

/* ===== SECTION WITH IMAGE ===== */
.section-with-image {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  max-width: 1100px;
  margin: 40px auto;
  padding: 25px 30px;
}

.section-text {
  flex: 0 0 50%;
}

.section-text h2 {
  color: var(--navy);
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--navy);
  display: block;
}

.section-text p {
  color: var(--text-gray);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 10px;
  text-align: justify;
}

.section-text p strong {
  color: var(--text-dark);
}

.section-image {
  flex: 0 0 50%;
  overflow: hidden;
}

.section-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  vertical-align: top;
}

.section-image .img-caption {
  display: block;
  width: 100%;
  background: #000;
  color: #fff;
  font-size: 0.78rem;
  text-align: center;
  padding: 8px 12px;
  margin: 0;
  font-style: normal;
}

/* ===== TEXT ONLY SECTIONS ===== */
.text-section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 25px 30px;
}

.text-section h2 {
  color: var(--navy);
  font-size: 1.8em;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 6px;
}

.text-section p {
  color: var(--text-gray);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 10px;
  text-align: justify;
}

.text-section ul, .text-section ol {
  margin: 10px 0 10px 25px;
  color: var(--text-gray);
  font-size: 0.9rem;
}

.text-section ul li, .text-section ol li {
  margin-bottom: 5px;
  line-height: 1.6;
}

.text-section a {
  color: var(--red-primary);
  text-decoration: underline;
}

.read-more-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 22px;
  background: var(--navy);
  color: var(--white);
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
}

.read-more-btn:hover {
  background: var(--navy-light);
}

/* Home: sections after "Apply for Montenegro eVisa" (revealed by Read more) */
.home-more-section:not(.is-visible) {
  display: none !important;
}

/* ===== FAQ HOME (index only — numbered list, no accordion) ===== */
.faq-home {
  max-width: 1100px;
  margin: 40px auto;
  padding: 28px 36px 36px;
}

.faq-home h2 {
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--navy);
  font-size: 1.8em;
  font-weight: 700;
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--navy);
}

.faq-home-block {
  margin-top: 22px;
}

.faq-home-block:first-of-type {
  margin-top: 18px;
}

.faq-home-q {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.45;
  margin: 0 0 8px;
}

.faq-home-a {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-gray);
  line-height: 1.75;
  margin: 0;
  padding-left: 1.35em;
}

/* ===== FAQ ACCORDION (faq.html) ===== */
.faq-item {
  margin-bottom: 12px;
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  overflow: hidden;
}

.faq-question {
  background: var(--navy);
  color: var(--white);
  padding: 12px 18px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--navy-light);
}

.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 700;
  transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  font-size: 0.88rem;
  color: var(--text-gray);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 15px 18px;
}

/* ===== TWO COLUMN LAYOUT ===== */
.two-col-layout {
  display: flex;
  gap: 30px;
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
  align-items: flex-start;
}

.col-left {
  flex: 1;
  background: var(--white);
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1px solid var(--border-gray);
}

.col-right {
  flex: 1.2;
  background: var(--white);
  padding: 30px;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  border: 1px solid var(--border-gray);
}

.col-left h2, .col-right h2 {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--navy);
  font-size: 1.3rem;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 8px;
}

.col-left p, .col-right p {
  color: var(--text-gray);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: justify;
  margin-bottom: 10px;
}

.col-left ul, .col-left ol {
  margin: 10px 0 10px 20px;
  color: var(--text-gray);
  font-size: 0.9rem;
}

.col-left ul li, .col-left ol li {
  margin-bottom: 5px;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--navy);
}

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

.form-row {
  display: flex;
  gap: 15px;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
}

.captcha-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.captcha-image {
  background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 6px;
  font-family: 'Courier New', monospace;
  color: var(--navy);
  border: 2px dashed #999;
  user-select: none;
  min-width: 120px;
  text-align: center;
}

.captcha-refresh {
  padding: 8px 16px;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s;
}

.captcha-refresh:hover {
  background: var(--gold-light);
}

.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.btn-primary {
  padding: 10px 28px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--navy-light);
}

.btn-secondary {
  padding: 10px 28px;
  background: #666;
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #777;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: var(--navy-light);
}

/* ===== EMPLOYER LOGIN ===== */
.login-bg {
  background: linear-gradient(135deg, #dce6f5 0%, #e8edf5 100%);
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

.login-card {
  background: var(--white);
  padding: 40px 35px;
  border-radius: 8px;
  box-shadow: 0 4px 25px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 420px;
}

.login-card h2 {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--navy);
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 6px;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 10px;
}

/* ===== ELIGIBLE COUNTRIES TABLE ===== */
.countries-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

.countries-page h1 {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--navy);
  text-align: center;
  font-size: 1.8rem;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.countries-page p {
  text-align: center;
  color: var(--text-gray);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.countries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-gray);
}

.country-cell {
  padding: 12px 16px;
  border: 1px solid var(--border-gray);
  font-size: 0.88rem;
  color: var(--text-dark);
}

.country-cell a {
  color: var(--navy);
  text-decoration: underline;
}

/* ===== JOB SEEKER ===== */
.job-seeker-form fieldset {
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  padding: 15px 20px;
  margin-bottom: 20px;
}

.job-seeker-form legend {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--navy);
  padding: 0 8px;
}

.checkbox-group {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.checkbox-group label {
  font-weight: 400;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===== LEGAL PAGES (Terms, Privacy) ===== */
.legal-page {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
}

.legal-card {
  background: var(--white);
  border: 1px solid var(--border-gray);
  padding: 40px 50px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.legal-card h1 {
  font-family: 'Merriweather', Georgia, serif;
  color: var(--text-dark);
  text-align: center;
  font-size: 1.7rem;
  margin-bottom: 20px;
}

.legal-card .legal-meta {
  font-size: 0.85rem;
  color: var(--text-gray);
  margin-bottom: 25px;
  line-height: 1.8;
}

.legal-card .legal-meta strong {
  color: var(--text-dark);
}

.legal-card .legal-meta a {
  color: var(--navy);
  text-decoration: underline;
}

.legal-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 25px 0 8px;
  padding-left: 14px;
  border-left: 4px solid var(--navy);
}

.legal-card p {
  font-size: 0.88rem;
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 8px;
}

.legal-card ul {
  margin: 8px 0 8px 30px;
  font-size: 0.88rem;
  color: var(--text-gray);
}

.legal-card ul li {
  margin-bottom: 4px;
  line-height: 1.6;
}

.legal-card a {
  color: var(--navy);
  text-decoration: underline;
}

.legal-card .legal-contact {
  margin-top: 20px;
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.legal-card .legal-contact a {
  color: var(--navy);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--white);
  text-align: center;
  padding: 18px 20px;
  font-size: 0.82rem;
  margin-top: 40px;
}

.site-footer a {
  color: var(--gold);
  margin: 0 5px;
  text-decoration: none;
  font-weight: 900;
  padding: 8px 14px;
}

.site-footer a:hover {
  background: #f50d0d;
  border-radius: 4px;
}

.site-footer .separator {
  margin: 0 8px;
  color: rgba(255,255,255,0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Mobile header: keep red bar with logos, add white bar below */
  .site-header {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .header-left img {
    height: 55px;
  }

  .header-right img {
    height: 45px;
  }

  .header-center {
    order: 4;
    flex: 0 0 110%;
    background: var(--white);
    margin: 12px -16px -12px;
    padding: 10px 50px 10px 16px;
    position: relative;
  }

  .header-center h1 {
    color: var(--text-dark);
    font-size: 0.70rem;
    text-align: center;
    font-weight: 700;
  }

  .hamburger {
    display: flex;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
  }

  /* Nav: hidden by default, slides open */
  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav ul li a {
    padding: 12px 20px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .section-with-image {
    flex-direction: column;
  }

  .section-image,
  .section-text {
    flex: none;
    width: 100%;
  }

  .two-col-layout {
    flex-direction: column;
  }

  .countries-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-row {
    flex-direction: column;
  }

  .carousel-track {
    height: 220px;
  }

  .form-row {
    flex-direction: column;
  }

  .legal-card {
    padding: 25px 20px;
  }
}

@media (max-width: 480px) {
  .countries-grid {
    grid-template-columns: 1fr;
  }

  .header-center h1 {
    font-size: 0.70rem;
  }

  .header-left img {
    height: 45px;
  }

  .header-right img {
    height: 38px;
  }
}
