:root {
  --color-primary: #e50101;
  /* Vibrant Red */
  --color-secondary: #23324a;
  /* Dark Blue */
  --color-accent: #f2debb;
  /* Warm Beige */
  --color-text: #23324a;
  --color-white: #ffffff;

  --font-main: 'Inter', sans-serif;

  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  --container-width: 1200px;
  --border-radius: 40px;
  /* More rounded */
  --border-radius-pill: 50px;

  /* Advanced Liquid Glass Variables */
  --glass-bg: rgba(255, 255, 255, 0.45);
  /* High translucency */
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow:
    0 8px 32px 0 rgba(31, 38, 135, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  /* Inner glow */
  --glass-blur: blur(10px);

  --transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
  background-size: cover;
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  position: relative;
}


.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.65;
  mix-blend-mode: multiply;
  pointer-events: none;
  animation: floatBlob 25s infinite alternate ease-in-out;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(8vw, -10vh) scale(1.2); }
  66% { transform: translate(-8vw, 15vh) scale(0.9); }
  100% { transform: translate(5vw, -5vh) scale(1.1); }
}

.blob-1 {
  top: -15%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(229, 1, 1, 0.12), transparent 60%);
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(74, 111, 165, 0.18), transparent 60%);
  animation-delay: -5s;
  animation-duration: 30s;
}

.blob-3 {
  top: 40%;
  left: 30%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(242, 222, 187, 0.35), transparent 60%);
  animation-delay: -10s;
  animation-duration: 35s;
}

/* --- SCROLL ANIMATION UTILITIES --- */
/* Base State (Hidden) */
.animate-on-scroll {
  opacity: 0;
  transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease-out, filter 1s ease-out;
}

/* Transforms for Start State */
.fade-up {
  transform: translateY(60px);
}

.fade-down {
  transform: translateY(-60px);
}

.fade-left {
  transform: translateX(-60px);
}

.fade-right {
  transform: translateX(60px);
}

.zoom-in {
  transform: scale(0.8);
}

.blur-in {
  transform: translateY(30px);
  filter: blur(10px);
}

.crazy-spin-in {
  transform: scale(0.1) rotate(180deg) translateY(100px);
}

/* Active State (Visible) */
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Crazy Hover Effects */
.crazy-hover {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.6s ease, border-color 0.6s ease !important;
}

.crazy-hover:hover {
  transform: perspective(1000px) rotateX(8deg) rotateY(-8deg) scale3d(1.05, 1.05, 1.05) translateY(-10px) !important;
  box-shadow: 
    -20px 20px 50px rgba(229, 1, 1, 0.15),
    20px -20px 50px rgba(74, 111, 165, 0.15),
    inset 0 0 0 2px rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 1) !important;
  z-index: 10;
}

/* Stagger Delays */
.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

.delay-400 {
  transition-delay: 400ms;
}

.delay-500 {
  transition-delay: 500ms;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-secondary);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3.5rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
}

h3 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-md);
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

.logo img, .footer-logo {
  border-radius: 0 !important;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Advanced Glass Card */
.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.25));
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 16px 40px rgba(31, 38, 135, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-5px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.35));
  box-shadow: 
    0 24px 50px rgba(31, 38, 135, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.9);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-align: center;
  font-size: 1.05rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-height: auto;
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.2);
  opacity: 0.7;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, rgba(229, 1, 1, 0.8), rgba(255, 77, 77, 0.7));
  color: var(--color-white);
  box-shadow: 0 10px 24px rgba(229, 1, 1, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(229, 1, 1, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  background: linear-gradient(135deg, rgba(229, 1, 1, 0.9), rgba(255, 77, 77, 0.8));
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(35, 50, 74, 0.8), rgba(59, 83, 120, 0.7));
  color: var(--color-white);
  box-shadow: 0 10px 24px rgba(35, 50, 74, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(35, 50, 74, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, rgba(35, 50, 74, 0.9), rgba(59, 83, 120, 0.8));
}

.btn-outline {
  border: 1px solid rgba(35, 50, 74, 0.3);
  color: var(--color-secondary);
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 20px rgba(31, 38, 135, 0.05);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(31, 38, 135, 0.1);
}

.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

/* Utility classes */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: var(--spacing-sm);
}

