* {
  box-sizing: border-box;
}

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

body {
  font-family: Arial, sans-serif;
  margin: 0;
  background:#f5f7fb;
  line-height: 1.5;
}

header {
  position: sticky;
  top: 0;
  z-index: 900;
  background:#0b2a4a;
  color:white;
  padding:15px 0;
  box-shadow: 0 6px 18px rgba(11, 42, 74, 0.16);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.login {
  color: white;
  cursor: pointer;
}

.container {
  width:90%;
  max-width:1100px;
  margin:auto;
}

nav a {
  color:white;
  margin-right:15px;
  text-decoration:none;
  display: inline-block;
}

.hero {
  position: relative;
  min-height: clamp(380px, 68vh, 540px);
  color:white;
  padding:clamp(72px, 12vh, 120px) 20px clamp(40px, 7vh, 72px);
  text-align:center;
  background:
    linear-gradient(rgba(11, 42, 74, 0.48), rgba(11, 42, 74, 0.28)),
    linear-gradient(180deg, #1f4e79 0%, #12395d 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/hero.jpg') no-repeat center bottom / contain;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 2.5rem;
  margin: 0 0 12px;
}

.hero p {
  font-size: 1.1rem;
  margin: 0 auto 20px;
  max-width: 720px;
}

.section h2 {
  font-size: 2rem;
  margin: 0 0 20px;
}

.btn {
  background:#00aaff;
  color:white;
  padding:10px 20px;
  text-decoration:none;
  border-radius:5px;
}

.section {
  padding:clamp(32px, 5vw, 50px) 20px;
}

.grid {
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
  gap:20px;
}

.card {
  background:white;
  padding:20px;
  border-radius:6px;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}

.news-panel {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.news-status {
  font-weight: bold;
  margin-bottom: 12px;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}

.news-item a {
  color: #0b2a4a;
  text-decoration: none;
  font-weight: 600;
}

.news-item a:hover {
  text-decoration: underline;
}

.news-meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.9rem;
  color: #4a5b6b;
}

.news-source {
  background: #e8f4ff;
  color: #0b2a4a;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
}

form input, form textarea {
  width:100%;
  padding:10px;
  margin:10px 0;
}

button {
  padding:10px 20px;
  background:#0b2a4a;
  color:white;
  border:none;
}

footer {
  background:#0b2a4a;
  color:white;
  text-align:center;
  padding:18px 20px;
}

footer p {
  margin: 0;
}

/* Chatbot Styles */
.chat-modal {
  display: block;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  height: 420px;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 40px);
  background: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  overflow: hidden;
  cursor: pointer;
}

.chat-modal.minimized {
  height: 50px;
}

.chat-modal.minimized .chat-messages,
.chat-modal.minimized .chat-input {
  display: none;
}

.chat-header {
  background: #0b2a4a;
  color: white;
  padding: 10px;
  text-align: center;
  font-weight: bold;
}

.chat-messages {
  height: 280px;
  overflow-y: auto;
  padding: 10px;
  background: #f9f9f9;
}

.chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ccc;
}

.chat-input input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.chat-input button {
  padding: 8px 12px;
  background: #00aaff;
  color: white;
  border: none;
  border-radius: 4px;
  margin-left: 5px;
  cursor: pointer;
}

.message {
  margin-bottom: 10px;
}

.message.user {
  text-align: right;
}

.message.bot {
  text-align: left;
}

@media (max-width: 900px) {
  header .container {
    justify-content: center;
  }

  nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: center;
  }

  nav a {
    margin-right: 0;
  }

  .header-right {
    width: 100%;
    justify-content: center;
  }

  .hero {
    min-height: clamp(360px, 62vh, 460px);
  }

  .hero::before {
    background-position: center bottom;
    background-size: cover;
  }
}

@media (max-width: 600px) {
  header .container {
    flex-direction: column;
    align-items: stretch;
  }

  .header-right {
    flex-direction: column;
    align-items: stretch;
  }

  .header-right .btn,
  .header-right .login {
    text-align: center;
    width: 100%;
  }

  .hero {
    min-height: clamp(320px, 56vh, 400px);
    padding: 56px 16px 36px;
  }

  .hero::before {
    background-size: contain;
    background-position: center bottom;
  }

  .hero h2 {
    font-size: 1.9rem;
  }

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

  .section h2 {
    font-size: 1.6rem;
  }

  .btn {
    display: inline-block;
    width: 100%;
    max-width: 360px;
  }

  .section {
    padding: 28px 16px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .chat-modal {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    height: 60vh;
  }

  .chat-modal.minimized {
    height: 50px;
  }

  .chat-messages {
    height: calc(60vh - 110px);
  }

  footer {
    padding: 18px 16px;
  }
}
