/* MENISA Insurance Brokerage - Custom Styles */

:root {
  /* Glassmorphism Variables */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-bg-strong: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  --glass-blur: 12px;

  /* Brand Colors */
  --menisa-red: #C63A31;
  --menisa-dark-red: #A12F28;
  --menisa-light-red: #FFF5F4;

  /* Neutral Colors */
  --white: #FFFFFF;
  --charcoal: #2D3748;
  --medium-gray: #718096;
  --light-gray: #F7FAFC;

  /* Typography */
  --font-headings: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Typography Scale (REM-based) */
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.125rem;
  /* 18px */
  --text-xl: 1.25rem;
  /* 20px */
  --text-2xl: 1.5rem;
  /* 24px */
  --text-3xl: 1.875rem;
  /* 30px */
  --text-4xl: 2rem;
  /* 32px */
  --text-5xl: 2.5rem;
  /* 40px */
  --text-6xl: 3rem;
  /* 48px */

  /* Line Heights */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* 8-Point Grid Spacing System */
  --space-1: 0.25rem;
  /* 4px */
  --space-2: 0.5rem;
  /* 8px */
  --space-3: 0.75rem;
  /* 12px */
  --space-4: 1rem;
  /* 16px */
  --space-5: 1.25rem;
  /* 20px */
  --space-6: 1.5rem;
  /* 24px */
  --space-8: 2rem;
  /* 32px */
  --space-10: 2.5rem;
  /* 40px */
  --space-12: 3rem;
  /* 48px */
  --space-16: 4rem;
  /* 64px */
  --space-20: 5rem;
  /* 80px */
  --space-24: 6rem;
  /* 96px */

  /* Component Spacing */
  --section-padding-mobile: var(--space-16) 0;
  --section-padding-desktop: var(--space-24) 0;
  --card-padding: var(--space-6);
  --button-padding-y: var(--space-3);
  --button-padding-x: var(--space-6);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  /* Increased for glassmorphism */

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(198, 58, 49, 0.1);
  --shadow-md: 0 4px 16px rgba(198, 58, 49, 0.15);
  --shadow-lg: 0 8px 24px rgba(198, 58, 49, 0.2);
}

/* Glassmorphism Utilities */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Base font size for REM calculations */
}

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  overflow-x: hidden;
  /* Vibrant gradient background for glass effect */
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  background-attachment: fixed;
}

/* Add some decorative blobs for glass effect */
body::before,
body::after {
  content: '';
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  z-index: -1;
  filter: blur(80px);
  opacity: 0.6;
}

body::before {
  top: -50px;
  left: -50px;
  background: rgba(198, 58, 49, 0.3);
}

body::after {
  bottom: -50px;
  right: -50px;
  background: rgba(45, 55, 72, 0.2);
}

/* Typography Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headings);
  line-height: var(--leading-tight);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
  /* 40px */
}

h2 {
  font-size: var(--text-4xl);
  /* 32px */
}

h3 {
  font-size: var(--text-2xl);
  /* 24px */
}

h4 {
  font-size: var(--text-xl);
  /* 20px */
}

h5,
h6 {
  font-size: var(--text-lg);
  /* 18px */
}

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

/* Smooth Scroll Offset for Fixed Header */
section {
  scroll-margin-top: 80px;
}

/* Navigation Styles */
#navbar {
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
  /* Fallback */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--menisa-red);
  transition: width 0.3s ease;
}

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

/* Mobile Menu Transitions */
#mobile-menu {
  transition: transform 0.3s ease-in-out;
}

#mobile-menu.show {
  display: block !important;
}

