/*
Theme Name: SMK Modern
Version: 2.0.0
Text Domain: smk-modern
Description: Modern green theme for SMK Muhammadiyah 3 Gemolong with enhanced UI/UX
*/

/* ============================================
   🎨 SMK MODERN THEME - ENHANCED UI/UX
   Modern Green Theme with Perfect Cards
   ============================================ */

/* === ROOT VARIABLES === */
:root {
  --brand-50: #f0fdf4;
  --brand-100: #dcfce7;
  --brand-200: #bbf7d0;
  --brand-300: #86efac;
  --brand-400: #4ade80;
  --brand-500: #22c55e;
  --brand-600: #16a34a;
  --brand-700: #15803d;
  --brand-800: #166534;
  --brand-900: #14532d;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-3xl: 2rem;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === BASE STYLES === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  color: var(--slate-900);
  background-color: var(--slate-50);
}

/* === HEADER LOGO STYLES — seamless, no frame === */
.smk-site-header .custom-logo-link {
  display: flex;
  align-items: center;
}

.smk-site-header .custom-logo {
  height: 38px !important;
  width: auto !important;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.smk-site-header .group:hover .custom-logo {
  transform: scale(1.05);
}

/* === FOOTER LOGO — seamless, smaller === */
footer .smk-footer-logo .custom-logo-link {
  display: flex;
  align-items: center;
}

footer .smk-footer-logo .custom-logo {
  height: 36px !important;
  width: auto !important;
  max-width: 130px !important;
  max-height: 36px !important;
  object-fit: contain;
}

/* === CARD SYSTEM - PROPORTIONAL & CONSISTENT === */
.smk-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  transition: all var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.smk-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand-200);
}

.smk-card-image {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: contain;
  background: linear-gradient(135deg, var(--brand-100) 0%, var(--emerald-100) 100%);
}

.smk-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.smk-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.smk-card-text {
  font-size: 0.875rem;
  color: var(--slate-600);
  line-height: 1.6;
  flex: 1;
}

/* === GRID CARD LAYOUTS - PROPORTIONAL === */
.grid article,
.grid > a {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.grid article .h-36,
.grid > a .h-36,
.grid article .h-44,
.grid > a .h-44,
.grid article .h-64,
.grid > a .h-64 {
  aspect-ratio: 16 / 10;
  height: auto !important;
  min-height: 180px;
  max-height: 240px;
}

.grid article .p-5,
.grid > a .p-5,
.grid article .p-6,
.grid > a .p-6 {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grid article img,
.grid > a img,
.smk-content-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

/* === CAROUSEL CARDS - ENHANCED === */
.smk-carousel-item {
  min-width: 280px !important;
  flex-shrink: 0 !important;
}

.smk-carousel-item .h-36,
.smk-carousel-item .h-44,
.smk-carousel-item .h-28 {
  aspect-ratio: 16 / 10;
  height: auto !important;
  min-height: 140px;
}

/* Carousel controls enhanced */
.smk-carousel-controls button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  font-size: 1.25rem;
  color: var(--slate-600);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.smk-carousel-controls button:hover {
  background: var(--brand-50);
  border-color: var(--brand-300);
  color: var(--brand-600);
  transform: scale(1.05);
}

/* === STAT CARDS - CONSISTENT SIZING === */
.group.rounded-2xl {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* === SECTION HEADERS === */
.section-header {
  margin-bottom: 2rem;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-700);
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, var(--brand-600), var(--emerald-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === BUTTONS ENHANCED === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--brand-600), var(--emerald-500));
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 14px 0 rgba(22, 163, 74, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-500), var(--emerald-400));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(22, 163, 74, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--brand-600);
  font-weight: 600;
  font-size: 0.875rem;
  border: 2px solid var(--brand-600);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-secondary:hover {
  background: var(--brand-50);
  transform: translateY(-2px);
}

/* === FOOTER ENHANCED === */
footer {
  background: linear-gradient(180deg, var(--slate-50) 0%, white 100%);
  border-top: 1px solid var(--slate-200);
}

footer .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer .menu li {
  margin-bottom: 0.75rem;
}

footer .menu a {
  color: var(--slate-600);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

footer .menu a::before {
  content: '→';
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition-fast);
}

footer .menu a:hover {
  color: var(--brand-600);
}

footer .menu a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* Social media buttons in footer */
footer a[aria-label] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-xl);
  background: white;
  color: var(--slate-600);
  transition: all var(--transition-normal);
}

footer a[aria-label]:hover {
  border-color: var(--brand-300);
  background: linear-gradient(135deg, var(--brand-50), var(--emerald-50));
  color: var(--brand-600);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px -5px rgba(22, 163, 74, 0.25);
}

