/* --- THEME CONSTANTS --- */
:root {
  --primary: #ff3131;
  --primary-hover: #d90404;
  --dark: #000000;
  --card-bg: #111111; /* Dark gray for cards */
  --white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.7);
  --glow-color: rgba(255, 49, 49, 0.6);
}

/* --- BASE STYLES --- */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--dark) !important; /* Ensure body background is black */
  color: var(--white);
  overflow-x: hidden;
}

/* Ensure Bootstrap's text-primary uses our theme color */
.text-primary {
  color: var(--primary) !important;
}

/* --- NAVIGATION & MULTI-LEVEL DROPDOWN --- */
.navbar {
  background: transparent !important;
  padding: 20px 0;
  transition: all 0.4s ease;
  z-index: 1050;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95) !important;
  backdrop-filter: blur(10px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-logo {
  height: 45px;
  width: auto;
}

.nav-link {
  color: var(--white) !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  padding: 0.5rem 1rem !important;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary) !important;
}

/* Dropdown Basic Styling */
.dropdown-menu {
  background-color: #111 !important;
  border: 1px solid rgba(255, 49, 49, 0.2) !important;
  border-radius: 8px !important;
  margin-top: 0 !important;
  padding: 10px 0 !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.dropdown-item {
  color: var(--white) !important;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 20px !important;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-item:hover {
  background-color: var(--primary) !important;
  color: white !important;
}

/* Multi-level Dropdown Logic (Desktop) */
@media (min-width: 992px) {
  .dropdown-submenu {
    position: relative;
  }

  .dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px !important;
    display: none;
  }

  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }
  
  .dropdown-item.dropdown-toggle::after {
    transform: rotate(-90deg);
  }
}

/* Mobile Dropdown Styling */
@media (max-width: 991px) {
  .navbar-collapse {
    background: #000;
    padding: 20px;
    border-radius: 15px;
    margin-top: 15px;
    border: 1px solid rgba(255, 49, 49, 0.2);
  }
  
  .dropdown-menu {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 15px !important;
  }
  
  .dropdown-submenu .dropdown-menu {
    padding-left: 20px !important;
  }
}

/* --- HERO SECTION --- */
.hero-section {
  min-height: 100vh !important;
  background: linear-gradient(180deg, #000000 0%, #ff3131 50%, #000000 100%) !important;
  position: relative;
  overflow: hidden;
  padding-top: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* Ensure content is centered vertically */
}

.hero-content {
  z-index: 2;
  text-align: center; /* Center text content */
}

.text-gradient {
  background: linear-gradient(90deg, #ffffff, #ff3131);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-weight: 800;
}

.hero-image {
  max-width: 70%;
  filter: drop-shadow(0 0 40px rgba(255, 49, 49, 0.4));
  margin-top: 3rem;
}

/* --- BUTTONS --- */
.btn-primary {
  background-color: var(--primary) !important;
  border: none !important;
  padding: 16px 40px !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: all 0.3s ease;
  color: white !important;
  display: inline-block;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  background: linear-gradient(45deg, transparent, var(--white), var(--primary), transparent);
  background-size: 200% 200%;
  z-index: -1;
  animation: borderGlow 3s linear infinite;
  border-radius: 50px;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--primary);
  border-radius: 48px;
  z-index: -1;
}

@keyframes borderGlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--glow-color);
}

/* --- SECTIONS BACKGROUNDS (Ensure black) --- */
#services,
#animated-text-section,
#about-us-content,
#contact-us-content,
#3cx-content,
#terms-conditions-content,
#privacy-policy-content,
#policy-content,
#pricing-section, /* Added pricing section */
#pbx-phone-system-section,
#global-phone-numbers-section, /* New: Global Phone Numbers section */
#3cx-support-plans-section { /* New: 3CX Support Plans section */
  background-color: var(--dark) !important;
}

/* --- CARDS --- */
.service-card {
  background-color: var(--card-bg) !important; /* Ensure card background is dark gray */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 20px !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: var(--white) !important; /* Explicitly set card text color to white */
  height: 100%;
}

.service-card:hover {
  transform: translateY(-15px);
  border-color: var(--primary) !important;
  box-shadow: 0 15px 40px rgba(255, 49, 49, 0.25);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--primary) !important; /* Added !important here */
}

.company-name {
  color: var(--primary) !important;
  font-weight: 600;
}

/* Pricing card specific adjustments */
.pricing-card .card-body ul {
  padding-left: 0;
  list-style: none;
}

