/**
 * Custom CSS for FCE Gwoza Template2
 * Enhances the base template with custom styling, accessibility improvements,
 * and brand-specific adjustments
 */

:root {
  /* Brand Color Palette */
  --primary-color: #feb900;        /* Yellow gold */
  --secondary-color: #0e1d34;      /* Dark blue */
  --accent-color: #0ea2bd;         /* Teal */
  --success-color: #198754;        /* Green */
  --info-color: #0dcaf0;           /* Light blue */
  --warning-color: #ffc107;        /* Amber */
  --danger-color: #dc3545;         /* Red */
  --light-color: #f8f9fa;          /* Off-white */
  --dark-color: #212529;           /* Nearly black */
  --whatsapp-color: #25D366;       /* WhatsApp brand color */
  
  /* Typography */
  --body-font-family: 'Open Sans', sans-serif;
  --heading-font-family: 'Roboto', sans-serif;
  
  /* Spacing */
  --section-padding: 80px 0;
  --element-spacing: 1rem;
  
  /* Border Radius */
  --border-radius-sm: 0.25rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
}

/* Accessibility Improvements */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 1em;
  background-color: var(--secondary-color);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.skip-link:focus {
  left: 0;
  opacity: 1;
}

/* Focus styles for better keyboard navigation */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* High contrast focus styles for dark mode */
body.dark-mode a:focus, 
body.dark-mode button:focus, 
body.dark-mode input:focus, 
body.dark-mode textarea:focus, 
body.dark-mode select:focus {
  outline-color: var(--primary-color);
}

/* Dark Mode Styling */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode .navbar,
body.dark-mode footer,
body.dark-mode .card,
body.dark-mode .section-bg {
  background-color: #1e1e1e !important;
  color: #e0e0e0;
}

body.dark-mode .navbar a,
body.dark-mode footer a,
body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
  color: #f0f0f0;
}

body.dark-mode .contact-options-btn {
  background-color: var(--primary-color);
  color: #121212;
}

body.dark-mode .breadcrumbs {
  background-color: #0a0a0a !important;
}

body.dark-mode .dark-mode-toggle {
  background-color: #f8f9fa;
  color: #121212;
}

/* Font Size Controls */
.font-size-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.font-size-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.font-size-btn:hover {
  background: #1a2942;
  transform: scale(1.05);
}

body.dark-mode .font-size-btn {
  background: var(--light-color);
  color: var(--dark-color);
}

body.dark-mode .font-size-btn:hover {
  background: #ffffff;
}

/* Header & Navigation Improvements */
.announcement-bar {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 8px 0;
  text-align: center;
  font-weight: 600;
}

.college-name-header {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-left: 10px;
}

@media (max-width: 768px) {
  .college-name-header {
    font-size: 1rem;
  }
}

/* Enhanced Navigation Styles */
.navbar .dropdown ul {
  border-radius: var(--border-radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.dark-mode .navbar .dropdown ul {
  background-color: #2a2a2a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--primary-color);
  color: var(--secondary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: #e0a800;
  transform: translateY(-5px);
}

/* Contact Options UI Styling */
.contact-options-btn {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: none;
  padding: 8px 15px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  width: 100%;
  text-align: center;
}

.contact-options-btn:hover {
  background-color: #e0a800;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.contact-options {
  display: none;
  text-align: center;
}

.contact-option {
  display: inline-block;
  padding: 8px 15px;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.contact-option.phone {
  background-color: var(--accent-color);
  color: white;
}

.contact-option.phone:hover {
  background-color: #0b8a9f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.contact-option.whatsapp {
  background-color: var(--whatsapp-color);
  color: white;
}

.contact-option.whatsapp:hover {
  background-color: #22c55e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Enhanced Card Styling */
.service-item, .card-item, .post-item, .portfolio-item, .testimonial-wrap {
  transition: all 0.3s ease;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.service-item:hover, 
.card-item:hover, 
.post-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

body.dark-mode .service-item, 
body.dark-mode .card-item, 
body.dark-mode .post-item, 
body.dark-mode .portfolio-item, 
body.dark-mode .testimonial-wrap {
  background-color: #2a2a2a;
}

/* Enhanced Portfolio/Gallery Styles */
.portfolio-flters {
  margin-bottom: 40px;
}

.portfolio-flters li {
  cursor: pointer;
  padding: 8px 18px;
  margin: 0 5px 10px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.portfolio-flters li:hover {
  color: var(--primary-color);
}

.portfolio-flters li.filter-active {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  font-weight: 600;
}

.portfolio-content {
  transition: all 0.4s ease;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.portfolio-content:hover {
  transform: scale(1.02);
}

/* Animation for highlighting important elements */
@keyframes pulse-highlight {
  0% {
    box-shadow: 0 0 0 0 rgba(254, 185, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(254, 185, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(254, 185, 0, 0);
  }
}

.pulse-highlight {
  animation: pulse-highlight 2s infinite;
}

/* Print Styles */
@media print {
  .navbar, 
  .footer, 
  .back-to-top, 
  .hero,
  .contact-options-btn {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }
  
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  p, h2, h3 {
    orphans: 3;
    widows: 3;
  }
}

/* ARIA improvements */
[aria-hidden="true"] {
  display: none !important;
}

[aria-expanded="false"] + .collapse {
  display: none;
}

/* Custom section styles */
.cta {
  background: linear-gradient(rgba(14, 29, 52, 0.8), rgba(14, 29, 52, 0.8)), url("../img/cta-bg.jpg") center center;
  background-size: cover;
  padding: 80px 0;
  color: #fff;
}

.cta h3 {
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

.cta p {
  color: #fff;
}

.cta .cta-btn {
  font-family: var(--heading-font-family);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 1px;
  display: inline-block;
  padding: 12px 40px;
  border-radius: 50px;
  transition: 0.5s;
  margin: 10px;
  background: var(--primary-color);
  color: var(--secondary-color);
}

.cta .cta-btn:hover {
  background: #fff;
  color: var(--primary-color);
}

/* Improve form styling */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(254, 185, 0, 0.25);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--secondary-color);
}

.btn-primary:hover {
  background-color: #e0a800;
  border-color: #e0a800;
  color: var(--secondary-color);
}

/* Custom social media buttons */
.social-links a {
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--secondary-color);
  color: #fff;
  transition: 0.3s;
  border-radius: 50%;
  margin-right: 10px;
}

.social-links a:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Custom animations for page elements */
[data-aos="custom-fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="custom-fade-up"].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

/* Loading spinner for async operations */
.spinner-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.spinner-container.active {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Additional accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Enhanced tables for better mobile experience */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .table-responsive table {
    min-width: 650px;
  }
}

/* Mobile experience improvements */
@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .breadcrumbs h2 {
    font-size: 1.75rem;
  }
  
  .cta {
    text-align: center;
  }
  
  .cta .cta-btn {
    margin: 10px 0 0 0;
  }
  
  .contact-options-btn,
  .contact-option {
    width: 100%;
    margin-bottom: 10px;
  }
}
