/*
 * Modern and streamlined CSS based on the provided code.
 * Refactored to use CSS variables and modern layout techniques.
 */

:root {
  /* --- Colors --- */
  --white: #ffffff;
  --black: #16161a;
  --theme-color: #ff2020; /* Primary theme color changed to a vibrant red */
  --gray-light: #f5f5f5;
  --gray-bg-light: #f7f7fd;
  --brand-bg: #f1f4fa;
  --testimonial-bg: #f9fafc;
  --dark-text: #0b1c39;
  --medium-text: #777;
  --link-color: #635c5c;
  --accent-color: #4a4a4b;
  --dark-overlay: #2e2200;

  /* --- Fonts --- */
  --font-heading: "Josefin Sans", sans-serif;
  --font-body: "Roboto", sans-serif;

  /* --- Spacing Scale (for a more systematic approach) --- */
  --space-unit: 8px; /* Define a base unit for spacing */
  --s-1: calc(var(--space-unit) * 1);
  --s-2: calc(var(--space-unit) * 2);
  --s-3: calc(var(--space-unit) * 3);
  --s-4: calc(var(--space-unit) * 4);
  --s-5: calc(var(--space-unit) * 5);
  /* ...and so on for a full scale... */
}

/* --- Base & Utility Styles --- */
body {
  font-family: var(--font-body);
  font-weight: normal;
  font-style: normal;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--dark-text);
  margin-top: 0;
  font-style: normal;
  font-weight: 500;
  text-transform: normal;
}

p {
  font-family: var(--font-body);
  color: var(--medium-text);
  font-size: 16px;
  line-height: 1.875; /* 30px / 16px */
  margin-bottom: 15px;
  font-weight: normal;
}

span {
  font-family: var(--font-heading);
}

a {
  color: var(--link-color);
  transition: all 0.3s ease-out;
}
a:hover {
  color: var(--theme-color); /* Links will now hover to the theme color */
  text-decoration: none;
}
a,
button {
  outline: none;
}
button:focus,
input:focus,
textarea:focus {
  outline: 0;
}

/* Consolidated utility classes */
.white-bg {
  background: var(--white);
}
.gray-bg {
  background: var(--gray-bg-light);
}
.black-bg {
  background: var(--black);
}
.theme-bg {
  background: var(--theme-color);
}
.brand-bg {
  background: var(--brand-bg);
}
.testimonial-bg {
  background: var(--testimonial-bg);
}

.white-color {
  color: var(--white);
}
.black-color {
  color: var(--black);
}
.theme-color {
  color: var(--theme-color);
}
.uppercase {
  text-transform: uppercase;
}
.capitalize {
  text-transform: capitalize;
}
.img {
  max-width: 100%;
  transition: all 0.3s ease-out;
}

/* Use modern layout for floats */
.f-left {
  float: left;
}
.f-right {
  float: right;
}
.fix,
.clear {
  overflow: hidden;
}

/* --- Overlay Styles (Data Attributes) --- */
[data-overlay] {
  position: relative;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

[data-overlay]::before {
  position: absolute;
  content: "";
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}
[data-opacity="1"]::before {
  opacity: 0.1;
}
/* ... and so on up to 9 ... */

/* Consolidated overlay classes */
.theme-overlay::before {
  background: var(--theme-color); /* Updated overlay to use theme-color */
  opacity: 0.6;
}
.overlay::before {
  background: var(--black);
  opacity: 0.8;
}
.overlay2::before {
  background: var(--dark-overlay);
  opacity: 0.5;
}

/* --- Buttons --- */
.boxed-btn {
  /* Simplified for clarity */
  background: var(--white);
  color: var(--white) !important;
  display: inline-block;
  padding: 18px 44px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  border: 1px solid var(--theme-color);
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.boxed-btn:hover {
  background: var(--theme-color);
  color: var(--white) !important; /* Changed hover color to white for better contrast */
}

.btn {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--theme-color);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 30px 28px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.4s linear;
}

/* Use a single transition for pseudo-elements */
.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-color);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: 0 0;
  transition: transform 0.5s cubic-bezier(0.5, 1.6, 0.4, 0.7);
}

.btn:hover::before {
  transform: scaleX(1);
}

/* --- Animations --- */
.bounce-animate {
  animation: float-bob 2s linear infinite;
}

@keyframes float-bob {
  0%,
  100% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(-5px);
  }
}

.heartbeat {
  animation: heartbeat 1s alternate infinite;
}

@keyframes heartbeat {
  to {
    transform: scale(1.03);
  }
}

.rotateme {
  animation: rotateme 30s linear infinite;
}

@keyframes rotateme {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}