/* =========================
   RESET & BASE (Modern Light Theme)
========================= */
:root {
  --primary: #001f3f;
  /* Navy Blue */
  --primary-dark: #001219;
  --secondary: #FF6600;
  /* Orange */
  --secondary-hover: #e65c00;
  --text-main: #333333;
  --text-muted: #64748b;
  --bg-body: #f8fafc;
  /* Light Slate */
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --radius: 16px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  line-height: 1.6;
  background-color: var(--bg-body);
  /* Subtle light pattern */
  background-image:
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(255, 102, 0, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* subtle pattern */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: -1;
}

/* =========================
   LAYOUT & CONTAINER
========================= */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
  /* Increased Global Padding */
}

/* About Grid Layout */
.about-grid,
.contact-grid {
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
}

/* Specific override for contact grid desktop to be 1fr 1fr if needed, 
   but 1fr 1.5fr is also fine or we can separate them */
.contact-grid {
  grid-template-columns: 1fr 1fr;
}

.flex {
  display: flex;
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

/* =========================
   HEADER / NAVBAR
========================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 31, 63, 0.95);
  /* Navy Blue Semi-transparent */
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0;
  color: white;
  /* Adjusted padding */
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
}

.brand span {
  color: var(--secondary);
}

.logo {
  height: 40px;
  width: auto;
}

/* Mobile Menu Button - Hidden on Desktop */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  opacity: 1;
  transition: .2s;
}

.hero .actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  justify-content: center;
  flex-wrap: nowrap;
  /* Force single row */
}

.hero .actions .btn {
  padding: 12px 20px;
  /* Slightly smaller padding */
  font-size: 0.9rem;
  white-space: nowrap;
  /* Prevent text wrap */
}

/* Mobile Responsive */
@media(max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .topbar .container {
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    height: 70px;
    /* Fixed height to match desktop/positioning */
    padding: 0 16px;
  }

  /* Reposition Nav Links for Mobile */
  .nav-links {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(0, 31, 63, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    /* Border removed from here to prevent double line when closed */
  }

  .nav-links.active {
    max-height: 500px;
    /* Adjust based on content */
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Border only when open */
  }

  .nav-links a {
    margin: 0;
    padding: 15px 20px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-links form {
    width: 100%;
    padding: 15px 20px;
  }

  .nav-links .btn-primary {
    margin: 15px 20px;
    width: calc(100% - 40px);
  }
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--secondary);
}

.admin-bar {
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 70px;
  /* Below header */
  z-index: 90;
}

.admin-bar a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 20px;
  font-size: 0.9rem;
  padding: 5px 10px;
  border-radius: 6px;
  transition: .2s;
}

.admin-bar a:hover,
.admin-bar a.active {
  color: var(--primary);
  background: #f1f5f9;
}

/* =========================
   HERO SECTION
========================= */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, .75), rgba(2, 6, 23, .95)),
    url("https://plus.unsplash.com/premium_photo-1661932036915-4fd90bec6e8a?q=80&w=1170&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 600px;
  margin: 12px auto 30px;
  opacity: .85;
  color: #c7d2fe;
  font-size: 1.2rem;
}

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 34px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: .3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 10px 30px rgba(37, 99, 235, .35);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(37, 99, 235, .5);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  margin-left: 10px;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 8px;
  box-shadow: none;
}

/* =========================
   SECTIONS & CARDS (Light Theme)
========================= */
.section {
  padding: 60px 0;
}

.grid {
  display: grid;
  gap: 30px;
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-card);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: .4s ease;
  color: var(--text-main);
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--secondary);
}

.card h3 {
  margin-bottom: 10px;
  color: var(--primary);
  font-weight: 700;
}

.card p {
  color: var(--text-muted);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
  color: var(--secondary);
  /* Color only */
  /* Reverting to icon style */
  background: none;
  width: auto;
  height: auto;
  border-radius: 0;
}

/* =========================
   ANIMATIONS (Safe Mode)
========================= */
/* Default: Visible */
.fade-in-up,
.hero h1,
.card {
  opacity: 1;
  transform: translateY(0);
}

/* Initial state applied by JS */
.initial-state {
  opacity: 0 !important;
  transform: translateY(30px) !important;
}

/* Animation trigger */
.animate {
  animation: fadeUp 1s ease forwards;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* =========================
   PAGE HEADER
========================= */
.page-header {
  background:
    linear-gradient(rgba(0, 31, 63, 0.8), rgba(0, 31, 63, 0.9)),
    url("https://plus.unsplash.com/premium_photo-1661932036915-4fd90bec6e8a?q=80&w=1170&auto=format&fit=crop");
  background-size: cover;
  background-position: center;
  padding: 80px 20px;
  text-align: center;
  margin-bottom: 3rem;
  border-radius: 0 0 30px 30px;
  /* Modern touch */
}

.page-header h1 {
  color: #fff;
  margin-bottom: 10px;
}

.page-header p {
  color: #c7d2fe;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================
   FORMS (Light Theme)
========================= */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  color: var(--text-main);
  font-size: 1rem;
  transition: 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

/* =========================
   TABLES & UTILS (Light Theme)
========================= */
.table-responsive {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  color: var(--text-main);
}

th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background: #f8fafc;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

tr:hover {
  background: #f1f5f9;
}

.badge {
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge.pending {
  background: #fef9c3;
  color: #854d0e;
}

.badge.shipped {
  background: #e0f2fe;
  color: #0369a1;
}

.badge.delivered {
  background: #dcfce7;
  color: #15803d;
}

.badge.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  min-width: 300px;
  max-width: 400px;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease-out forwards;
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.toast.hide {
  animation: slideOut 0.3s ease-in forwards;
}

.toast-success {
  border-left-color: #22c55e;
}

.toast-success .toast-icon {
  color: #22c55e;
  background-color: #dcfce7;
}

.toast-error {
  border-left-color: #ef4444;
}

.toast-error .toast-icon {
  color: #ef4444;
  background-color: #fee2e2;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-main);
}

.toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.toast-close:hover {
  color: var(--text-main);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Footer */
footer {
  background: var(--primary);
  border-top: none;
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 20px 30px;
  text-align: center;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
  text-align: left;
}

.footer h4 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.footer ul {
  list-style: none;
}

.footer li {
  margin-bottom: 0.8rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: 0.3s;
  text-decoration: none;
  font-weight: 700;
}

.footer a:hover {
  color: var(--secondary);
  text-decoration: none;
}

/* Mobile */
@media(max-width:768px) {
  .hero h1 {
    font-size: 36px
  }

  .topbar .container {
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    height: auto;
    padding: 12px 16px;
    /* Added horizontal padding */
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links a {
    margin: 0;
  }

  /* Mobile About Grid */
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center;
    /* Optional: Center text on mobile */
  }

  .about-grid h2 {
    margin-top: 1rem;
  }

  /* Mobile Contact Grid */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Ensure nice global padding */
  .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}