.mb-2 {
  margin-bottom: var(--spacing-md);
}

.mb-4 {
  margin-bottom: var(--spacing-lg);
}

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Header */
header {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.25));
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  border-right: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 32px 0 rgba(31, 38, 135, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  position: sticky;
  top: 1rem;
  z-index: 1000;
  border-radius: 50px;
  width: calc(100% - 2rem);
  max-width: var(--container-width);
  margin: 1rem auto;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

header:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.4));
  box-shadow: 
    0 12px 40px 0 rgba(31, 38, 135, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  padding: 0 1rem;
}

.logo img {
  height: 40px;
  border-radius: 0;
  /* Remove rounded corners for logo */
  transition: transform 0.3s ease;
}

.logo:hover img {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  /* Bolder for readability */
  color: var(--color-secondary);
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.nav-links a:not(.btn):hover {
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(31, 38, 135, 0.08);
  transform: translateY(-1px);
}

.nav-links a:focus-visible,
.btn:focus-visible,
.mobile-menu-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(229, 1, 1, 0.3);
  outline-offset: 3px;
}

.nav-links .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  padding: 0.65rem 1.75rem;
  border-radius: 25px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
  font-weight: 600;
  min-height: auto;
  margin-left: 0.75rem;
  box-shadow: 0 6px 16px rgba(229, 1, 1, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links .btn:hover {
  box-shadow: 0 8px 20px rgba(229, 1, 1, 0.4);
  transform: translateY(-2px);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-secondary);
}

/* --- RESPONSIVE DESIGN --- */

