/* LluviaSegura - Rainproofing Website Styles */

/* CSS Custom Properties */
:root {
  --storm-blue: #2F6B9A;
  --seafoam: #20C6B7;
  --sand: #E7D8B1;
  --graphite: #1A2230;
  --soft-gray: #A7B0BD;
  --white: #FFFFFF;
  --light-bg: #F8F9FA;
  
  /* Typography Scale */
  --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: 2.25rem;   /* 36px */
  --text-5xl: 3.1rem;    /* 49.6px */
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 28px rgba(0, 0, 0, 0.24);
  
  /* Transitions */
  --transition-fast: 160ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 220ms ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--graphite);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  max-width: 65ch;
}

a {
  color: var(--storm-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--seafoam);
}

/* Container and Grid */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.grid {
  display: grid;
  gap: var(--space-6);
}

.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: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(47, 107, 154, 0.1);
  transition: all var(--transition-normal);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--storm-blue);
}

.logo svg {
  width: 2rem;
  height: 2rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-8);
}

.nav-link {
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--space-2);
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  background: var(--storm-blue);
  color: var(--white);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: var(--text-2xl);
  color: var(--storm-blue);
  cursor: pointer;
}

/* Rain Mesh Background Animation */
.rain-mesh-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, 
    rgba(47, 107, 154, 0.03) 0%, 
    rgba(32, 198, 183, 0.02) 50%, 
    rgba(231, 216, 177, 0.02) 100%);
  overflow: hidden;
}

.rain-mesh-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(47, 107, 154, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(32, 198, 183, 0.1) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(231, 216, 177, 0.1) 1px, transparent 1px);
  background-size: 50px 50px, 30px 30px, 70px 70px;
  animation: rainMeshFlow 20s ease-in-out infinite;
}

.rain-mesh-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(45deg, transparent 40%, rgba(47, 107, 154, 0.03) 50%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, rgba(32, 198, 183, 0.02) 50%, transparent 60%);
  animation: rainRipples 15s ease-in-out infinite;
}

@keyframes rainMeshFlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-10px, -10px) rotate(1deg); }
  50% { transform: translate(-5px, -15px) rotate(0deg); }
  75% { transform: translate(-15px, -5px) rotate(-1deg); }
}

@keyframes rainRipples {
  0%, 100% { transform: translateX(0) scale(1); opacity: 0.3; }
  50% { transform: translateX(20px) scale(1.1); opacity: 0.1; }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, 
    rgba(47, 107, 154, 0.05) 0%, 
    rgba(32, 198, 183, 0.03) 50%, 
    rgba(231, 216, 177, 0.05) 100%);
}

.hero-content {
  text-align: center;
  z-index: 2;
}

.hero h1 {
  color: var(--storm-blue);
  margin-bottom: var(--space-6);
  animation: fadeInUp 0.8s ease-out;
}

.hero p {
  font-size: var(--text-xl);
  color: var(--soft-gray);
  margin-bottom: var(--space-8);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--storm-blue);
  color: var(--white);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--space-4);
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-cta:hover {
  background: var(--seafoam);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--space-2);
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  font-size: var(--text-base);
}

.btn-primary {
  background: var(--storm-blue);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--seafoam);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: var(--storm-blue);
  border: 2px solid var(--storm-blue);
}

.btn-secondary:hover {
  background: var(--storm-blue);
  color: var(--white);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 16px;
  padding: var(--space-6);
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--storm-blue), var(--seafoam));
  transform: scaleX(0);
  transition: transform var(--transition-normal);
}

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

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

.card-icon {
  width: 3rem;
  height: 3rem;
  background: var(--storm-blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.card h3 {
  color: var(--storm-blue);
  margin-bottom: var(--space-3);
}

.card p {
  color: var(--soft-gray);
  margin-bottom: var(--space-4);
}

/* Statistics Section */
.stats {
  background: var(--light-bg);
  padding: var(--space-20) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  text-align: center;
}

.stat-item {
  background: var(--white);
  padding: var(--space-8);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
}

.stat-item:hover {
  transform: translateY(-4px);
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--storm-blue);
  display: block;
  margin-bottom: var(--space-2);
}

.stat-label {
  color: var(--soft-gray);
  font-size: var(--text-lg);
}

/* Sections */
.section {
  padding: var(--space-20) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-title {
  color: var(--storm-blue);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--soft-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Article Cards */
.article-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: var(--soft-gray);
}

.article-badges {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: 20px;
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-seasonal {
  background: rgba(32, 198, 183, 0.1);
  color: var(--seafoam);
}

.badge-checklist {
  background: rgba(47, 107, 154, 0.1);
  color: var(--storm-blue);
}

.badge-quick-fix {
  background: rgba(231, 216, 177, 0.3);
  color: var(--graphite);
}

.article-title {
  color: var(--storm-blue);
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.article-excerpt {
  color: var(--soft-gray);
  flex: 1;
  margin-bottom: var(--space-4);
}

.read-more {
  color: var(--storm-blue);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: all var(--transition-fast);
}

.read-more:hover {
  color: var(--seafoam);
}

/* Filter Chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-8);
}

.filter-chip {
  padding: var(--space-2) var(--space-4);
  border-radius: 20px;
  background: transparent;
  border: 2px solid var(--storm-blue);
  color: var(--storm-blue);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--storm-blue);
  color: var(--white);
}

/* Newsletter Section */
.newsletter {
  background: linear-gradient(135deg, var(--storm-blue), var(--seafoam));
  color: var(--white);
  text-align: center;
}

.newsletter h2 {
  color: var(--white);
  margin-bottom: var(--space-4);
}

.newsletter-form {
  display: flex;
  gap: var(--space-3);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: none;
  border-radius: var(--space-2);
  font-size: var(--text-base);
}

.newsletter-btn {
  background: var(--sand);
  color: var(--graphite);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--space-2);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* Footer */
.footer {
  background: var(--graphite);
  color: var(--white);
  padding: var(--space-16) 0 var(--space-8) 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer-section p,
.footer-section a {
  color: var(--soft-gray);
  margin-bottom: var(--space-2);
}

.footer-section a:hover {
  color: var(--seafoam);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-bottom {
  border-top: 1px solid rgba(167, 176, 189, 0.2);
  padding-top: var(--space-8);
  text-align: center;
  color: var(--soft-gray);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 50px;
  height: 50px;
  background: var(--storm-blue);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--seafoam);
  transform: translateY(-4px);
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero {
    text-align: center;
    padding: var(--space-20) 0;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .filter-chips {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: var(--space-2);
  }
  
  .back-to-top {
    bottom: var(--space-4);
    right: var(--space-4);
    width: 45px;
    height: 45px;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

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

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

/* Focus Styles */
button:focus,
a:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--seafoam);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --storm-blue: #003366;
    --seafoam: #006666;
    --graphite: #000000;
    --soft-gray: #666666;
  }
}