/* ===============================================
   COMP3421 — Lab (Part A & B): Pseudo-elements + Box Model
   One-hour practice starter.
   =============================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

:root {
  --space: 8px;
  --radius: 12px;
  --border: 1px;

  --text: #0f172a;
  --muted: #475569;
  --bg-page: #f8fafc;

  --accent: #2563eb;
  --accent-2: #60a5fa;

  --btn-bg: #111827;
  --btn-text: #ffffff;
  --btn-glow: rgba(37, 99, 235, 0.45);
}


body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100dvh;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-inline: calc(var(--space) * 2);
}

.section {
  margin-block: calc(var(--space) * 3);
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 0 0 calc(var(--space) * 1.25);
}

p {
  margin: 0 0 calc(var(--space) * 1.25);
  color: var(--muted);
}

.site-header,
.site-footer {
  padding-block: calc(var(--space) * 2.5);
  text-align: center;
}

/* Overview and Objectives sections */
.overview-section .card {
  background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
  border-left: 4px solid var(--accent);
}

.objectives-section .card {
  background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
  border-left: 4px solid #22c55e;
}

.objectives-section ul {
  margin-left: 20px;
}

.objectives-section li {
  margin: calc(var(--space) * 1) 0;
}

.submission-section .card {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
  border-left: 4px solid #f59e0b;
}

.submission-section ul {
  margin-left: 20px;
}

.submission-section li {
  margin: calc(var(--space) * 1) 0;
}

/* Screenshot link styling */
.screenshot-link {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: var(--accent);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #93c5fd;
  transition: all 0.2s ease;
}

.screenshot-link:hover {
  background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}


.card {
  /* Step 2: Use padding for internal spacing (3× base unit) */
  padding: calc(var(--space) * 3);
  border-radius: var(--radius);
  background: #fff;
  border: var(--border) solid #e5e7eb;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.06);
}

.card+.card {
  margin-top: calc(var(--space) * 2);
}

.card--demo {}

/* Container styling for quote demos */
.quote-demo-container {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 3);
}

.quote {
  position: relative;
  margin: 0;
  padding: calc(var(--space) * 6) calc(var(--space) * 4);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-left: none;
  border-radius: 12px;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.75;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 
              0 1px 3px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quote:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08), 
              0 2px 6px rgba(0, 0, 0, 0.1);
}

.quote cite {
  display: block;
  margin-top: calc(var(--space) * 2);
  font-style: normal;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

/* ===============================================
   TASK 1 (A1): Decorative Quotes using ::before and ::after
   
   Create stylish quotation marks for blockquotes using both ::before 
   and ::after pseudo-elements. This demonstrates how to add decorative 
   content that enhances the visual presentation without cluttering the HTML.
   
   Steps:
   (1) Create .quote::before selector to add an opening quotation mark.
   (2) Use content: "\201C"; (Unicode for left double quote ") in ::before.
   (3) For ::before, set position: absolute; to position it independently.
   (4) For ::before, set top: 16px; and left: 16px; for top-left positioning.
   (5) For ::before, set font-size: 4rem; to make the quote large.
   (6) For ::before, add color: var(--accent); and opacity: 0.8; for subtle effect.
   (7) For ::before, set line-height: 1; to prevent affecting line spacing.
   (8) For ::before, set font-family: Georgia, serif; and font-weight: bold; for elegant typography.
   (9) Create .quote::after selector to add a closing quotation mark.
   (10) Use content: "\201D"; (Unicode for right double quote ") in ::after.
   (11) For ::after, set position: absolute; to position it independently.
   (12) For ::after, set bottom: 8px; and right: 16px; for bottom-right positioning.
   (13) For ::after, apply the same font properties as ::before.
   =============================================== */

/* Steps 1-8: Opening quotation mark (::before) */
.quote::before {
  /* Step 2: Add opening quote character (Unicode \201C) */
  content: "\201C";
  /* Step 3: Position absolutely */
  position: absolute;
  /* Step 4: Position at top-left */
  top: 16px;
  left: 16px;
  /* Step 5: Make quote large */
  font-size: 4rem;
  /* Step 6: Set accent color and opacity */
  color: var(--accent);
  /* Step 7: Prevent affecting line spacing */
  line-height: 1;
  /* Step 8: Set elegant typography */
  font-family: Georgia,serif;
  font-weight: bold;
}

/* Steps 9-13: Closing quotation mark (::after) */
.quote::after {
  /* Step 10: Add closing quote character (Unicode \201D) */
  content: "\201D";
  /* Step 11: Position absolutely */
  position: absolute;
  /* Step 12: Position at bottom-right */
  bottom: 8px;
  right: 16px;
  /* Step 13: Apply same font properties as ::before */
  font-size: 4rem;
  color: var(--accent);
  line-height: 1;
  font-family: Georgia,serif;
  font-weight: bold;
}




/* Container for badge demo cards */
.badge-demo-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: calc(var(--space) * 2.5);
}