/* Tablet (Landscape) & Small Laptops */
@media (max-width: 1024px) {
  :root {
    --container-width: 960px;
    --spacing-xl: 3rem;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.2rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet (Portrait) & Large Phones */
@media (max-width: 768px) {
  :root {
    --container-width: 100%;
    --spacing-xl: 2.5rem;
    --spacing-lg: 1.5rem;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Navigation */
  nav {
    height: 70px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    flex-direction: column;
    justify-content: center;
    padding: 6rem 2rem 2rem;
    box-shadow: none;
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  body.menu-open {
    overflow: hidden;
  }

  .nav-links li {
    margin: 1rem 0;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
  }

  .nav-links li:nth-child(2) {
    animation-delay: 0.2s;
  }

  .nav-links li:nth-child(3) {
    animation-delay: 0.3s;
  }

  .nav-links li:nth-child(4) {
    animation-delay: 0.4s;
  }

  .nav-links li:nth-child(5) {
    animation-delay: 0.5s;
  }

  .nav-links li:nth-child(6) {
    animation-delay: 0.6s;
  }

  .mobile-menu-btn {
    display: block;
    font-size: 1.8rem;
    z-index: 1001;
  }

  /* Grids */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
    /* Stack everything */
    gap: 1.5rem;
  }

  /* Hero Section */
  .hero-content {
    text-align: center;
    order: 2;
    /* Image on top */
  }

  .hero-image {
    order: 1;
    margin-bottom: 2rem;
    max-width: min(80%, 420px);
    margin-left: auto;
    margin-right: auto;
  }

  .hero-content div {
    justify-content: center;
  }

  /* Admin Panel specific */
  .admin-container {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100% !important;
    height: auto !important;
    flex-direction: row !important;
    overflow-x: auto;
    padding: 1rem !important;
    justify-content: space-between;
    align-items: center;
    position: relative !important;
  }

  .admin-sidebar nav {
    flex-direction: row;
    height: auto;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .admin-sidebar .nav-item {
    padding: 0.5rem 1rem;
    margin-bottom: 0 !important;
    margin-right: 0.5rem;
    white-space: nowrap;
  }

  .admin-sidebar .nav-item span {
    display: none;
    /* Hide text on mobile to save space, or keep if icons aren't enough */
  }

  main {
    padding: 1rem !important;
  }

  /* Footer */
  .footer .grid-3 {
    text-align: center;
  }

  .footer .grid-3>div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* Mobile (Small) */
@media (max-width: 480px) {
  h1 {
    font-size: 2rem;
  }

  .btn {
    width: 100%;
    /* Full width buttons on small screens */
    margin-bottom: 0.5rem;
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-content div {
    flex-direction: column;
  }

  .section {
    padding: 2rem 0;
  }

  .glass-card {
    padding: 1.25rem;
    border-radius: 22px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  footer {
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
  }
}

@media (max-width: 768px), (pointer: coarse) {
  .bg-blob {
    display: none;
  }

  header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .glass-card:hover,
  .btn:hover {
    transform: none;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero-content h1 {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #4a6fa5 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.liquid-glass-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.liquid-glass-blob {
  position: absolute;
  width: 90%;
  height: 90%;
  background: linear-gradient(135deg, rgba(229, 1, 1, 0.6), rgba(74, 111, 165, 0.6), rgba(242, 222, 187, 0.6));
  background-size: 300% 300%;
  animation: liquidMorph 8s ease-in-out infinite alternate, liquidColors 12s linear infinite;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 30px 50px rgba(31, 38, 135, 0.15);
}

.liquid-glass-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.1));
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 20px 20px 40px rgba(255, 255, 255, 0.4), inset -20px -20px 40px rgba(0, 0, 0, 0.05);
  animation: liquidMorph 10s ease-in-out infinite alternate-reverse;
  z-index: 2;
}

.liquid-glass-canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 3;
  animation: liquidMorph 10s ease-in-out infinite alternate-reverse;
  border-radius: 50%;
  overflow: hidden;
  mix-blend-mode: overlay;
  pointer-events: auto;
}

.liquid-glass-inner::after {
  content: '';
  position: absolute;
  top: 15%;
  left: 15%;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(8px);
  animation: floatSpecular 6s infinite alternate ease-in-out;
}

@keyframes liquidMorph {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  100% { border-radius: 40% 60% 30% 70% / 60% 30% 70% 40%; }
}

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

@keyframes floatSpecular {
  0% { transform: translate(0, 0); opacity: 0.9; }
  100% { transform: translate(30px, 20px); opacity: 0.5; }
}

/* Why Image Pro */
.benefit-card {
  /* Inherits glass-card styles via HTML class */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Services */
.service-card {
  /* Inherits glass-card styles via HTML class */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Blog */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.blog-filter {
  border: 1px solid rgba(35, 50, 74, 0.22);
  border-radius: var(--border-radius-pill);
  background: rgba(255, 255, 255, 0.55);
  color: var(--color-secondary);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

.blog-filter.active,
.blog-filter:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.blog-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.blog-card-media {
  align-items: flex-end;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.36), transparent 28%),
    linear-gradient(135deg, var(--blog-accent, #e50101), #23324a);
  color: var(--color-white);
  display: flex;
  min-height: 180px;
  padding: 1.25rem;
  position: relative;
}

.blog-card-media.has-image {
  background: #23324a;
}

.blog-card-media img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.blog-card-media.has-image::after {
  background: linear-gradient(to top, rgba(13, 21, 34, 0.72), rgba(13, 21, 34, 0.12));
  content: '';
  inset: 0;
  position: absolute;
}

.blog-card-media span {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--border-radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.45rem 0.75rem;
  position: relative;
  z-index: 1;
}

.blog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.blog-card-body h2,
.blog-card-body h4 {
  font-size: 1.25rem;
}

.blog-card-body .btn {
  margin-top: auto;
}

.blog-meta {
  color: rgba(35, 50, 74, 0.72);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.blog-post h1 {
  margin-bottom: 1rem;
}

.blog-post p {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

/* Contact Form */
input,
select,
textarea {
  width: 100%;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  font-family: var(--font-main);
  transition: all 0.3s ease;
  outline: none;
  color: var(--color-text);
  font-weight: 500;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(229, 1, 1, 0.15), inset 0 2px 6px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Enhanced Footer Elements */
footer {
  background: linear-gradient(135deg, rgba(35, 50, 74, 0.85), rgba(20, 30, 50, 0.95));
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  color: var(--color-white);
  padding: 4rem 0;
  border-top-left-radius: 80px;
  border-top-right-radius: 80px;
  margin-top: 4rem;
  box-shadow: 0 -20px 50px rgba(31, 38, 135, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden; /* To contain the footer blob */
}

.footer-blob {
  position: absolute;
  bottom: -50%;
  left: 20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(229, 1, 1, 0.15), transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  z-index: 1;
  animation: floatBlob 20s infinite alternate ease-in-out;
  pointer-events: none;
}

.footer-col.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  color: #fff;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Dynamic glowing border effect on hover */
.footer-col.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-25deg);
  transition: 0.7s;
  pointer-events: none;
}

.footer-col.glass-card:hover::before {
  left: 200%;
}

.footer-col.glass-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 25px 50px 0 rgba(229, 1, 1, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.footer-links li:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.footer-links a::before {
  content: '→';
  opacity: 0;
  transform: translateX(-15px);
  color: var(--color-primary);
  margin-right: 0px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
  width: 0;
}

.footer-links a:hover {
  color: var(--color-white);
  transform: translateX(5px);
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
  margin-right: 8px;
  width: 15px;
}

.social-icons {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 55px;
  height: 55px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px; /* Squircle style */
  color: rgba(255,255,255,0.7);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.social-icon::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--color-primary);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: -1;
}

.social-icon:hover {
  color: #fff;
  border-color: var(--color-primary);
  transform: translateY(-10px) rotate(8deg);
  box-shadow: 0 15px 30px rgba(229, 1, 1, 0.3);
}

.social-icon:hover::after {
  height: 100%;
}

/* Continuous floating animation for footer cards */
@keyframes floatCards {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

.footer-col.glass-card:nth-child(1) { animation: floatCards 6s ease-in-out infinite; }
.footer-col.glass-card:nth-child(2) { animation: floatCards 6s ease-in-out infinite 2s; }
.footer-col.glass-card:nth-child(3) { animation: floatCards 6s ease-in-out infinite 4s; }

.footer-col.glass-card:hover {
  animation-play-state: paused;
}

.footer-bottom {
  position: relative;
  z-index: 2;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* Supernova Overlay (Diabolical Explosion) */
.supernova-overlay {
  position: fixed;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%) scale(1);
  z-index: 99999;
  pointer-events: none;
  mix-blend-mode: screen;
  box-shadow: 0 0 50px 20px #e50101, 0 0 100px 40px #fff;
  animation: diabolicalExplosion 1.8s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes diabolicalExplosion {
  0% {
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 1;
    filter: brightness(1);
  }
  15% {
    transform: translate(-50%, -50%) scale(0.01); /* Implode */
    box-shadow: 0 0 100px 50px #e50101, 0 0 150px 80px #fff;
    filter: brightness(4);
  }
  20% {
    transform: translate(-50%, -50%) scale(5); /* Sudden burst */
    background: #e50101;
    opacity: 1;
  }
  40% {
    transform: translate(-50%, -50%) scale(150); /* Overtake screen */
    background: #fff;
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(250);
    opacity: 0;
  }
}

/* Screen shake for maximum impact */
@keyframes diabolicalShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: translate(-10px, 10px) rotate(-2deg); }
  20%, 40%, 60%, 80% { transform: translate(10px, -10px) rotate(2deg); }
}
.body-shake {
  animation: diabolicalShake 0.4s ease-in-out;
}

/* Success Message Container */
.form-success-container {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 10;
  border-radius: var(--border-radius);
  background: inherit;
}

.form-success-container.active {
  display: flex;
}

.success-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(229, 1, 1, 0.8), rgba(255, 255, 255, 0.2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 50px rgba(229, 1, 1, 0.5), inset 0 0 20px rgba(255,255,255,0.5);
  border: 2px solid rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: scale(0.5);
}

.success-text {
  opacity: 0;
  transform: translateY(20px);
  text-shadow: 0 0 15px rgba(255,255,255,0.8);
}

.form-success-container.active .success-icon {
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: 0.4s;
}

.form-success-container.active .success-text {
  animation: fadeUpSuccess 0.6s ease forwards;
  animation-delay: 0.7s;
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeUpSuccess {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-form-wrapper {
  position: relative;
}

.contact-form-inner {
  transition: opacity 0.4s ease;
}

.contact-form-inner.hidden {
  opacity: 0;
  pointer-events: none;
}

/* --- PORTFOLIO CAROUSEL & CARDS --- */
.carousel-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 0 3.5rem; /* Space for absolute navigation buttons */
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
  border-radius: var(--border-radius);
  padding: 1.5rem 0.5rem; /* Allow room for card hover shadows */
  margin: -1.5rem -0.5rem;
}

.carousel-track {
  display: flex;
  gap: var(--spacing-lg);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.carousel-item {
  flex: 0 0 calc(33.333% - 1.33rem); /* Default 3 items visible on desktop */
  display: flex;
  flex-direction: column;
  height: auto;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.35));
}

@media (max-width: 1024px) {
  .carousel-item {
    flex: 0 0 calc(50% - 1rem); /* 2 items on tablet */
  }
}

@media (max-width: 768px) {
  .carousel-container {
    padding: 0;
  }
  .carousel-item {
    flex: 0 0 100%; /* 1 item on mobile */
  }
  .carousel-btn {
    display: none !important; /* Hide arrows on mobile, use touch swipe */
  }
}

/* Browser Mockup window inside cards */
.browser-mockup {
  background: rgba(35, 50, 74, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: var(--spacing-md);
  transition: border-color 0.4s ease;
}

.carousel-item:hover .browser-mockup {
  border-color: rgba(229, 1, 1, 0.3);
}

.browser-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.browser-header .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.browser-header .dot.red { background: #ff5f56; }
.browser-header .dot.yellow { background: #ffbd2e; }
.browser-header .dot.green { background: #27c93f; }

.browser-header .url-bar {
  flex-grow: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  font-size: 0.75rem;
  color: rgba(35, 50, 74, 0.6);
  padding: 0.15rem 0.5rem;
  margin-left: 1.5rem;
  margin-right: 2.25rem;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: #f0f0f0;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  border-radius: 0; /* Remove image radius within mockup */
}

.carousel-item:hover .image-wrapper img {
  transform: scale(1.04);
}

/* Card details */
.carousel-item-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.carousel-item-info h3 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}

.carousel-item-info p {
  font-size: 0.95rem;
  color: rgba(35, 50, 74, 0.85);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  flex-grow: 1;
}

.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  background: rgba(35, 50, 74, 0.04);
  border: 1px solid rgba(35, 50, 74, 0.08);
  border-radius: var(--border-radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-secondary);
  padding: 0.35rem 0.75rem;
}

.carousel-item:hover .tag {
  background: rgba(229, 1, 1, 0.05);
  border-color: rgba(229, 1, 1, 0.15);
  color: var(--color-primary);
}

.card-btn {
  margin-top: auto;
  font-size: 0.9rem;
  padding: 0.8rem 1.5rem;
  width: 100%;
}

/* Carousel Buttons */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--color-secondary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(31, 38, 135, 0.08);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-btn:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-primary);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 12px 30px rgba(229, 1, 1, 0.18);
}

.carousel-btn.prev-btn {
  left: 0.5rem;
}

.carousel-btn.next-btn {
  right: 0.5rem;
}

/* Indicators */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.dot-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(35, 50, 74, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot-indicator.active {
  background: var(--color-primary);
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(229, 1, 1, 0.4);
}

.dot-indicator:hover:not(.active) {
  background: rgba(35, 50, 74, 0.4);
}
