/* ============================================
   CITIZENAL ALERT - SHARED STYLING SYSTEM
   ============================================ */

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

:root {
  color-scheme: light;
  --primary: #667eea;
  --primary-dark: #5568d3;
  --secondary: #764ba2;
  --danger: #dc3545;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  color: var(--gray-900);
  background: #ffffff;
}

html {
  scroll-behavior: smooth;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  line-height: 1.8;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ============================================
   NAVIGATION
   ============================================ */

nav {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: var(--transition);
}

.logo:hover {
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a,
.nav-links a {
  color: var(--gray-700);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover,
.nav-links a:hover {
  color: var(--primary);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn,
button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary,
.btn-primary-outline {
  background: white;
  color: var(--primary);
  border: 2px solid transparent;
}

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

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-warning {
  background: var(--warning);
  color: white;
}

.btn-warning:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ============================================
   CARDS & SECTIONS
   ============================================ */

.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.card-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.card-icon {
  font-size: 2rem;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-800);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  background: white;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: var(--gray-50);
  color: var(--gray-600);
  cursor: not-allowed;
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
  border-left: 4px solid transparent;
  animation: slideIn 0.3s ease-out;
}

.alert.show {
  display: block;
}

.alert-success {
  background-color: #d1fae5;
  border-left-color: var(--success);
  color: #065f46;
}

.alert-error {
  background-color: #fee2e2;
  border-left-color: var(--danger);
  color: #7f1d1d;
}

.alert-warning {
  background-color: #fef3c7;
  border-left-color: var(--warning);
  color: #78350f;
}

.alert-info {
  background-color: #dbeafe;
  border-left-color: var(--info);
  color: #0c2340;
}

@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--gray-600);
}

.mb-20 {
  margin-bottom: 20px;
}

.mb-40 {
  margin-bottom: 40px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-40 {
  margin-top: 40px;
}

.gap-20 {
  gap: 20px;
}

.gap-10 {
  gap: 10px;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid {
  display: grid;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

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

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .nav-links {
    gap: 12px;
  }

  nav a,
  .nav-links a {
    font-size: 12px;
  }
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--gray-900);
  color: white;
  padding: 40px 20px;
  text-align: center;
  margin-top: 40px;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  color: #94a3b8;
  font-size: 13px;
  border-top: 1px solid #334155;
  padding-top: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .container {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }

  button {
    width: 100%;
  }
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(220, 53, 69, 0.3);
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-900);
  font-weight: 500;
  font-size: 14px;
}

input[type="password"],
input[type="email"],
input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

input[type="password"]:focus,
input[type="email"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  margin: 20px 0;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  cursor: pointer;
}

.checkbox-group label {
  margin: 0;
  cursor: pointer;
  color: var(--gray-700);
  font-weight: normal;
}

/* Messages */
.error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 8px;
  display: none;
}

.error.show {
  display: block;
}

.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: none;
}

.success.show {
  display: block;
}

.warning-box {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
  color: #856404;
  font-size: 14px;
  line-height: 1.6;
}

/* Loading */
.loading {
  display: none;
  text-align: center;
  color: var(--gray-600);
}

.loading.show {
  display: block;
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 80px 20px;
  text-align: center;
}

.hero .container {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.hero p {
  font-size: 20px;
  margin-bottom: 32px;
  opacity: 0.95;
  line-height: 1.6;
}

.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 30px;
}

.button-group .btn:last-child {
  grid-column: 1 / -1;
}

/* Features Section */
.features {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

.features h2 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 48px;
  font-weight: 700;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--gray-900);
}

.feature-card p {
  color: var(--gray-600);
  font-size: 15px;
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  background: var(--gray-50);
  padding: 60px 20px;
  text-align: center;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}

.cta-section .container {
  max-width: 600px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 32px;
  margin-bottom: 16px;
  font-weight: 700;
}

.cta-section p {
  font-size: 16px;
  color: var(--gray-600);
  margin-bottom: 32px;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 20px 20px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  margin-bottom: 18px;
}

header h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.muted {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

/* Main */
main {
  background: #ffffff;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

main h2 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 18px;
}

main h3 {
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 16px;
}

main p,
main li {
  margin-top: 8px;
}

main ul {
  padding-left: 18px;
}

.card {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
}

main a {
  color: var(--primary);
  text-decoration: none;
}

main a:hover {
  text-decoration: underline;
}

code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

/* Footer */
footer {
  background: var(--gray-900);
  color: white;
  padding: 40px 20px;
  text-align: center;
  margin-top: 40px;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  color: #94a3b8;
  font-size: 13px;
  border-top: 1px solid #334155;
  padding-top: 20px;
}

footer p {
  color: #cbd5e1;
  font-size: 13px;
  margin: 0;

}

/* Wrap */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.nav-links {
  margin-bottom: 18px;
  text-align: center;
}

.nav-links a {
  color: var(--primary);
  text-decoration: none;
  margin-right: 16px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 18px;
  }

  .cta-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .features h2 {
    font-size: 28px;
  }

  .cta-section h2 {
    font-size: 24px;
  }

  .button-group {
    grid-template-columns: 1fr;
  }

  .button-group .btn {
    width: 100%;
  }
}
