/* Base Styles */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --dark-bg: #2c3e50;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Navbar Styles */
.navbar {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--dark-bg)
  ) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  animation: slideIn 0.5s ease-out;
}

.nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

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

/* Card Styles */
.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease-out;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  border-radius: 15px 15px 0 0;
  height: 200px;
  object-fit: cover;
}

/* Button Styles */
.btn {
  border-radius: 25px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--primary-color)
  );
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* Content Alignment */
.container {
  max-width: 1200px;
}

.article-content {
  animation: fadeIn 0.8s ease-out;
}

.article-content h1 {
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.article-content h2 {
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.article-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Footer Styles */
footer {
  background: linear-gradient(135deg, var(--dark-bg), var(--primary-color));
  padding: 3rem 0;
  margin-top: 4rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  margin: 0 1rem;
}

.footer-links a:hover {
  color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.2rem;
  }

  .card-img-top {
    height: 150px;
  }

  .btn {
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* Custom Animations for Elements */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Newsletter Form Styles */
.newsletter-form {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.newsletter-form input {
  border-radius: 25px;
  padding: 0.8rem 1.5rem;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
}

.newsletter-form input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Social Media Icons */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icons a {
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(
    180deg,
    rgba(19, 24, 69, 1) 0%,
    rgba(9, 18, 48, 1) 100%
  );
  min-height: 72vh;
  display: flex;
  align-items: center;
  position: relative;
  color: #fff;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(108, 92, 231, 0.12),
    rgba(0, 0, 0, 0.35)
  );
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

/* Cards and Sections */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-shadow:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.icon-wrapper {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 118, 210, 0.1);
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.icon-wrapper:hover {
  transform: scale(1.1);
}

.image-wrapper {
  overflow: hidden;
  border-radius: 8px;
}

.image-wrapper img {
  transition: transform 0.3s ease;
}

.image-wrapper:hover img {
  transform: scale(1.05);
}

/* Newsletter Section */
.newsletter-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../images/sleep-pattern.png") center/cover;
  opacity: 0.1;
  z-index: 1;
}

.newsletter-form .form-control {
  border: none;
  padding: 1rem;
}

/* Additional UI refinements for redesigned homepage */
/* Faster, smoother scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Modern button styles */
.btn-primary {
  border-radius: 12px;
  padding: 0.65rem 1.25rem;
  box-shadow: 0 6px 18px rgba(44, 62, 80, 0.12);
  background: linear-gradient(90deg, rgb(29, 52, 164) 0%, rgb(80, 0, 201) 100%);
  border: none;
  color: #a22929;
}

.btn-outline-light {
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.btn-outline-primary {
  border-radius: 10px;
  border: 1.5px solid rgba(25, 118, 210, 0.12);
}

/* Slightly lighter cards */
.card {
  border-radius: 14px;
  background: #fff;
}

.card .card-body h5,
.card .card-body h3,
.card .card-body h2 {
  color: #1f2d3d;
}

/* Newsletter gradient */
.newsletter-form.bg-primary {
  background: linear-gradient(90deg, rgba(17, 24, 64, 1), rgba(36, 11, 54, 1));
}

/* Responsive hero adjustments */
@media (max-width: 992px) {
  .hero-section {
    min-height: 62vh;
    padding: 3rem 0;
  }
  .hero-section h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 576px) {
  .card-img-top {
    height: 140px;
  }
}

:root {
  --remnix-primary: #6c5ce7;
  --remnix-accent: #0000ce;
  --remnix-gradient: linear-gradient(
    90deg,
    var(--remnix-primary),
    var(--remnix-accent)
  );
  --remnix-surface: #ffffff;
  --remnix-elev: rgba(20, 22, 48, 0.06);
}

.hero-section .lead,
.hero-section .lead.text-muted,
.hero-section p.lead {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.05rem;
  line-height: 1.5;
}

/* Gentle overlay tweak */
.hero-overlay {
  background: radial-gradient(
    ellipse at center,
    rgba(108, 92, 231, 0.14),
    rgba(0, 0, 0, 0.5)
  );
  mix-blend-mode: overlay;
}

/* Button polish */
.btn-primary {
  background: var(--remnix-gradient) !important;
  border: none;
  color: #ffffff !important;
  box-shadow: 0 8px 28px var(--remnix-elev);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.btn-primary:focus {
  outline: 3px solid rgba(108, 92, 231, 0.18);
  outline-offset: 3px;
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(143, 144, 165, 0.12);
}

.card {
  background: var(--remnix-surface);
  border-radius: 14px;
  transition: transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 260ms;
}
.card:hover {
  transform: translateY(-8px) scale(1.005);
  box-shadow: 0 24px 48px rgba(16, 20, 40, 0.08);
}

/* Image micro-motion */
.image-wrapper img {
  transform-origin: center center;
  will-change: transform;
}

@keyframes float-subtle {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0px);
  }
}
.image-wrapper:hover img {
  animation: float-subtle 5s ease-in-out infinite;
}

/* Faster scroll reveal for better perceived speed */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms cubic-bezier(0.22, 0.9, 0.2, 1), transform 420ms;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Newsletter CTA refinement */
.newsletter-card {
  background: linear-gradient(
    90deg,
    rgba(108, 92, 231, 0.95),
    rgba(84, 0, 201, 0.95)
  );
  color: #fff;
}
.newsletter-card .form-control {
  border-radius: 999px;
  padding: 0.6rem 1rem;
}
.newsletter-card .btn {
  border-radius: 999px;
}

/* Focus states for accessibility */
a:focus,
button:focus,
input:focus {
  outline-offset: 3px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .image-wrapper:hover img,
  .card:hover,
  .btn-primary:hover,
  .animate-on-scroll {
    all: unset;
  }
}

/* Small utilities */
.muted-light {
  color: rgba(255, 255, 255, 0.8);
}

.newsletter-form .btn {
  padding: 1rem 2rem;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section {
    min-height: 80vh;
  }

  .icon-wrapper {
    width: 60px;
    height: 60px;
  }

  .newsletter-form .input-group {
    flex-direction: column;
  }

  .newsletter-form .btn {
    width: 100%;
    margin-top: 1rem;
  }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #1976d2, #0d47a1);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-outline-light {
  border: 2px solid #fff;
}

.btn-outline-light:hover {
  background: #fff;
  color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* Cards */
.card {
  border-radius: 12px;
  overflow: hidden;
}

.card-body {
  padding: 2rem;
}

/* Section Spacing */
section {
  padding: 5rem 0;
}

/* Background Colors */
.bg-light {
  background-color: #f8f9fa !important;
}

/* Container */
.container {
  max-width: 1200px;
  padding: 0 1.5rem;
}

/* Responsive Images */
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Social Icons */
.social-icons a {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #1976d2;
}

/* Footer */
footer {
  background: #1a237e;
  padding: 3rem 0;
}

.footer-links a {
  color: #fff;
  text-decoration: none;
  margin: 0 1rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #1976d2;
}

/* Hero Overlay */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("../images/sleep-pattern.png") center/cover;
  opacity: 0.1;
  z-index: 1;
}

/* Contact Form Styles */
.contact-form .form-control {
  border: 1px solid #e0e0e0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.contact-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

/* FAQ Styles */
.accordion-button:not(.collapsed) {
  background-color: rgba(25, 118, 210, 0.1);
  color: var(--primary-color);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(25, 118, 210, 0.25);
}

/* Product Card Styles */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  border-radius: 12px;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-card .image-wrapper {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.product-card .image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .image-wrapper img {
  transform: scale(1.05);
}

.product-card .card-body {
  padding: 1.5rem;
}

.product-card .card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.product-card .card-text {
  color: #666;
  margin-bottom: 1rem;
}

/* Badge Styles */
.badge {
  padding: 0.5em 1em;
  border-radius: 20px;
  font-weight: 500;
}

.badge.bg-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
}

.badge.bg-success {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.badge.bg-info {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

/* Star Rating */
.text-warning {
  color: #f1c40f;
}

/* Button Styles */
.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  transition: all 0.3s ease;
}

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