/* ========================================
   Modern School Website CSS
   Version: 2.0
   ======================================== */

/* ========== CSS Variables ========== */
:root {
   --primary-color: #667eea;
   --primary-dark: #5568d3;
   --primary-light: #7c8ff0;
   --secondary-color: #f5576c;
   --accent-color: #fbbc05;
   --success-color: #43e97b;
   --info-color: #4facfe;
   
   --text-dark: #1f2937;
   --text-light: #6b7280;
   --text-muted: #9ca3af;
   
   --bg-light: #f9fafb;
   --bg-white: #ffffff;
   --bg-dark: #111827;
   
   --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
   --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
   --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
   
   --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
   --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
   --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
   --shadow-xl: 0 12px 48px rgba(0,0,0,0.20);
   
   --border-radius: 12px;
   --border-radius-lg: 20px;
   --border-radius-xl: 24px;
   
   --transition: all 0.3s ease;
   --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Base Styles ========== */
* {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}

body {
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, -apple-system, BlinkMacSystemFont, sans-serif;
   background-color: var(--bg-light);
   color: var(--text-dark);
   line-height: 1.6;
   font-size: 16px;
   overflow-x: hidden;
}

a {
   color: var(--primary-color);
   text-decoration: none;
   transition: var(--transition);
}

a:hover {
   color: var(--primary-dark);
   text-decoration: none;
}

img {
   max-width: 100%;
   height: auto;
   display: block;
}

/* ========== Top Bar Modern ========== */
.top-bar {
   background: var(--gradient-primary);
   color: var(--bg-white);
   padding: 12px 0;
   box-shadow: var(--shadow-sm);
   position: relative;
}

.top-bar::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   height: 2px;
   background: var(--gradient-warm);
}

.top-bar a {
   color: var(--bg-white);
   transition: var(--transition);
}

.top-bar a:hover {
   color: var(--accent-color);
   transform: translateY(-2px);
}

.top-bar i {
   margin-right: 8px;
   font-size: 1.1rem;
}

.top-left, .top-right {
   display: flex;
   align-items: center;
   gap: 15px;
   flex-wrap: wrap;
}

/* ========== Menu Bar Modern ========== */
.menu-bar {
   background: var(--bg-white);
   box-shadow: var(--shadow-md);
   position: sticky;
   top: 0;
   z-index: 1000;
   transition: var(--transition-smooth);
}

.menu-bar.sticky.is-sticky {
   box-shadow: var(--shadow-lg);
   background: var(--bg-white);
}

.sm-clean {
   background: transparent;
   border: none;
}

.sm-clean a {
   color: var(--text-dark);
   font-weight: 700;
   text-transform: uppercase;
   font-size: 0.9rem;
   letter-spacing: 0.5px;
   padding: 18px 20px;
   transition: var(--transition);
   position: relative;
}

.sm-clean a::after {
   content: '';
   position: absolute;
   bottom: 0;
   left: 50%;
   width: 0;
   height: 3px;
   background: var(--primary-color);
   transition: var(--transition);
   transform: translateX(-50%);
}

.sm-clean a:hover::after,
.sm-clean a:focus::after,
.sm-clean a.highlighted::after {
   width: 80%;
}

.sm-clean a:hover,
.sm-clean a:focus,
.sm-clean a.highlighted {
   background: rgba(102, 126, 234, 0.05);
   color: var(--primary-color);
}

.sm-clean ul {
   background: var(--bg-white);
   border: none;
   box-shadow: var(--shadow-lg);
   border-radius: var(--border-radius);
   overflow: hidden;
   margin-top: 5px;
}

.sm-clean ul a {
   color: var(--text-dark);
   padding: 14px 20px;
}

.sm-clean ul a:hover,
.sm-clean ul a:focus,
.sm-clean ul a.highlighted {
   background: var(--gradient-primary);
   color: var(--bg-white);
}

/* ========== Logo/Brand ========== */
.brand {
   font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
   font-weight: 900;
   text-transform: uppercase;
   background: var(--gradient-primary);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
   font-size: 1.3rem;
   letter-spacing: 1px;
}

.top-header {
   display: flex;
   align-items: center;
   gap: 20px;
}

