/*
Theme Name: IIS Security Theme
Theme URI: https://iisecurity.in
Author: Institute of Information Security
Author URI: https://iisecurity.in
Description: Custom theme for Institute of Information Security — India's premier cybersecurity training institute.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iis-theme
Tags: cybersecurity, education, training
*/

/* ================================================================
   DESIGN SYSTEM — CSS Custom Properties
   ================================================================ */
:root {
  /* Brand Colors */
  --color-primary:      #C8282B;
  --color-primary-dark: #A01F22;
  --color-primary-light:#E8494C;
  --color-dark:         #1A1A1A;
  --color-dark-2:       #2D2D2D;
  --color-dark-3:       #3D3D3D;
  --color-gray:         #6B7280;
  --color-gray-light:   #9CA3AF;
  --color-border:       #E5E7EB;
  --color-light:        #F8F9FA;
  --color-light-2:      #F1F3F5;
  --color-white:        #FFFFFF;

  /* Typography */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --container-width: 1200px;
  --container-padding: 1.5rem;

  /* Effects */
  --border-radius:    8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --shadow:           0 4px 20px rgba(0,0,0,0.08);
  --shadow-md:        0 8px 30px rgba(0,0,0,0.12);
  --shadow-lg:        0 16px 50px rgba(0,0,0,0.16);
  --shadow-red:       0 4px 20px rgba(200,40,43,0.25);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-md: 0.3s ease;

  /* Header */
  --header-height: 70px;
}

/* ================================================================
   BASE RESET & DEFAULTS
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-dark);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; }

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section { padding: var(--space-4xl) 0; }
.section--light { background: var(--color-light); }
.section--dark { background: var(--color-dark); }
.section--red { background: var(--color-primary); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-gray);
  max-width: 600px;
  margin-bottom: var(--space-2xl);
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-white);
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-dark);
  border-color: var(--color-white);
}

.btn-outline-red {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline-red:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-lg { padding: 1rem 2.25rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-red { background: rgba(200,40,43,0.1); color: var(--color-primary); }
.badge-dark { background: var(--color-dark); color: var(--color-white); }
.badge-green { background: rgba(34,197,94,0.1); color: #16a34a; }

/* Screen reader only */
.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;
}

/* ================================================================
   RESPONSIVE BREAKPOINTS
   ================================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --container-padding: 1rem; }
  .section { padding: var(--space-3xl) 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
