/* Custom CSS for SLAC Website */

/* Import Poppins Font */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

/* Root Variables */
:root {
  --primary-green: #28a745;
  --dark-green: #1e7e34;
  --light-green: #d4edda;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --white: #ffffff;
  --light-gray: #f8f9fa;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Navigation Styles */
.navbar {
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar-brand {
  font-weight: 600;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-green) !important;
}

.nav-link.active {
  color: var(--primary-green) !important;
  font-weight: 600;
}

/* Page Header */
.page-header {
  padding: 120px 0 40px;
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

a{
  color: var(--white);
  text-decoration: none;
}

/* Hero Carousel */
.carousel-item {
  height: 100vh;
  min-height: 600px;
  position: relative;
}

.carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
}

.carousel-caption {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
}

/* Glassmorphic Card */
.glassmorphic-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3rem;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glassmorphic-card h1 {
  color: var(--white);
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.glassmorphic-card p {
  color: var(--white);
  margin-bottom: 2rem;
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Fade In Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card Hover Effects */
.hover-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.hover-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Course Cards */
.course-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  overflow: hidden;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(40, 167, 69, 0.2);
}

.course-card .card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.course-card:hover .card-img-top {
  transform: scale(1.05);
}

/* Step Circle */
.step-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 auto;
}

/* Calendar Styles */
.calendar {
  width: 100%;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: var(--primary-green);
  padding: 10px;
  border-radius: 8px 8px 0 0;
}

.calendar-day {
  color: white;
  text-align: center;
  font-weight: 600;
  padding: 10px;
}

.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background-color: #e9ecef;
  border-radius: 0 0 8px 8px;
}

.calendar-date {
  background-color: white;
  padding: 15px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-date:hover {
  background-color: var(--light-green);
}

.event-date {
  background-color: var(--light-green) !important;
  color: var(--dark-green);
  font-weight: 600;
  position: relative;
}

.event-date::after {
  content: "•";
  position: absolute;
  bottom: 5px;
  right: 5px;
  color: var(--primary-green);
  font-size: 1.2rem;
}

/* News Items */
.news-item {
  padding: 1rem 0;
}

.news-item h6 {
  margin-bottom: 0.5rem;
}

.news-item p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Button Styles */
.btn {
  border-radius: 25px;
  font-weight: 500;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  border: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-outline-success {
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
}

.btn-outline-success:hover {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

/* Form Styles */
.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-select {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-select:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Card Styles */
.card {
  border-radius: 15px;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card-header {
  border-radius: 15px 15px 0 0 !important;
  border: none;
  padding: 1.5rem;
}

.card-body {
  padding: 2rem;
}

/* Footer Styles */
footer {
  margin-top: auto;
}

footer a {
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--primary-green) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .glassmorphic-card {
    padding: 2rem 1rem;
  }

  .glassmorphic-card h1 {
    font-size: 2rem;
  }

  .page-header {
    padding: 100px 0 60px;
  }

  .carousel-item {
    height: 70vh;
    min-height: 500px;
  }

  .calendar-date {
    padding: 10px 5px;
    min-height: 50px;
    font-size: 0.9rem;
  }

  .step-circle {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand img {
    height: 40px;
  }

  .display-4 {
    font-size: 2rem;
  }

  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }

  .card-body {
    padding: 1.5rem;
  }
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success/Error Messages */
.alert {
  border-radius: 10px;
  border: none;
  padding: 1rem 1.5rem;
}

.alert-success {
  background-color: var(--light-green);
  color: var(--dark-green);
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

/* Portal Specific Styles */
.portal-btn {
  transition: all 0.3s ease;
}

.portal-btn:hover {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: white;
  transform: translateX(5px);
}

.portal-btn.active {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
  color: white;
}

/* Utility Classes */
.text-balance {
  text-wrap: balance;
}

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.border-success {
  border-color: var(--primary-green) !important;
}

.bg-success {
  background-color: var(--primary-green) !important;
}

.text-success {
  color: var(--primary-green) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-green);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-green);
}

/* ==========================================================================
   Public footer (shared partial: includes/public-footer.php)
   ========================================================================== */
.slac-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #14211a 0%, #1b2a20 55%, #14211a 100%);
}

/* Subtle animated accent line along the top edge. */
.slac-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dark-green), var(--primary-green), #6ee7a0, var(--primary-green), var(--dark-green));
  background-size: 300% 100%;
  animation: slacFooterSheen 8s linear infinite;
}

/* Soft, slow-floating decorative shapes (kept faint + non-distracting). */
.slac-footer-anim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.slac-footer-anim .fx-shape {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(40, 167, 69, 0.28), rgba(40, 167, 69, 0));
  opacity: 0.5;
  animation: slacFloat 14s ease-in-out infinite;
}
.slac-footer-anim .fx-1 { width: 180px; height: 180px; left: -40px; bottom: -50px; animation-delay: 0s; }
.slac-footer-anim .fx-2 { width: 120px; height: 120px; right: 8%; top: -30px; animation-delay: 3s; }
.slac-footer-anim .fx-3 { width: 90px;  height: 90px;  left: 45%; bottom: 10px; animation-delay: 6s; }

@keyframes slacFooterSheen {
  0%   { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}
@keyframes slacFloat {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%      { transform: translateY(-18px) translateX(10px); }
}

.slac-footer-links li { margin-bottom: 0.5rem; }
.slac-footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.slac-footer-links a:hover {
  color: #fff;
  padding-left: 4px;
}

.slac-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}
.slac-social:hover {
  background: var(--primary-green);
  transform: translateY(-3px);
  color: #fff;
}
.slac-social-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.slac-social-disabled:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: none;
}

/* Respect users who prefer reduced motion: disable all footer animation. */
@media (prefers-reduced-motion: reduce) {
  .slac-footer::before { animation: none; }
  .slac-footer-anim .fx-shape { animation: none; }
  .slac-social:hover { transform: none; }
  .slac-footer-links a:hover { padding-left: 0; }
}