.top-header img {
   border-radius: var(--border-radius);
   box-shadow: var(--shadow-md);
   transition: var(--transition);
}

.top-header img:hover {
   transform: scale(1.05) rotate(2deg);
}

/* ========== Carousel Modern ========== */
.carousel {
   border-radius: var(--border-radius-xl);
   overflow: hidden;
   box-shadow: var(--shadow-lg);
}

.carousel-item {
   height: 500px;
}

.carousel-item img {
   object-fit: cover;
   height: 100%;
   width: 100%;
}

.carousel-caption {
   background: rgba(255, 255, 255, 0.95);
   backdrop-filter: blur(10px);
   color: var(--text-dark);
   border-top: 3px solid var(--primary-color);
   border-radius: var(--border-radius) var(--border-radius) 0 0;
   padding: 25px 35px;
   right: 0;
   left: 0;
   bottom: 0;
   text-align: left;
}

.carousel-caption h2 {
   color: var(--text-dark);
   font-weight: 800;
   margin-bottom: 10px;
}

.carousel-indicators {
   bottom: -40px;
}

.carousel-indicators li {
   width: 12px;
   height: 12px;
   border-radius: 50%;
   background-color: var(--primary-color);
   opacity: 0.5;
   transition: var(--transition);
}

.carousel-indicators .active {
   background-color: var(--accent-color);
   opacity: 1;
   transform: scale(1.3);
}

/* ========== Page Title Modern ========== */
.page-title {
   font-weight: 800;
   font-size: 1.5rem;
   color: var(--text-dark);
   border-bottom: 3px solid var(--bg-light);
   padding-bottom: 15px;
   margin-bottom: 20px;
   position: relative;
}

.page-title::after {
   content: '';
   position: absolute;
   bottom: -3px;
   left: 0;
   width: 100px;
   height: 3px;
   background: var(--gradient-primary);
   border-radius: 3px;
}

footer .page-title {
   color: var(--bg-white);
}

footer .page-title::after {
   background: var(--accent-color);
}

/* ========== Quote/Testimonial Modern ========== */
.quote {
   overflow: hidden;
   background: var(--gradient-primary);
   border-radius: var(--border-radius-lg);
   box-shadow: var(--shadow-md);
}

.quote-title {
   font-size: 0.95rem;
   font-weight: 800;
   text-transform: uppercase;
   display: inline-block;
   padding: 15px 25px;
   color: var(--text-dark);
   background: var(--accent-color);
   border-radius: var(--border-radius-lg) 0 0 0;
}

ul.quote {
   display: block;
   padding: 0;
   margin: 0;
   list-style: none;
   position: relative;
   overflow: hidden;
   height: 50px;
   background-color: transparent;
}

ul.quote li {
   color: var(--bg-white);
   position: absolute;
   top: -950em;
   left: 0;
   display: block;
   white-space: nowrap;
   padding: 17px 25px;
   font-size: 0.95rem;
   font-style: italic;
}

ul.quote li span {
   color: var(--accent-color);
   font-weight: 700;
   font-style: normal;
}

/* ========== Card Styles ========== */
.card {
   border: none;
   border-radius: var(--border-radius-xl);
   box-shadow: var(--shadow-sm);
   transition: var(--transition-smooth);
   overflow: hidden;
   background: var(--bg-white);
}

.card:hover {
   box-shadow: var(--shadow-lg);
   transform: translateY(-5px);
}

h5.card-title {
   font-size: 1.15rem;
   font-weight: 800;
   color: var(--text-dark);
   margin-bottom: 12px;
}

.card-title a {
   color: var(--text-dark);
   transition: var(--transition);
}

.card-title a:hover {
   color: var(--primary-color);
}

.card-body {
   padding: 25px;
}

.card-footer {
   background: var(--bg-light);
   border-top: 2px solid rgba(102, 126, 234, 0.1);
   padding: 15px 25px;
}

/* ========== Sidebar Modern ========== */
.sidebar .list-group-item {
   border: 2px solid var(--bg-light);
   border-radius: var(--border-radius);
   margin-bottom: 8px;
   transition: var(--transition);
   background: var(--bg-white);
}