/* === MOBILE RESPONSIVE === */
@media (max-width: 768px) {
  /* Header mobile */
  .smk-site-header .custom-logo {
    height: 40px !important;
    max-width: 40px !important;
  }
  
  .smk-site-header .h-10.w-10 {
    height: 40px !important;
    width: 40px !important;
    min-width: 40px;
  }
  
  .smk-site-header .leading-tight .font-bold {
    font-size: 0.9rem;
  }
  
  /* Cards mobile */
  .grid {
    gap: 1rem !important;
  }
  
  .grid article .h-64,
  .grid > a .h-64 {
    min-height: 140px;
    max-height: 180px;
  }
  
  /* Carousel mobile - single item */
  .smk-carousel-item {
    width: 100% !important;
    min-width: 100% !important;
  }
  
  .smk-carousel-track {
    gap: 1rem !important;
  }
  
  /* Section padding mobile */
  .py-12 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
  
  .py-14 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  
  /* Hero section mobile */
  .smk-hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100%;
  }

  .smk-hero-actions a {
    width: 100%;
    justify-content: center;
  }

  .md\\:text-5xl {
    font-size: 1.875rem !important;
    line-height: 2.25rem !important;
  }
  
  .text-4xl {
    font-size: 1.5rem !important;
    line-height: 2rem !important;
  }
  
  /* Footer mobile */
  footer .grid {
    gap: 2rem !important;
  }
  
  footer .flex-wrap {
    justify-content: center;
  }
  
  /* PPDB CTA mobile */
  .rounded-3xl.border-2.border-brand-200 {
    padding: 1.5rem !important;
  }
  
  /* Stats cards mobile */
  .group.rounded-2xl {
    min-height: auto;
    padding: 1.25rem !important;
  }
  
  .group.rounded-2xl .text-3xl {
    font-size: 1.5rem !important;
  }
}

@media (max-width: 640px) {
  /* Single column grid on small mobile */
  .grid.sm\\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  /* Header adjustments */
  .smk-site-header .px-4 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  /* Rounded corners smaller on mobile */
  .rounded-3xl {
    border-radius: 1.25rem !important;
  }
  
  .rounded-2xl {
    border-radius: 1rem !important;
  }
  
  /* Content padding */
  .p-8 {
    padding: 1.25rem !important;
  }
  
  .p-6 {
    padding: 1rem !important;
  }
  
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* === MOBILE NAVIGATION ENHANCED === */
#smk-mobile-panel {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid var(--slate-200);
}

#smk-mobile-panel .smk-mobile-menu {
  padding: 1rem;
}

#smk-mobile-panel .smk-mobile-menu > li > a {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-weight: 500;
  transition: all var(--transition-fast);
}

#smk-mobile-panel .smk-mobile-menu > li > a:hover,
#smk-mobile-panel .smk-mobile-menu > li > a:focus {
  background: var(--brand-50);
  color: var(--brand-700);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* === SCROLLBAR STYLING === */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--slate-100);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

/* === FOCUS STATES FOR ACCESSIBILITY === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

/* === LINE CLAMP UTILITIES === */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === PAGINATION STYLES === */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  font-weight: 500;
  color: var(--slate-600);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.page-numbers:hover:not(.current) {
  background: var(--brand-50);
  color: var(--brand-600);
}

.page-numbers.current {
  background: var(--brand-600);
  color: white;
}

.page-numbers.dots {
  pointer-events: none;
}

/* === PROSE ENHANCEMENTS === */
.prose {
  max-width: none;
}

.prose img {
  border-radius: var(--radius-xl);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.prose a {
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 500;
}

.prose a:hover {
  text-decoration: underline;
}

/* === STAT CARD SPECIAL STYLES === */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

/* === QUICK LINK CARD STYLES === */
.quick-link-card {
  position: relative;
  background: white;
  border: 2px solid transparent;
  transition: all var(--transition-normal);
}

.quick-link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* === SECTION ALTERNATING BACKGROUNDS === */
section:nth-of-type(odd) {
  /* No additional styles needed, Tailwind handles this */
}

/* === ASPECT RATIO FALLBACK === */
@supports not (aspect-ratio: 16 / 10) {
  .aspect-\\[16\\/10\\]::before {
    content: '';
    float: left;
    padding-top: 62.5%;
  }
  
  .aspect-\\[16\\/10\\]::after {
    content: '';
    display: block;
    clear: both;
  }
}

/* === PRINT STYLES === */
@media print {
  .smk-site-header,
  footer,
  .smk-chatbot-widget,
  .smk-carousel-controls {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  main {
    padding-top: 0 !important;
  }
}
