/**
 * Modern Theme
 * Flowing gradients, glass morphism, smooth animations, contemporary feel
 * Uses CSS custom properties for brand colors (--color-primary, --color-secondary, --color-accent)
 */

/* ============================================
   TRANSITIONS & ANIMATIONS
   ============================================ */
.theme * {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme img,
.theme video {
  transition: transform 0.5s ease, box-shadow 0.4s ease;
}

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

@keyframes modernGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(var(--color-primary-rgb), 0.2); }
  50% { box-shadow: 0 8px 30px rgba(var(--color-primary-rgb), 0.4); }
}

/* ============================================
   NAVIGATION / HEADER
   ============================================ */
.theme nav {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.theme nav:hover {
  background: rgba(255, 255, 255, 0.92) !important;
}

.theme nav a {
  position: relative;
}

.theme nav a:not([class*="bg-"])::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.theme nav a:not([class*="bg-"]):hover::after {
  width: 80%;
}

/* Nav Dropdown */
.theme .nav-dropdown-menu {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
  border-radius: 16px !important;
  padding: 0.5rem !important;
}

.theme .nav-dropdown-menu a {
  color: #334155 !important;
  border-radius: 12px;
  margin-bottom: 4px;
}

.theme .nav-dropdown-menu a:hover {
  background: rgba(var(--color-primary-rgb), 0.1) !important;
  color: var(--color-primary) !important;
}

/* Nav CTA Button */
.theme nav a[class*="bg-"] {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)) !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.3);
}

.theme nav a[class*="bg-"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--color-primary-rgb), 0.4);
}



/* ============================================
   HERO SECTIONS
   ============================================ */
.theme .hero-section {
  background: linear-gradient(135deg,
    rgba(var(--color-primary-rgb), 0.08) 0%,
    rgba(var(--color-secondary-rgb), 0.12) 50%,
    rgba(var(--color-accent-rgb), 0.06) 100%
  ) !important;
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  display: flex;
  align-items: center;
}

/* Modern theme uses split layout - hide full-page background image */
.theme .hero-bg-image {
  display: none !important;
}

/* Light overlay for hero with background image (hidden by default in modern) */
.theme .hero-overlay {
  background: rgba(255, 255, 255, 0.85) !important;
}

/* Dark text for modern theme (light backgrounds) */
.theme .hero-title {
  color: #0f172a !important;
  text-shadow: none !important;
}

.theme .hero-description {
  color: #475569 !important;
  text-shadow: none !important;
}

.theme .hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(var(--color-primary-rgb), 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(var(--color-secondary-rgb), 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(var(--color-accent-rgb), 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.theme .hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* Text takes slightly more space */
  gap: 4rem;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
  width: 100%;
}

.theme .hero-content {
  text-align: left;
}

.theme .hero-title {
  font-size: 3.75rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.theme .hero-description {
  font-size: 1.25rem;
  color: #64748b;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.theme .hero-image {
  display: block !important;
  width: 100%;
  height: 550px;
  background-size: cover;
  background-position: center;
  border-radius: 30px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(var(--color-primary-rgb), 0.1);
  animation: modernFloat 6s ease-in-out infinite;
}

/* Floating animation */
@keyframes modernFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.theme .hero-buttons {
  display: flex;
  gap: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .theme .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .theme .hero-content {
    text-align: center;
    order: 1; /* Ensure text is first on mobile too, or change to 2 if image should be first */
  }
  
  .theme .hero-buttons {
    justify-content: center;
  }
  
  .theme .hero-image {
    height: 400px;
    order: 2;
  }
}

/* Hero CTA Buttons */
.theme .hero-cta.primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-primary)) !important;
  background-size: 200% auto !important;
  border-radius: 50px !important;
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.35);
  border: none !important;
  animation: gradientFlow 3s ease infinite;
  padding: 1rem 2.5rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
}

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

.theme .hero-cta.primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(var(--color-primary-rgb), 0.45);
}

.theme .hero-cta.secondary {
  background: white !important;
  border: 2px solid #e2e8f0 !important;
  border-radius: 50px !important;
  color: #64748b !important;
  font-weight: 600 !important;
  padding: 1rem 2.5rem;
  text-decoration: none;
  display: inline-block;
}

.theme .hero-cta.secondary:hover {
  background: var(--color-secondary) !important;
  border-color: var(--color-secondary) !important;
  color: white !important;
}

/* ============================================
   GRID SECTION
   ============================================ */
.theme .grid-section {
  background: linear-gradient(180deg,
    rgba(var(--color-primary-rgb), 0.03) 0%,
    rgba(var(--color-secondary-rgb), 0.02) 50%,
    #ffffff 100%
  );
}

/* ============================================
   ALTERNATING SECTION BACKGROUNDS
   ============================================ */
.theme .paragraph-image-section:nth-of-type(odd) {
  background: linear-gradient(135deg,
    rgba(var(--color-secondary-rgb), 0.04) 0%,
    rgba(var(--color-accent-rgb), 0.03) 100%
  );
}

.theme .paragraph-image-section:nth-of-type(even) {
  background: linear-gradient(135deg,
    rgba(var(--color-primary-rgb), 0.03) 0%,
    rgba(var(--color-secondary-rgb), 0.02) 100%
  );
}

.theme .grid-card {
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 8px 40px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
}

.theme .grid-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme .grid-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), 0 8px 20px rgba(var(--color-primary-rgb), 0.08);
}

.theme .grid-card:hover::before {
  opacity: 1;
}

.theme .grid-card-icon {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(var(--color-primary-rgb), 0.25);
}

.theme .grid-card-button {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.3);
}

.theme .grid-card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--color-primary-rgb), 0.4);
}

/* ============================================
   PARAGRAPH + IMAGE SECTION
   ============================================ */
.theme .paragraph-image {
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.theme .paragraph-image:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.theme .paragraph-button {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(var(--color-primary-rgb), 0.3);
}

.theme .paragraph-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(var(--color-primary-rgb), 0.4);
}

/* ============================================
   LOGOS SECTION
   ============================================ */
.theme .logo-image {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.theme .logo-item:hover .logo-image {
  filter: grayscale(0%);
  opacity: 1;
}

/* ============================================
   CUSTOM HTML SECTION
   ============================================ */
.theme .custom-html-title {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   FOOTER
   ============================================ */
.theme .site-footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  position: relative;
  overflow: hidden;
}

.theme .site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
}

.theme .footer-heading {
  position: relative;
  display: inline-block;
  color: white !important;
  font-weight: 600;
}

.theme .footer-heading::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 3px;
}

.theme .footer-content,
.theme .footer-address,
.theme .footer-contact {
  color: rgba(255, 255, 255, 0.8) !important;
}

.theme .footer-subheading {
  color: white !important;
  font-weight: 500;
}

.theme .footer-link {
  color: rgba(255, 255, 255, 0.7) !important;
}

.theme .footer-link:hover {
  color: white !important;
  transform: translateX(4px);
}

.theme .footer-copyright {
  color: rgba(255, 255, 255, 0.6) !important;
}

.theme .footer-button {
  border-radius: 50px;
}

.theme .footer-button:hover {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-color: transparent;
  color: white;
}

.theme .footer-compliance-box {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
}

/* ============================================
   TEMPLATE COMPONENTS
   ============================================ */
.theme .template-hero-cta {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 50px;
  box-shadow: 0 6px 20px rgba(var(--color-primary-rgb), 0.35);
}

.theme .template-benefit-card {
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.theme .template-benefit-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}