.pricing-card .card-body ul li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Changed to flex-start */
  text-align: left; /* Changed to left */
}

.pricing-card .card-body ul li i {
  margin-right: 8px;
  color: var(--primary);
}


/* --- DIVIDER --- */
.thin-line {
  border: none;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  width: 90%;
  margin: 40px auto;
  opacity: 0.8;
}

/* --- FOOTER --- */
.footer-logo { height: 45px; }
footer { background-color: #000; }
footer a { color: rgba(255,255,255,0.6); text-decoration: none; transition: 0.3s; }
footer a:hover { color: var(--primary) !important; }

/* --- ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Scrolling Text Animation */
.scrolling-text-wrapper {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  background-color: var(--dark); /* Ensure background is black */
}

.scrolling-text-content {
  display: inline-block;
  padding-left: 100%; /* Start off-screen */
  animation-duration: 30s; /* Adjust speed as needed */
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  font-size: 4.5rem; /* Increased font size */
  color: var(--white);
  font-weight: 900 !important; /* Make text bolder and heavier */
  opacity: 0.5; /* Set opacity to 50% */
}

.scrolling-text-right-to-left {
  animation-name: scrollTextRight;
}

.scrolling-text-left-to-right {
  animation-name: scrollTextLeft;
}

@keyframes scrollTextRight {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}

@keyframes scrollTextLeft {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0%); }
}

/* New styles for 3CX Support Plans section */
.plan-toggle-btn {
  background-color: transparent !important;
  border: 1px solid var(--primary) !important;
  color: var(--primary) !important;
  padding: 10px 25px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.plan-toggle-btn:hover {
  background-color: rgba(255, 49, 49, 0.1) !important;
  color: var(--white) !important;
}

.plan-toggle-btn.active {
  background-color: var(--primary) !important;
  color: var(--white) !important;
  box-shadow: 0 5px 15px rgba(255, 49, 49, 0.4);
}

.plan-toggle-btn.active:hover {
  background-color: var(--primary-hover) !important;
}

.plan-content {
  margin-top: 3rem;
}

.support-table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--white);
  border-collapse: separate; /* For rounded corners */
  border-spacing: 0;
  border-radius: 15px; /* Rounded corners for the whole table */
  overflow: hidden; /* Ensures content respects border-radius */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.support-table th,
.support-table td {
  padding: 1rem;
  vertical-align: middle;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.support-table thead th {
  background-color: var(--card-bg);
  border-bottom: 2px solid var(--primary);
  font-weight: 700;
  text-align: center;
  padding-top: 1.5rem; /* Add padding for images */
}

.support-table thead th img {
  display: block; /* Make image a block element */
  margin: 0 auto 10px auto; /* Center image and add margin below */
  max-width: 60px; /* Adjust size as needed */
  height: auto;
}

.support-table tbody tr:nth-of-type(odd) {
  background-color: rgba(17, 17, 17, 0.8); /* Slightly lighter dark for odd rows */
}

.support-table tbody tr:nth-of-type(even) {
  background-color: var(--card-bg); /* Dark gray for even rows */
}

.support-table tbody tr:hover {
  background-color: rgba(255, 49, 49, 0.15) !important; /* Hover effect for rows */
}

.support-table td {
  text-align: center;
}

.support-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--white);
}

.support-table .table-category {
  background-color: rgba(255, 49, 49, 0.1) !important;
  color: var(--primary) !important;
  font-weight: 700;
  text-align: left;
  padding-left: 1.5rem;
}

/* Specific styles for checkmark and crossmark symbols */
.checkmark {
  color: #00F700 !important; /* Green color for checkmark */
  font-weight: bold;
}

.crossmark {
  color: red !important; /* Red color for crossmark */
  font-weight: bold;
}

/* Responsive adjustments for tables */
@media (max-width: 767px) {
  .support-table thead {
    display: none; /* Hide table headers on small screens */
  }
  .support-table, .support-table tbody, .support-table tr, .support-table td {
    display: block;
    width: 100%;
  }
  .support-table tr {
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
  }
  .support-table td {
    text-align: right !important;
    padding-left: 50% !important;
    position: relative;
    border: none;
  }
  .support-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    padding-left: 1rem;
    font-weight: bold;
    text-align: left;
    color: var(--primary);
  }
  .support-table .table-category {
    text-align: center !important;
    padding-left: 1rem !important;
    background-color: rgba(255, 49, 49, 0.15) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}