.sidebar .list-group-item:hover {
   border-color: var(--primary-color);
   transform: translateX(5px);
   background: rgba(102, 126, 234, 0.05);
}

/* ========== Footer Modern ========== */
footer {
   color: var(--bg-white);
   margin-top: 60px;
}

footer .primary-footer {
   background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
   padding: 50px 0;
}

footer .secondary-footer {
   background: rgba(0, 0, 0, 0.3);
   border-top: 1px solid rgba(255, 255, 255, 0.1);
   padding: 20px 0;
}

footer .copyright {
   color: var(--bg-white);
}

footer a {
   color: var(--bg-white);
   transition: var(--transition);
}

footer a:hover {
   color: var(--accent-color);
}

footer .page-title {
   color: var(--accent-color);
   font-size: 1.2rem;
   margin-bottom: 20px;
}

/* ========== Social Icons Modern ========== */
.social-icon {
   width: 45px;
   height: 45px;
   font-size: 1.2rem;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   color: var(--bg-white);
   transition: var(--transition);
   margin-right: 10px;
   box-shadow: var(--shadow-md);
}

.social-icon:hover {
   transform: translateY(-5px) scale(1.1);
   box-shadow: var(--shadow-xl);
}

.linkedin { background: #007bb6; }
.facebook { background: #3b5998; }
.twitter { background: #1da1f2; }
.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.youtube { background: #ff0000; }

/* ========== Tags Modern ========== */
.tag-content-block {
   display: flex;
   flex-wrap: wrap;
   gap: 10px;
}

.tag a {
   display: inline-block;
   padding: 8px 20px;
   background: rgba(255, 255, 255, 0.1);
   backdrop-filter: blur(10px);
   color: var(--bg-white);
   border-radius: 50px;
   font-size: 0.85rem;
   font-weight: 600;
   text-transform: uppercase;
   transition: var(--transition);
   border: 2px solid rgba(255, 255, 255, 0.2);
}

.tag a:hover {
   background: var(--accent-color);
   color: var(--text-dark);
   border-color: var(--accent-color);
   transform: translateY(-3px);
   box-shadow: var(--shadow-md);
}

/* ========== Search Form Modern ========== */
#search_form {
   z-index: 999999;
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.95);
   backdrop-filter: blur(10px);
   transition: var(--transition-smooth);
   transform: translate(0, -100%) scale(0.8);
   opacity: 0;
   display: flex;
   align-items: center;
   justify-content: center;
}

#search_form.open {
   transform: translate(0, 0) scale(1);
   opacity: 1;
}

#search_form input[type="search_form"] {
   width: 80%;
   max-width: 800px;
   color: var(--bg-white);
   background: rgba(255, 255, 255, 0.1);
   font-size: 3rem;
   font-weight: 300;
   text-align: center;
   border: none;
   border-bottom: 3px solid var(--primary-color);
   padding: 20px;
   outline: none;
   border-radius: var(--border-radius);
}

#search_form input[type="search_form"]::placeholder {
   color: rgba(255, 255, 255, 0.5);
}

#search_form .btn {
   margin-top: 30px;
   padding: 15px 40px;
   font-size: 1.2rem;
   border-radius: 50px;
}

/* ========== Action Buttons ========== */
.action-button {
   background: var(--gradient-primary);
   color: var(--bg-white);
   border: none;
   padding: 10px 24px;
   border-radius: 50px;
   font-weight: 700;
   transition: var(--transition);
   box-shadow: var(--shadow-sm);
}

.action-button:hover {
   background: var(--gradient-secondary);
   color: var(--bg-white);
   transform: translateY(-3px);
   box-shadow: var(--shadow-md);
}

.action-button:active {
   transform: translateY(-1px);
}

.btn-sm.action-button {
   padding: 8px 20px;
   font-size: 0.9rem;
}

.btn-lg.action-button {
   padding: 14px 32px;
   font-size: 1.1rem;
}

/* ========== Return to Top Modern ========== */
#return-to-top {
   position: fixed;
   bottom: 30px;
   right: 30px;
   width: 50px;
   height: 50px;
   background: var(--gradient-primary);
   border-radius: 50%;
   display: none;
   align-items: center;
   justify-content: center;
   box-shadow: var(--shadow-lg);
   transition: var(--transition);
   z-index: 10000;
   border: 3px solid var(--bg-white);
}

