/* ================================================================
   Culture For Good - 50/50 Split Login Page
   Premium branded experience with conversion optimization
   ================================================================ */

/* CSS Custom Properties - Brand Colors */
:root {
  --cfg-primary: #505ca6;
  --cfg-primary-dark: #3f4a8a;
  --cfg-green: #40A944;
  --cfg-green-dark: #358a38;
  --cfg-red: #b2023e;
  --cfg-footer-bg: #adb2da;
  --cfg-dark: #222222;
  --cfg-light-bg: #f8f9fa;
  --cfg-border: #e0e0e0;
  --cfg-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --cfg-shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
  --cfg-radius: 12px;
  --cfg-transition: 0.3s ease;
}

/* Global Resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #ffffff;
  color: var(--cfg-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ================================================================
   50/50 Split Layout Container
   ================================================================ */

.login-split-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ================================================================
   Left Panel - Brand Story (50%)
   ================================================================ */

.login-brand-panel {
  position: relative;
  flex: 1;
  background: linear-gradient(135deg, #505ca6 0%, #3f4a8a 100%);
  padding: 4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-panel-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
  width: 100%;
  color: #ffffff;
}

/* Brand Logo */
.brand-logo {
  margin-bottom: 3rem;
  animation: fadeInDown 0.8s ease;
}

.brand-logo a {
  display: inline-block;
  transition: transform var(--cfg-transition);
}

.brand-logo a:hover {
  transform: scale(1.05);
}

.brand-logo img {
  max-width: 320px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* Hero Content */
.brand-hero {
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.brand-hero h1 {
  font-size: clamp(2rem, 4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.95;
  font-weight: 400;
}

/* Trust Badges */
.brand-trust-badges {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.trust-badge {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all var(--cfg-transition);
}

.trust-badge:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(5px);
}

.trust-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  stroke-width: 2;
  color: #6ddb71;
}

.trust-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.trust-desc {
  font-size: 0.875rem;
  opacity: 0.85;
}

/* Customer Testimonial */
.brand-testimonial {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.testimonial-stars {
  display: flex;
  gap: 4px;
  margin-bottom: 1rem;
}

.testimonial-stars svg {
  width: 20px;
  height: 20px;
  color: #fbbf24;
  flex-shrink: 0;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial-author {
  font-size: 0.875rem;
  opacity: 0.85;
  font-weight: 500;
}

/* Brand Footer Link */
.brand-footer-link {
  animation: fadeInUp 0.8s ease 0.8s both;
}

.brand-footer-link a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--cfg-transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-footer-link a:hover {
  color: #ffffff;
  transform: translateX(-3px);
}

/* Decorative Elements */
.brand-decoration {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}

.brand-decoration-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  top: -250px;
  right: -250px;
  animation: float 20s ease-in-out infinite;
}

.brand-decoration-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(109,219,113,0.4) 0%, transparent 70%);
  bottom: -175px;
  left: -175px;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* ================================================================
   Right Panel - Login Form (50%)
   ================================================================ */

.login-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: #ffffff;
}

.form-panel-content {
  width: 100%;
  max-width: 460px;
  animation: fadeInRight 0.8s ease;
}

/* Mobile Logo (hidden on desktop) */
.mobile-logo {
  display: none;
  text-align: center;
  margin-bottom: 2rem;
}

.mobile-logo img {
  max-width: 200px;
  height: auto;
}

/* Welcome Header */
.login-header {
  margin-bottom: 2rem;
}

.login-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--cfg-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.login-header p {
  font-size: 0.95rem;
  color: #666;
  font-weight: 400;
  line-height: 1.6;
}

/* ================================================================
   Form Styles
   ================================================================ */

.login-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cfg-dark);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  border: 2px solid var(--cfg-border);
  border-radius: 8px;
  transition: all var(--cfg-transition);
  font-family: 'Poppins', sans-serif;
  background: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: var(--cfg-primary);
  box-shadow: 0 0 0 3px rgba(80, 92, 166, 0.1);
}

.form-input::placeholder {
  color: #999;
}

/* ================================================================
   Submit Button
   ================================================================ */

.form-actions {
  margin-top: 2rem;
}