/* Individual badge card styling */
.badge-card {
  position: relative;
  padding: calc(var(--space) * 2.5);
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.badge-card h4 {
  margin: 0 0 calc(var(--space) * 1);
  color: var(--text);
  font-size: 1.1rem;
}

.badge-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
/* ===============================================
   TASK 2 (A2): Status Badges using ::before
   
   Create status badges that appear in the top-right corner of cards using 
   ::before pseudo-elements. This demonstrates how to add decorative labels 
   with custom text content without modifying the HTML structure.
   
   Steps:
   (1) Create .badge-card::before with position: absolute; to position the badge.
   (2) Set top: -10px; and right: -10px; to position it in the top-right corner.
   (3) Add content: attr(data-status); to use the data-status attribute value.
   (4) Set background: var(--accent); for the badge background color.
   (5) Add color: white; and font-size: 0.75rem; for readable text styling.
   (6) Set padding: 6px 12px; for internal spacing inside the badge.
   (7) Add border-radius: 16px; for rounded pill shape.
   (8) Set font-weight: 600; and text-transform: uppercase; for emphasis.
   (9) Add box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); to lift the badge visually.
   =============================================== */

/* TASK 2: Add CSS for badge using ::before */
.badge-card::before{
  /* Step 1: Position the badge absolutely */
  position: absolute;
  
  /* Step 2: Position in top-right corner */
  top: -10px; 
  right: -10px;
  
  /* Step 3: Use data-status attribute for content */
  content: attr(data-status);
  
  /* Step 4: Set background color */
  background: var(--accent);
  
  /* Step 5: Style text for readability */
  color: white;
  font-size: 0.75rem;
  
  /* Step 6: Add internal padding */
  padding: 6px 12px;

  /* Step 7: Create pill shape with border-radius */
  border-radius: 16px;
  
  /* Step 8: Add emphasis with font styling */
  font-weight: 600;
  text-transform: uppercase;
  
  /* Step 9: Add shadow for depth */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


/* Container for stats cards */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--space) * 2);
}

/* Styling for stat number */
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: calc(var(--space) * 1);
  line-height: 1;
}

/* Styling for stat label */
.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}


/* ===============================================
   TASK 3 (B1): Stats Cards with Box Model
   
   Create statistics cards to understand how padding, margin, and border work together.
   
   Steps:
   (1) Add background: white; to .stat-card for the card background.
   (2) Add padding: 24px; to .stat-card for internal spacing around content.
   (3) Add border: 2px solid #e5e7eb; to .stat-card for a subtle border.
   (4) Add border-radius: 8px; to .stat-card for rounded corners.
   (5) Add text-align: center; to .stat-card to center the content.
   (6) Add box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); to .stat-card for depth.
   (7) Add transition: transform 0.2s ease, box-shadow 0.2s ease; for smooth hover effects.
   (8) Create .stat-card:hover selector with transform: translateY(-8px); and 
       box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); for hover animation.
   =============================================== */

/* TASK 3: Add all CSS properties to .stat-card below */
.stat-card {
  /* Step 1: Add background (white) */
  background: white; 
  /* Step 2: Add padding (24px) */
  padding: 24px;
  /* Step 3: Add border (2px solid #e5e7eb) */
  border: 2px solid #e5e7eb;
  /* Step 4: Add border-radius (8px) */
  border-radius: 8px;
  /* Step 5: Add text-align (center) */
  text-align: center;
  /* Step 6: Add box-shadow (0 1px 3px rgba(0, 0, 0, 0.1)) */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  /* Step 7: Add transition (transform 0.2s ease, box-shadow 0.2s ease) */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Step 8: Add hover effect to .stat-card */
.stat-card:hover {
  /* Add transform: translateY(-8px); */
  transform: translateY(-8px);
  /* Add box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}




/* Container for alert demos */
.alert-demo-container {
  display: flex;
  flex-direction: column;
}

/* Styling for alert text */
.alert-box strong {
  font-weight: 700;
  margin-right: 4px;
}
/* ===============================================
   TASK 4 (B2): Alert Boxes with Border Styles
   
   Create alert notification boxes with colored left borders to understand 
   how borders contribute to the box model.
   
   Steps:
   (1) Add padding: 16px 20px; to .alert-box for internal spacing.
   (2) Add background: #f8fafc; to .alert-box for a light background.
   (3) Add border-left: 4px solid; to .alert-box for the colored left border.
   (4) Add border-radius: 4px; to .alert-box for slightly rounded corners.
   (5) Add margin-bottom: 16px; to .alert-box to separate multiple alerts.
   (6) Create .alert-success with border-left-color: #22c55e; and background: #f0fdf4;
   (7) Create .alert-warning with border-left-color: #f59e0b; and background: #fffbeb;
   (8) Create .alert-error with border-left-color: #ef4444; and background: #fef2f2;
   =============================================== */

/* TASK 4: Add base .alert-box styling */
.alert-box{
  /* Step 1: Add padding (16px 20px) */
  padding: 16px 20px;
  /* Step 2: Add background (#f8fafc) */
  background: #f8fafc;
  /* Step 3: Add border-left (4px solid) */
  border-left: 4px solid;
  /* Step 4: Add border-radius (4px) */
  border-radius: 4px;
  /* Step 5: Add margin-bottom (16px) */
  margin-bottom: 16px;
}

/* Step 6: Success alert variant (green) */
.alert-success {
  /* Add border-left-color: #22c55e; */
  border-left-color: #22c55e;
  /* Add background: #f0fdf4; */
  background: #f0fdf4;
}

/* Step 7: Warning alert variant (orange) */
.alert-warning {
  /* Add border-left-color: #f59e0b; */
  border-left-color: #f59e0b;
  /* Add background: #fffbeb; */
  background: #fffbeb;
}

/* Step 8: Error alert variant (red) */
.alert-error {
  /* Add border-left-color: #ef4444; */
  border-left-color: #ef4444;
  /* Add background: #fef2f2; */
  background: #fef2f2;
}