@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Colors */
  --primary-blue: #004b87;
  /* Trust, Industry */
  --primary-green: #00a651;
  /* Growth, Chemicals */
  --secondary-blue: #003366;
  --secondary-green: #008744;
  --accent-blue: #e3f2fd;
  --accent-green: #e8f5e9;

  /* Neutrals */
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;

  /* Utilities */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--primary-green);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Flex & Grid */
.flex {
  display: flex;
}

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

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-4 {
  gap: 2rem;
}

.gap-6 {
  gap: 3rem;
}

.grid {
  display: grid;
}

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

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-blue);
  color: var(--bg-white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--secondary-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--primary-green);
  color: var(--bg-white);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: var(--secondary-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-outline:hover {
  background-color: var(--primary-blue);
  color: var(--bg-white);
}

/* Header & Sticky Menu */
.header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo img {
  height: 50px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-menu a {
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--primary-green);
  transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-blue);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--primary-blue);
  cursor: pointer;
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: var(--bg-white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo img {
  height: 60px;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
}

.footer-desc {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.footer-heading {
  color: var(--bg-white);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #9ca3af;
}

.footer-links a:hover {
  color: var(--primary-green);
  padding-left: 0.5rem;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #9ca3af;
}

.footer-contact i {
  color: var(--primary-green);
  font-size: 1.25rem;
  margin-top: 0.25rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  color: #9ca3af;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 3px #999;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

/* Responsive */
@media (max-width: 992px) {
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    gap: 1.5rem;
    transform: translateY(-150%);
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    z-index: 999;
  }

  .mobile-toggle {
    display: block;
  }

  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }
}

/* Book Card for Vlog Section */
.book-card {
  background: var(--bg-white);
  border-radius: 4px 12px 12px 4px;
  overflow: hidden;
  box-shadow: -5px 0 0 rgba(0,0,0,0.03), 5px 5px 15px rgba(0,0,0,0.08);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 12px solid var(--primary-blue);
  aspect-ratio: 1 / 1.1;
  text-decoration: none;
}

.book-card:nth-child(even) {
  border-left-color: var(--primary-green);
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: -5px 0 0 rgba(0,0,0,0.05), 8px 8px 20px rgba(0,0,0,0.12);
}

.book-cover {
  width: 100%;
  height: 50%;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.book-card:hover .book-cover img {
  transform: scale(1.1);
}

.book-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  position: relative;
}

.book-content h3 {
  font-size: 1.15rem;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.book-list {
  margin-bottom: 0.75rem;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.book-list li {
  font-size: 0.85rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.book-list i {
  color: var(--primary-green);
  font-size: 0.5rem;
}

.book-link {
  color: var(--primary-blue);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  align-self: flex-start;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.book-card:hover .book-link {
  color: var(--primary-green);
  border-bottom-color: var(--primary-green);
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 45px;
  height: 45px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  font-size: 1.2rem;
  opacity: 0.85;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 2;
}

.book-card:hover .play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
  color: var(--primary-green);
}

/* AI Agent Widget */
.ai-agent-widget {
  position: fixed;
  bottom: 110px;
  right: 40px;
  z-index: 1000;
  font-family: var(--font-family);
}

.ai-agent-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}

.ai-agent-toggle::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  background-color: #25d366;
  border-radius: 50%;
  border: 2px solid white;
}

.ai-agent-toggle:hover {
  transform: scale(1.1);
}

.ai-agent-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 500px;
  max-height: calc(100vh - 120px);
  background-color: var(--bg-white);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.ai-agent-window.active {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}

.ai-agent-header {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-avatar {
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.ai-agent-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.8;
  transition: var(--transition);
}

.ai-agent-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

.ai-agent-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #f3f4f6;
  scrollbar-width: thin;
}

.message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
  animation: fadeIn 0.3s ease;
  word-wrap: break-word;
}

.message.bot {
  background-color: white;
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.message.user {
  background-color: var(--primary-blue);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-agent-input {
  padding: 1rem;
  background-color: white;
  border-top: 1px solid var(--border-color);
}

.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.quick-reply-btn {
  background-color: var(--accent-blue);
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.quick-reply-btn:hover {
  background-color: var(--primary-blue);
  color: white;
}

#aiAgentInput {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  outline: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

#aiAgentInput:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(0, 75, 135, 0.1);
}

.ai-agent-send {
  background-color: var(--primary-blue);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.ai-agent-send:hover {
  background-color: var(--secondary-blue);
  transform: scale(1.05);
}

.ai-typing {
  align-self: flex-start;
  background-color: white;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  display: none;
}

.ai-typing .dot {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.ai-typing .dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 480px) {
  .ai-agent-widget {
    right: 20px;
    bottom: 90px;
  }

  .ai-agent-window {
    width: calc(100vw - 40px);
    right: 0;
    bottom: 70px;
  }
}