.mobile-nav-link {
  transition: all 0.3s ease;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link:hover {
  padding-left: 10px;
}

/* Hero Section Styles */
.hero-title {
  animation: fadeInUp 0.8s ease-out;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Card Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Button Styles */
.btn-primary {
  background-color: var(--menisa-red);
  color: white;
  padding: var(--button-padding-y) var(--button-padding-x);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  min-height: 44px;
  /* Touch target size */
}

.btn-primary:hover {
  background-color: var(--menisa-dark-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--menisa-red);
  padding: var(--button-padding-y) var(--button-padding-x);
  border: 2px solid var(--menisa-red);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 44px;
  /* Touch target size */
}

.btn-secondary:hover {
  background-color: var(--menisa-red);
  color: white;
  transform: translateY(-2px);
}

/* Statistics Counter Animation */
.stat-number {
  transition: transform 0.3s ease;
}

.stat-number:hover {
  transform: scale(1.1);
}

/* Timeline Progress Animation */
.timeline-progress,
.claims-progress {
  transition: width 1s ease-out;
}

/* Card Styles */
.card,
.service-card,
.product-card,
.vmv-card,
.pillar-card,
.approach-card,
.logo-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
  padding: var(--card-padding);
  transition: all 0.3s ease;
}

.card:hover,
.service-card:hover,
.product-card:hover,
.vmv-card:hover,
.pillar-card:hover,
.approach-card:hover,
.logo-card:hover {
  transform: translateY(-5px);
  background: var(--glass-bg-strong);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 16px;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--menisa-red);
  box-shadow: 0 0 0 3px rgba(198, 58, 49, 0.1);
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--menisa-red);
  cursor: pointer;
}

/* Form Validation States */
.form-error {
  border-color: #E53E3E !important;
}

.form-success {
  border-color: #48BB78 !important;
}

.error-message {
  color: #E53E3E;
  font-size: 14px;
  margin-top: 5px;
}

.success-message {
  color: #48BB78;
  font-size: 14px;
  margin-top: 5px;
}

/* Back to Top Button */
#back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.show {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* Cookie Banner */
#cookie-banner.show {
  transform: translateY(0) !important;
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(198, 58, 49, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(198, 58, 49, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(198, 58, 49, 0);
  }
}

/* Pulse Animation for WhatsApp Button */
.pulse-animation {
  animation: pulse 2s infinite;
}

/* Language Switcher Styles */
.lang-btn {
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 5px 10px;
  border: none;
  background: transparent;
}

.lang-btn.active {
  color: var(--menisa-red);
  font-weight: 600;
}

/* Section Divider */
.section-divider {
  width: 60px;
  height: 4px;
  background-color: var(--menisa-red);
  margin: 20px auto;
}

/* Icon Animations */
.icon-bounce:hover {
  animation: bounce 0.5s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--menisa-red) 0%, var(--menisa-dark-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--menisa-red);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--menisa-dark-red);
}

/* Image Hover Effects */
.image-zoom {
  overflow: hidden;
}

.image-zoom img {
  transition: transform 0.5s ease;
}

.image-zoom:hover img {
  transform: scale(1.1);
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: var(--text-4xl);
    /* 32px on mobile */
  }

  h2 {
    font-size: var(--text-3xl);
    /* 30px on mobile */
  }

  h3 {
    font-size: var(--text-xl);
    /* 20px on mobile */
  }

  h4 {
    font-size: var(--text-lg);
    /* 18px on mobile */
  }

  .hero-title {
    font-size: var(--text-4xl) !important;
    /* 32px on mobile */
  }

  .hero-subtitle {
    font-size: var(--text-lg) !important;
    /* 18px on mobile */
  }

  /* Adjust section padding for mobile */
  section {
    padding: var(--section-padding-mobile);
  }
}

/* Desktop specific adjustments */
@media (min-width: 769px) {
  section {
    padding: var(--section-padding-desktop);
  }
}