.btn-login {
  width: 100%;
  min-height: 52px;
  padding: 0 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cfg-green) 0%, var(--cfg-green-dark) 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--cfg-transition);
  box-shadow: 0 4px 12px rgba(64, 169, 68, 0.25);
  font-family: 'Poppins', sans-serif;
  text-transform: none;
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  background: linear-gradient(135deg, var(--cfg-green-dark) 0%, #2d7530 100%);
  box-shadow: 0 6px 20px rgba(64, 169, 68, 0.35);
  transform: translateY(-2px);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(64, 169, 68, 0.2);
}

/* ================================================================
   Footer Links
   ================================================================ */

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cfg-border);
}

.forgot-password {
  color: var(--cfg-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--cfg-transition);
}

.forgot-password:hover {
  color: var(--cfg-primary-dark);
  text-decoration: underline;
}

/* Mobile Back Link (hidden on desktop) */
.mobile-back-link {
  display: none;
  text-align: center;
  margin-top: 2rem;
}

.mobile-back-link a {
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--cfg-transition);
}

.mobile-back-link a:hover {
  color: var(--cfg-primary);
}

/* ================================================================
   Alert Messages
   ================================================================ */

.alert {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-danger,
.alert-error {
  background: #fff5f5;
  color: var(--cfg-red);
  border-left: 4px solid var(--cfg-red);
}

.alert-success {
  background: #f0fdf4;
  color: var(--cfg-green-dark);
  border-left: 4px solid var(--cfg-green);
}

.alert-warning {
  background: #fffbeb;
  color: #b45309;
  border-left: 4px solid #f59e0b;
}

.alert-info {
  background: #eff6ff;
  color: var(--cfg-primary-dark);
  border-left: 4px solid var(--cfg-primary);
}

/* ================================================================
   Animations
   ================================================================ */

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ================================================================
   Responsive Design
   ================================================================ */

/* Tablet and below - Stack panels */
@media (max-width: 991px) {
  .login-split-container {
    flex-direction: column;
  }

  .login-brand-panel {
    min-height: 60vh;
    padding: 3rem 2rem;
  }

  .brand-panel-content {
    max-width: 600px;
  }

  .brand-logo img {
    max-width: 220px;
  }

  .brand-hero h1 {
    font-size: 2rem;
  }

  .brand-footer-link {
    display: none;
  }

  .login-form-panel {
    padding: 2.5rem 2rem;
  }

  .mobile-back-link {
    display: block;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .login-brand-panel {
    min-height: auto;
    padding: 2.5rem 1.5rem;
    display: none;
  }

  .mobile-logo {
    display: block;
  }

  .login-form-panel {
    padding: 2rem 1.5rem;
  }

  .login-header h1 {
    font-size: 1.75rem;
  }

  .form-panel-content {
    max-width: 100%;
  }

  .mobile-back-link {
    display: block;
  }

  .brand-trust-badges {
    gap: 1rem;
  }

  .trust-badge {
    padding: 1rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .login-header h1 {
    font-size: 1.5rem;
  }

  .login-header p {
    font-size: 0.875rem;
  }

  .form-input {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }

  .btn-login {
    min-height: 48px;
    font-size: 0.95rem;
  }

  .mobile-logo img {
    max-width: 180px;
  }
}

/* ================================================================
   Loading State
   ================================================================ */

.btn-login[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ================================================================
   Accessibility
   ================================================================ */

.form-input:focus-visible {
  outline: 2px solid var(--cfg-primary);
  outline-offset: 2px;
}

.btn-login:focus-visible {
  outline: 2px solid var(--cfg-green-dark);
  outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .form-input {
    border-width: 3px;
  }

  .btn-login {
    border: 2px solid var(--cfg-green-dark);
  }

  .trust-badge {
    border-width: 2px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================================================================
   Print Styles (hide decorative elements)
   ================================================================ */

@media print {
  .brand-decoration,
  .brand-testimonial,
  .brand-trust-badges,
  .mobile-back-link,
  .brand-footer-link {
    display: none;
  }

  .login-split-container {
    flex-direction: column;
  }

  .login-brand-panel {
    page-break-after: always;
  }
}
