/* --- Dynamics Solution V2 | Premium Design System --- */

:root {
  /* Brand Colors */
  --primary: #1d3b6b; /* Deep Royal Blue */
  --primary-dark: #152b4e;
  --accent: #3d98d3; /* Bright Blue */
  --accent-light: #eaf3ff;
  --text-dark: #2c3e50;
  --text-gray: #64748b;
  --text-light: #f8f9fa;
  --white: #ffffff;

  /* Gradients */
  --gradient-main: linear-gradient(135deg, #1d3b6b 0%, #152b4e 100%);
  --gradient-hover: linear-gradient(135deg, #2c528a 0%, #1d3b6b 100%);

  /* Shadows & Glass */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: 1px solid rgba(255, 255, 255, 0.2);
  --nav-glass: rgba(29, 59, 107, 0.9); /* Dark glass for navbar */

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  background-color: #f4f7fa;
  color: --text-dark;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  color: var(--primary);
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Typography Utilities --- */
.text-center {
  text-align: center;
}
.text-primary {
  color: var(--primary);
}
.text-accent {
  color: var(--accent);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(61, 152, 211, 0.3);
}

.btn-primary:hover {
  background: #2b80b5;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(61, 152, 211, 0.4);
}

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

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

/* --- Header & Navbar (Sticky Glass) --- */
.navbar {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 5px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-btn-login {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 40px; /* Increased padding for wider button */
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 120px;
  text-align: center;
}

.nav-btn-login:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* --- Hero Section (Immersive) --- */
.hero {
  position: relative;
  height: 100vh; /* Full Height */
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  background: url("../assets/Image-Header2.jpg") no-repeat center center/cover;
  overflow: hidden;
  margin-top: -80px; /* Offset for sticky header transparency */
  padding-top: 80px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(21, 43, 78, 0.9) 0%,
    rgba(13, 27, 50, 0.8) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 20px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--white); /* Ensure contrast against dark overlay */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0; /* Animated in JS */
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards 0.3s;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 40px;
  color: rgba(255, 255, 255, 0.95);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards 0.6s;
}

.hero-cta-group {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s ease forwards 0.9s;
}

/* --- Internal Page Header --- */
.page-header {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background: url("../assets/Image-Header2.jpg") no-repeat center center/cover;
  margin-top: -80px;
  padding-top: 80px;
}

.page-header .hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(21, 43, 78, 0.85) 0%,
    rgba(13, 27, 50, 0.9) 100%
  );
}

.page-title {
  position: relative;
  z-index: 2;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--white); /* Ensure contrast */
  text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* --- Contact Form Section --- */
.contact-section {
  padding: 80px 0;
  background: #f8faff;
}

.contact-card {
  background: var(--white);
  border-radius: 20px;
  padding: 50px;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--accent);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 15px;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background: #fcfdfe;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(61, 152, 211, 0.1);
  background: #fff;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Intl Tel Input Overrides */
.iti {
  width: 100%;
}
.iti__country-list {
  z-index: 100;
}

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

/* Tablet & Mobile Responsiveness */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--primary-dark);
    flex-direction: column;
    padding-top: 80px;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
  }

  .nav-links.active {
    right: 0;
  }
}

/* --- Product Category Grid & Cards --- */
.category-description {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-gray);
  margin-bottom: 50px;
  text-align: center;
}

.product-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  padding-bottom: 60px;
}

.product-card-enhanced {
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.product-card-enhanced:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(61, 152, 211, 0.3);
}

.product-card-body {
  padding: 35px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-card-icon {
  width: 60px;
  height: 60px;
  background-color: var(--accent-light);
  color: var(--accent);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.8rem;
  margin-bottom: 25px;
  transition: var(--transition);
}

.product-card-enhanced:hover .product-card-icon {
  background-color: var(--accent);
  color: var(--white);
  transform: scale(1.05);
}

.product-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 15px;
}

.product-card-text {
  color: var(--text-gray);
  line-height: 1.7;
  flex-grow: 1;
  margin-bottom: 25px;
}

.product-card-footer {
  margin-top: auto;
}

.btn-learn-more {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: padding 0.3s;
}

.btn-learn-more i {
  margin-left: 8px;
  transition: transform 0.3s;
}

.btn-learn-more:hover {
  padding-left: 5px;
  color: var(--primary);
}

.btn-learn-more:hover i {
  transform: translateX(5px);
}