/* Print Styles */
@media print {

  #navbar,
  #back-to-top,
  #cookie-banner,
  .whatsapp-float {
    display: none !important;
  }

  body {
    color: black;
  }

  a {
    text-decoration: underline;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Visible (for keyboard navigation) */
*:focus-visible {
  outline: 2px solid var(--menisa-red);
  outline-offset: 2px;
}

/* Skip to Main Content Link */
.skip-to-main {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--menisa-red);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-to-main:focus {
  top: 0;
}

/* Loading State */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Success/Error Toast Notifications */
.toast {
  position: fixed;
  top: 100px;
  right: 20px;
  background: white;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideInRight 0.3s ease;
  max-width: 400px;
}

.toast.success {
  border-left: 4px solid #48BB78;
}

.toast.error {
  border-left: 4px solid #E53E3E;
}

.toast.info {
  border-left: 4px solid var(--menisa-red);
}

/* Utility Classes */
.text-menisa-red {
  color: var(--menisa-red);
}

.bg-menisa-red {
  background-color: var(--menisa-red);
}

.border-menisa-red {
  border-color: var(--menisa-red);
}

.hover\:text-menisa-red:hover {
  color: var(--menisa-red);
}

.hover\:bg-menisa-red:hover {
  background-color: var(--menisa-red);
}

/* Logo Cards Grayscale Effect */
.logo-card {
  transition: all 0.3s ease;
}

.logo-card img {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.logo-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Grid Gap Utilities */
.gap-custom {
  gap: 30px;
}

/* Max Width Container */
.container-custom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Responsive Utilities */
@media (max-width: 640px) {
  .mobile-hide {
    display: none !important;
  }

  .mobile-full-width {
    width: 100% !important;
  }
}

@media (min-width: 641px) {
  .desktop-hide {
    display: none !important;
  }
}

/* Hero Background Pattern (Optional) */
.hero-pattern {
  background-image:
    linear-gradient(135deg, rgba(198, 58, 49, 0.1) 25%, transparent 25%),
    linear-gradient(225deg, rgba(198, 58, 49, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, rgba(198, 58, 49, 0.1) 25%, transparent 25%),
    linear-gradient(315deg, rgba(198, 58, 49, 0.1) 25%, transparent 25%);
  background-position: 10px 0, 10px 0, 0 0, 0 0;
  background-size: 20px 20px;
  background-repeat: repeat;
}

/* Smooth Page Transitions */
.page-transition {
  animation: fadeIn 0.5s ease;
}

/* Number Counter Styling */
.counter {
  font-variant-numeric: tabular-nums;
}

/* Custom Checkbox Styling */
.custom-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--medium-gray);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.custom-checkbox:checked {
  background-color: var(--menisa-red);
  border-color: var(--menisa-red);
}

.custom-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: bold;
}

/* Underline Animation */
.underline-animate {
  position: relative;
  text-decoration: none;
}

.underline-animate::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--menisa-red);
  transition: width 0.3s ease;
}

.underline-animate:hover::after {
  width: 100%;
}

/* Box Shadow Utilities */
.shadow-red-sm {
  box-shadow: 0 2px 8px rgba(198, 58, 49, 0.1);
}

.shadow-red-md {
  box-shadow: 0 4px 16px rgba(198, 58, 49, 0.15);
}

.shadow-red-lg {
  box-shadow: 0 8px 24px rgba(198, 58, 49, 0.2);
}

/* Gradient Backgrounds */
.gradient-red {
  background: linear-gradient(135deg, var(--menisa-red) 0%, var(--menisa-dark-red) 100%);
}

.gradient-light {
  background: linear-gradient(180deg, #FFFFFF 0%, var(--light-gray) 100%);
}

/* Overlay */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

/* Content Above Overlay */
.content-above-overlay {
  position: relative;
  z-index: 2;
}

/* Shimmer Animation for Glass Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

.shimmer-effect {
  position: relative;
  overflow: hidden;
}

.shimmer-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  animation: shimmer 3s infinite;
  pointer-events: none;
}

/* Add shimmer on hover for cards */
.card:hover,
.service-card:hover,
.product-card:hover,
.vmv-card:hover,
.pillar-card:hover,
.approach-card:hover,
.logo-card:hover {
  position: relative;
  overflow: hidden;
}

.card:hover::before,
.service-card:hover::before,
.product-card:hover::before,
.vmv-card:hover::before,
.pillar-card:hover::before,
.approach-card:hover::before,
.logo-card:hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.4) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  animation: shimmer 1.5s;
  pointer-events: none;
}

/* Custom Animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes blob {
  0% {
    transform: translate(0px, 0px) scale(1);
  }

  33% {
    transform: translate(30px, -50px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }

  100% {
    transform: translate(0px, 0px) scale(1);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

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

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

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}