/* Save.ag UI Framework - Based on Brand Guidelines
 * Created: April 2025
 */

/* ======= Color Variables ======= */
:root {
  /* Primary Colors */
  --color-primary: #506c44;      /* Primary Green */
  --color-background: #f7f7ed;   /* Background Off-White */
  --color-secondary: #1f4332;    /* Dark Forest Green */
  
  /* Accent Colors */
  --color-accent-1: #975436;     /* Terracotta/Rust */
  --color-accent-2: #c9863a;     /* Amber/Gold */
  --color-accent-3: #6bafb2;     /* Teal Blue */
  
  /* Text Colors */
  --color-text-dark: #333333;
  --color-text-light: #ffffff;
  --color-text-muted: #666666;
  
  /* Functional Colors */
  --color-success: #506c44;      /* Using Primary Green */
  --color-warning: #c9863a;      /* Using Amber/Gold */
  --color-error: #975436;        /* Using Terracotta */
  --color-info: #6bafb2;         /* Using Teal Blue */
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  
  /* Border Radius */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 1rem;
  
  /* Box Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ======= Typography ======= */
@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('fonts/Poppins-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'Poppins', sans-serif;
  font-weight: 300; /* Light */
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-dark);
  background-color: white;
  margin: 0;
  padding: 0;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700; /* Bold */
  margin-top: 0;
  line-height: 1.2;
  color: var(--color-secondary);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-md);
}

h4 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

h5 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

h6 {
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
}

strong, b {
  font-weight: 500; /* Medium */
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover, a:focus {
  color: var(--color-secondary);
  text-decoration: underline;
}

/* Text utilities */
.text-muted {
  color: var(--color-text-muted);
}

.text-light {
  color: var(--color-text-light);
}

.text-primary {
  color: var(--color-secondary);
}

.text-secondary {
  color: var(--color-primary);
}

.text-accent-1 {
  color: var(--color-accent-1);
}

.text-accent-2 {
  color: var(--color-accent-2);
}

.text-accent-3 {
  color: var(--color-accent-3);
}

/* ======= Layout & Containers ======= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  box-sizing: border-box;
}

.section {
  padding: var(--spacing-xl) 0;
}

.card {
  background-color: white;
  border-radius: var(--border-radius-md);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* ======= Buttons ======= */
.btn {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-weight: 500; /* Medium */
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn:hover, .btn:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--color-secondary);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.btn-accent-1 {
  background-color: var(--color-accent-1);
  color: white;
}

.btn-accent-2 {
  background-color: var(--color-accent-2);
  color: white;
}

.btn-accent-3 {
  background-color: var(--color-accent-3);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover, .btn-outline:focus {
  background-color: var(--color-primary);
  color: white;
}

/* ======= Forms ======= */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500; /* Medium */
}

.form-control {
  display: block;
  width: 100%;
  padding: var(--spacing-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius-sm);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ======= Backgrounds ======= */
.bg-primary {
  background-color: var(--color-primary);
  color: white;
}

.bg-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.bg-accent-1 {
  background-color: var(--color-accent-1);
  color: white;
}

.bg-accent-2 {
  background-color: var(--color-accent-2);
  color: white;
}

.bg-accent-3 {
  background-color: var(--color-accent-3);
  color: white;
}

.bg-light {
  background-color: var(--color-background);
}

/* Pattern background with multiple opacity options */
.bg-pattern {
  background-image: url('../Branding/Save.ag\ Final\ Package/Pattern/Pattern.svg');
  background-repeat: repeat;
  background-size: 300px;
}

.bg-pattern-light {
  background-image: url('../Branding/Save.ag\ Final\ Package/Pattern/Pattern.svg');
  background-repeat: repeat;
  background-size: 300px;
  opacity: 0.1;
}

/* ======= Logo ======= */
.logo-container {
  display: inline-block;
  padding: var(--spacing-sm);
}

.logo {
  max-height: 50px;
  width: auto;
  /* Minimum size is 30px per brand guidelines */
  min-height: 30px;
}

/* Clear space around logo using S width as reference 
   This will need proper calculation in implementation */
.logo-clearspace {
  padding: 1em; /* This should be adjusted based on the calculated S width */
}

/* ======= Header & Navigation ======= */
.header {
  padding: var(--spacing-md) 0;
  background-color: white;
}

.nav {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-right: var(--spacing-lg);
}

.nav-link {
  font-weight: 500; /* Medium */
  color: var(--color-text-dark);
  text-decoration: none;
}

.nav-link:hover, .nav-link:focus, .nav-link.active {
  color: var(--color-secondary);
}

/* ======= Utilities ======= */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.items-center {
  align-items: center;
}

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-0 { padding: 0; }
.p-xs { padding: var(--spacing-xs); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

/* ======= Media Queries ======= */
/* Mobile (up to 768px) */
@media screen and (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  /* Use vertical logo on mobile */
  .logo-mobile-vertical {
    display: block;
  }
  
  .logo-horizontal {
    display: none;
  }
}

/* Tablet (768px to 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* Desktop (1025px and up) */
@media screen and (min-width: 1025px) {
  .logo-mobile-vertical {
    display: none;
  }
  
  .logo-horizontal {
    display: block;
  }
}