/* Breadcumb adaptation for V2 */
.breadcrumb {
  margin-top: 10px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
}
.breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}
.breadcrumb span {
  margin: 0 8px;
  opacity: 0.5;
}
/* --- Use Case Cards --- */
.usecase-card {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
}

.usecase-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(61, 152, 211, 0.2);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.usecase-icon {
  width: 50px;
  height: 50px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.usecase-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.usecase-card p {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.6;
}

/* --- CTA Box --- */
.cta-box {
  background: var(--accent-light);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 60px;
}

.cta-text h2 {
  font-size: 1.8rem;
  margin-bottom: 5px;
  color: var(--primary);
}

.download-btn {
  background: var(--primary);
  color: var(--white);
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.download-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  color: var(--white); /* Ensure text remains white */
}

/* --- Dashboard Table (License Page) --- */
.dashboard-container {
  background: var(--white);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  margin-bottom: 60px;
  overflow-x: auto;
}

.dashboard-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.dashboard-search input {
  padding: 10px 15px;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  min-width: 250px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

th,
td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #f0f4f8;
}

th {
  font-weight: 600;
  color: var(--primary);
  background: #f8faff;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

tr:hover td {
  background: #fafbfc;
}

/* --- User Dropdown --- */
.user-menu-container {
  position: relative;
}

.user-toggle {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: var(--transition);
}

.user-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1001;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-info {
  padding: 10px 20px;
  border-bottom: 1px solid #f0f4f8;
  margin-bottom: 5px;
}

.user-name {
  display: block;
  font-weight: 600;
  color: var(--primary);
}

.user-company {
  font-size: 0.85rem;
  color: var(--text-gray);
}

.logout-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 10px 20px;
  color: #e74c3c;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.2s;
}

.logout-btn:hover {
  background: #fff5f5;
}

/* --- Popup Modal --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-modal {
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  transform: scale(0.9);
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}

.popup-overlay.active .popup-modal {
  transform: scale(1);
}

.popup-icon {
  width: 80px;
  height: 80px;
  background: #fee2e2;
  color: #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.popup-message {
  font-size: 1.1rem;
  color: var(--text-gray);
  margin-bottom: 30px;
}

.popup-btn-secondary {
  background: #f3f4f6;
  color: var(--text-dark);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.popup-btn-secondary:hover {
  background: #e5e7eb;
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-gray);
  cursor: pointer;
}

/* --- Fix for Section Stacking Context --- */
.products-section {
  padding: 80px 0;
  background: var(--white);
  position: relative;
  z-index: 10; /* Ensure it sits above the header's negative margin overlap if any */
}

/* Ensure buttons are clickable */
.product-card-enhanced .btn-learn-more {
  position: relative;
  z-index: 20;
  cursor: pointer;
}

/* --- USER REQUEST: UPPERCASE TITLES & WATERMARK ICONS --- */
h1, h2, h3, h4, h5, h6, .hero-title, .section-title, .page-title, .product-card-title {
    text-transform: uppercase !important;
}

/* Ensure parents establish a stacking context and hide overflow */
.product-category-card,
.service-card,
.feature-card,
.usecase-card,
.product-card-body,
.product-card-enhanced {
    position: relative !important;
    overflow: hidden !important;
    z-index: 1; 
}

/* Position icon wrappers as full-size background layers */
.cat-icon-box,
.svc-icon,
.feature-icon,
.usecase-icon,
.product-card-icon {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    margin: 0 !important;
    z-index: -1 !important; /* Put behind everything else */
    pointer-events: none !important; /* Let clicks pass through */
}

/* The actual icon styling: huge, faint, centered */
.cat-icon-box i,
.svc-icon i,
.feature-icon i,
.usecase-icon i,
.product-card-icon i {
    font-size: 8rem !important; /* Reduced size to fit nicely inside the box */
    opacity: 0.08 !important; /* Increased opacity so it's visible */
    color: var(--primary) !important; 
    /* Remove any margins/widths that might mess up flex centering */
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
}

/* Ensure all text content sits above the watermark */
.product-category-card h3, .product-category-card span,
.service-card h3, .service-card p,
.feature-card h3, .feature-card p,
.usecase-card h3, .usecase-card p,
.product-card-title, .product-card-text, .product-card-footer {
    position: relative !important;
    z-index: 2 !important;
}
