/* Tailwhip - Responsive Institutional Utility CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Sora:wght@400;600;700;800&display=swap');

:root {
  /* Branding Palette: UIN Alauddin Makassar Colors (Teal/Emerald & Gold) */
  --primary-deep: #023c2a;       /* Very dark emerald green for primary headers */
  --primary: #054a34;            /* Main branding green */
  --primary-light: #0d7052;      /* Medium light green */
  --primary-soft: #eaf5f2;       /* Tint of green for background blocks */
  --secondary: #d4af37;          /* Academic gold accent */
  --secondary-hover: #bda02b;    /* Golden accent hover */
  
  /* Semantic Variables */
  --bg: #f8faf9;                 /* Light slate/mint background */
  --card: #ffffff;               /* Pure white for containers */
  --text: #1e2925;               /* Charcoal green-gray for readability */
  --muted: #536b64;              /* Muted text */
  --border: #e2e8f0;             /* Soft borders */
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  /* Spacing System */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Borders and Radii */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Shadows (Glassmorphic & Modern Depth) */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 25px -5px rgba(5,74,52,0.05), 0 8px 16px -6px rgba(5,74,52,0.03);
  --shadow-xl: 0 20px 35px -5px rgba(5,74,52,0.1), 0 12px 20px -8px rgba(5,74,52,0.05);
  --shadow-inner: inset 0 2px 4px 0 rgba(0,0,0,0.05);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Base Typography overrides */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', sans-serif;
  color: var(--primary-deep);
  font-weight: 700;
  margin-top: 0;
  line-height: 1.25;
}

h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; position: relative; padding-bottom: 0.5rem; }
h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 3rem;
  height: 4px;
  background: var(--secondary);
  border-radius: var(--radius-full);
}
h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; }

p { margin-top: 0; margin-bottom: 1rem; color: var(--muted); }

/* Containers */
.container { 
  width: 100%; 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 1.5rem; 
}

/* Flexbox and Grid utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.grid { display: grid; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Grid Responsive - Modern Approach */
.grid-responsive {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .grid-responsive.cols-2-md { grid-template-columns: repeat(2, 1fr); }
  .grid-responsive.cols-3-md { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-responsive.cols-2-md { grid-template-columns: repeat(2, 1fr); }
  .grid-responsive.cols-3-md { grid-template-columns: repeat(3, 1fr); }
  .grid-responsive.cols-4-md { grid-template-columns: repeat(4, 1fr); }
  .grid-responsive.layout-sidebar { grid-template-columns: 2.2fr 1fr; }
}

/* Padding and Margin Utilities */
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.px-1 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2 { padding-left: 1rem; padding-right: 1rem; }
.px-3 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-4 { padding-left: 2rem; padding-right: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.muted { color: var(--muted); }
.text-accent { color: var(--primary); }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  background: var(--primary);
  color: #ffffff !important;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-family: 'Sora', sans-serif;
  font-size: 0.875rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--secondary);
  color: #1e2925 !important;
}
.btn-secondary:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: #ffffff !important;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(5,74,52,0.04);
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
}
.hover-lift {
  transition: var(--transition);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

img { max-width: 100%; height: auto; display: block; }
.rounded { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-md); }
.rounded-xl { border-radius: var(--radius-lg); }
.shadow { box-shadow: var(--shadow-md); }

/* Header & Footer */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.site-header .container {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo strong {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: var(--primary);
}
.nav-main { display: flex; gap: 0.75rem; align-items: center; }
.nav-link {
  padding: 0.5rem 0.875rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.nav-link:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-left: 3px solid var(--secondary);
}

.site-footer {
  background: var(--primary-deep);
  color: #e2f0ec;
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  border-top: 4px solid var(--secondary);
  font-size: 0.9rem;
}
.site-footer a { color: var(--secondary); }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.site-footer .muted { color: #a3c2b8; }
.footer-divider {
  border: 0;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 2rem 0;
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: var(--primary);
  padding: 0.5rem;
}

/* Utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.overflow-hidden { overflow: hidden; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(5,74,52,0.1);
}
.badge-secondary { background: #fef9c3; color: #854d0e; border-color: rgba(212,175,55,0.2); }
.badge-success { background: #d1fae5; color: #065f46; border-color: rgba(16,185,129,0.2); }
.badge-warning { background: #fef3c7; color: #92400e; border-color: rgba(245,158,11,0.2); }
.badge-danger { background: #fee2e2; color: #991b1b; border-color: rgba(239,68,68,0.2); }

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-separator { color: var(--border); }

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  
  .menu-toggle { display: block; }
  .nav-main {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
    box-shadow: var(--shadow-xl);
    z-index: 99;
    gap: 1rem;
  }
  .nav-main.open { display: flex; }
  .nav-main .btn { width: 100%; text-align: center; }
  .nav-link { width: 100%; text-align: center; padding: 0.75rem; }
}
