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

:root {
  --red: #e74c3c;
  --dark: #0a0a14;
  --dark2: #111827;
  --font-head: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.65);
}

/* Base Styles */
body {
  font-family: var(--font-body);
  background-color: #fff; /* We will use dark backgrounds in sections */
  color: #111;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .navbar-brand {
  font-family: var(--font-head);
}

/* Navbar */
.navbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px !important;
  height: 64px;
  background: var(--dark2) !important;
  border-bottom: 2px solid var(--red);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 24px;
  font-weight: 800;
  color: var(--red) !important;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.navbar-brand:hover {
  filter: brightness(1.2);
}

.navbar-nav .nav-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65) !important;
  margin-right: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: #fff !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23e74c3c' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Hero Section */
.hero-section {
  position: relative;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3);
  z-index: 0;
}

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

.hero-badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 18px;
  border-radius: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero-section h1 {
  font-size: clamp(44px, 7vw, 80px);
  font-weight: 800;
  color: #fff;
  line-height: 1.0;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-section h1 em {
  font-style: normal;
  color: var(--red);
}

.hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.btn-red, .btn-submit, .btn-primary, .btn-success, .btn-warning, .btn-secondary {
  background: var(--red) !important;
  color: #fff !important;
  border: none !important;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
  box-shadow: none !important;
}

.btn-red:hover, .btn-submit:hover, .btn-primary:hover, .btn-success:hover, .btn-warning:hover, .btn-secondary:hover {
  opacity: 0.85;
  color: #fff !important;
  transform: none;
}

.btn-ghost {
  background: transparent !important;
  color: #fff !important;
  border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
  padding: 12px 30px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: border-color 0.2s ease;
}

.btn-ghost:hover {
  border-color: #fff !important;
}

/* STATS */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--dark);
}
.stat-item {
  padding: 24px 12px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.stat-num {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1px;
}
.stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Base Sections */
.content {
  padding: 40px 40px 10px 40px;
  background: var(--dark); /* Use dark background universally for content */
  color: var(--text-primary);
}

.content-otherpage {
  padding: 10px 40px 40px 40px;
  background: var(--dark);
  background-image: radial-gradient(circle at top right, rgba(231, 76, 60, 0.08), transparent 40%),
                    radial-gradient(circle at bottom left, rgba(231, 76, 60, 0.05), transparent 40%);
  color: var(--text-primary);
  min-height: 80vh;
}

.sec-label {
  font-size: 11px;
  color: var(--red);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
}

.content h2.sec-title {
  font-family: var(--font-head);
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
}

.content p.sec-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin-bottom: 44px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* Unified Card Section (For tools) */
.card {
  background: var(--dark2) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: none !important;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(231, 76, 60, 0.3) !important;
  box-shadow: 0 10px 20px rgba(0,0,0,0.5) !important;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff !important;
  margin-bottom: 10px;
  font-family: var(--font-head);
  letter-spacing: 1px;
}

.card-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6) !important;
  line-height: 1.6;
}

.card-body {
  cursor: pointer;
  background: var(--dark2);
  padding: 24px !important;
}

/* Services Gym Style Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.svc-card {
  position: relative;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.svc-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.svc-card:hover img {
  transform: scale(1.1);
}
.svc-card:hover {
  transform: translateY(-8px);
  border-color: rgba(231, 76, 60, 0.6);
  box-shadow: 0 15px 35px rgba(231, 76, 60, 0.2);
}
.svc-dim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 20, 0.95) 0%, rgba(10, 10, 20, 0.4) 100%);
  transition: all 0.4s ease;
}
.svc-card:hover .svc-dim {
  background: linear-gradient(to top, rgba(231, 76, 60, 0.85) 0%, rgba(10, 10, 20, 0.5) 100%);
}
.svc-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.svc-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(231, 76, 60, 0.1);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 24px;
  border: 1px solid rgba(231, 76, 60, 0.3);
  transition: all 0.4s ease;
}
.svc-card:hover .svc-icon {
  background: #ffffff;
  color: var(--red);
  border-color: #ffffff;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}
.svc-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: transform 0.4s ease;
}
.svc-card:hover .svc-name {
  transform: translateY(-2px);
}
.svc-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 6px;
  line-height: 1.5;
  transition: color 0.4s ease;
}
.svc-card:hover .svc-desc {
  color: rgba(255, 255, 255, 0.95);
}

/* Truncate Text for tools */
.truncate-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;  
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
.truncate-text:hover {
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

/* Structure typography */
.content h1, .content-otherpage h1 {
  color: #fff;
  font-size: 42px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: left;
  margin-bottom: 20px;
}

.content h2, .content-otherpage h2 {
  color: #fff;
  font-size: 32px;
  text-transform: uppercase;
}

.content p, .content-otherpage p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Footer */
footer {
  background: var(--dark2);
  text-align: center;
  padding: 36px 24px;
  border-top: 2px solid var(--red);
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.6);
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 3px;
  display: block;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 14px 0;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: color 0.2s ease;
  text-transform: uppercase;
}
.footer-links a:hover {
  color: rgba(255, 255, 255, 0.7);
}
footer p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 4px;
}

/* Legacy CSS classes for tools forms etc. */
.form-container {
  background: var(--dark2) !important;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: 4px solid var(--red);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  padding: 40px;
  margin: 0 auto;
}

.form-control {
  background-color: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 11px 14px;
  transition: border-color 0.2s ease;
  font-family: var(--font-body);
  font-size: 14px;
}
.form-control:focus {
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(231, 76, 60, 0.5);
  box-shadow: none;
  outline: none;
}

/* Modal for tools */
.modal-content {
  background: var(--dark2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
}
.modal-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
}
.modal-title {
  font-size: 24px;
  color: #fff;
}
.modal-body {
  padding: 20px;
}
.modal-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 20px;
  background: transparent;
}

/* Flower matching dark theme */
.flower-pattern:before {
  border-top: 3px solid rgba(255, 255, 255, 0.1);
}
.flower {
  background: var(--red);
}

@media(max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 30px 15px 10px 15px !important;
  }
  .content-otherpage {
    padding: 10px 15px 30px 15px !important;
  }
  .form-container {
    padding: 20px !important;
    border-radius: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  /* Handle nested form-containers inside tools */
  .form-container .form-container {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin-top: 10px !important;
  }
  .content h1, .content-otherpage h1 {
    font-size: 26px !important;
    text-align: center !important;
    margin-bottom: 15px !important;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .form-control {
    font-size: 16px !important; /* Prevents iOS zoom and better readability */
    padding: 12px !important;
  }
  .btn-submit, .btn-red, .btn-primary {
    width: 100% !important;
    padding: 14px !important;
    font-size: 16px !important;
  }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
  .form-container .col-md-6, 
  .form-container .col-md-8 {
    flex: 0 0 90% !important;
    max-width: 90% !important;
  }
}

@media (max-width: 991px) {
  .navbar {
    height: auto !important;
    min-height: 64px;
    padding: 10px 20px !important;
  }
  .navbar-collapse {
    background: var(--dark2);
    padding: 20px;
    margin: 0 -20px;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .navbar-nav .nav-link {
    margin: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
    margin-right: 0;
  }
}