#return-to-top:hover {
   transform: translateY(-5px) scale(1.1);
   box-shadow: var(--shadow-xl);
}

#return-to-top i {
   color: var(--bg-white);
   font-size: 1.5rem;
}

/* ========== Toastr Override ========== */
.toast {
   background-color: var(--text-dark);
   border-radius: var(--border-radius);
   box-shadow: var(--shadow-lg);
}

.toast-success {
   background: var(--gradient-cool);
}

.toast-error {
   background: var(--gradient-secondary);
}

.toast-info {
   background: var(--gradient-primary);
}

.toast-warning {
   background: var(--gradient-warm);
}

.toast-title,
.toast-message {
   text-align: left;
   font-weight: 600;
}

/* ========== Utilities ========== */
.text-gradient {
   background: var(--gradient-primary);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

.bg-gradient-primary {
   background: var(--gradient-primary);
}

.bg-gradient-secondary {
   background: var(--gradient-secondary);
}

.shadow-soft {
   box-shadow: var(--shadow-sm);
}

.shadow-medium {
   box-shadow: var(--shadow-md);
}

.shadow-strong {
   box-shadow: var(--shadow-lg);
}

/* ========== Animations ========== */
@keyframes fadeIn {
   from {
      opacity: 0;
      transform: translateY(20px);
   }
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

@keyframes slideInLeft {
   from {
      opacity: 0;
      transform: translateX(-30px);
   }
   to {
      opacity: 1;
      transform: translateX(0);
   }
}

@keyframes slideInRight {
   from {
      opacity: 0;
      transform: translateX(30px);
   }
   to {
      opacity: 1;
      transform: translateX(0);
   }
}

.fade-in {
   animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
   animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
   animation: slideInRight 0.6s ease-out;
}

/* ========== Responsive Design ========== */
/* Extra Small Devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
   :root {
      font-size: 14px;
   }
   
   .top-left,
   .top-right {
      text-align: center !important;
      justify-content: center;
      width: 100%;
   }
   
   .top-right {
      display: none;
   }
   
   .carousel-item {
      height: 250px;
   }
   
   .carousel-caption {
      padding: 15px;
   }
   
   .page-title {
      font-size: 1.3rem;
   }
   
   #search_form input[type="search_form"] {
      font-size: 1.5rem;
   }
   
   #return-to-top {
      width: 45px;
      height: 45px;
      bottom: 20px;
      right: 20px;
   }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
   .top-left {
      text-align: center !important;
      justify-content: center;
   }
   
   .top-right {
      display: none;
   }
   
   .carousel-item {
      height: 300px;
   }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
   .top-left {
      text-align: center !important;
   }
   
   .top-right {
      display: flex;
      justify-content: center;
   }
   
   .carousel-item {
      height: 400px;
   }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
   .carousel-item {
      height: 500px;
   }
}

/* ========== Print Styles ========== */
@media print {
   .top-bar,
   .menu-bar,
   .carousel,
   footer,
   #search_form,
   #return-to-top,
   .action-button {
      display: none !important;
   }
   
   body {
      background: white;
   }
   
   .card {
      box-shadow: none;
      border: 1px solid #ddd;
      page-break-inside: avoid;
   }
}

/* ========== Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
   *,
   *::before,
   *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
   }
}

/* Focus Visible for Keyboard Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
   outline: 3px solid var(--primary-color);
   outline-offset: 3px;
   border-radius: 4px;
}

/* ========== Selection ========== */
::selection {
   background: var(--primary-color);
   color: var(--bg-white);
}

::-moz-selection {
   background: var(--primary-color);
   color: var(--bg-white);
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
   width: 12px;
   height: 12px;
}

::-webkit-scrollbar-track {
   background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
   background: var(--gradient-primary);
   border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
   background: var(--primary-dark);
}

/* ========== Loading Animation ========== */
@keyframes spin {
   to {
      transform: rotate(360deg);
   }
}

.loading {
   animation: spin 1s linear infinite;
}

/* ========== END ========== */