/* ============================================
   MODERN MINIMALIST THEME - SMA KRISTEN PRY
   ============================================ */

/* CSS Variables for easy customization */
:root {
   --primary-color: #2563eb;
   --secondary-color: #1e40af;
   --accent-color: #f97316;
   --dark-color: #1e293b;
   --light-color: #f8fafc;
   --gray-100: #f1f5f9;
   --gray-200: #e2e8f0;
   --gray-300: #cbd5e1;
   --gray-600: #475569;
   --gray-800: #1e293b;
   --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
   --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
   --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
   --radius: 0.5rem;
   --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern Reset & Base Styles */
* {
   box-sizing: border-box;
   margin: 0;
   padding: 0;
}

body {
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
   background-color: var(--light-color);
   color: var(--gray-800);
   line-height: 1.6;
   font-size: 16px;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
}

img {
   max-width: 100%;
   height: auto;
   display: block;
}

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

a:hover {
   color: var(--secondary-color);
}

/* ============================================
   TOP BAR - Modern & Clean
   ============================================ */
.top-bar {
   background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
   color: white;
   padding: 1.5rem 0;
   box-shadow: var(--shadow-md);
}

.top-bar a {
   color: rgba(255, 255, 255, 0.9);
   font-size: 0.875rem;
   transition: var(--transition);
}

.top-bar a:hover {
   color: var(--accent-color);
   transform: translateX(2px);
}

.top-bar i {
   margin-right: 0.5rem;
   opacity: 0.8;
}

.top-header {
   display: flex;
   align-items: center;
   gap: 1rem;
}

.brand {
   font-family: 'Inter', -apple-system, sans-serif;
   font-weight: 700;
   letter-spacing: -0.5px;
   color: white;
   margin: 0;
}

/* ============================================
   NAVIGATION MENU - Modern Minimalist
   ============================================ */
.menu-bar {
   background: white;
   box-shadow: var(--shadow-sm);
   border-bottom: 1px solid var(--gray-200);
   position: sticky;
   top: 0;
   z-index: 1000;
   transition: var(--transition);
}

.menu-bar.scrolled {
   box-shadow: var(--shadow-md);
}

.sm-clean {
   background: white;
   padding: 0;
}

.sm-clean ul {
   background: white;
   border: 1px solid var(--gray-200);
   border-radius: var(--radius);
   box-shadow: var(--shadow-lg);
   margin-top: 0.5rem;
}

.sm-clean a {
   color: var(--gray-800);
   font-weight: 500;
   font-size: 0.9rem;
   padding: 0.875rem 1.25rem;
   transition: var(--transition);
   text-transform: none;
   letter-spacing: 0.3px;
}

.sm-clean > li > a {
   font-weight: 600;
}

.sm-clean ul a:hover,
.sm-clean ul a:focus,
.sm-clean ul a:active,
.sm-clean ul a.highlighted {
   background: var(--primary-color);
   color: white;
}

.sm-clean a:hover {
   color: var(--primary-color);
}

/* ============================================
   CAROUSEL - Modern & Elegant
   ============================================ */
.carousel-caption {
   background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
   border: none;
   padding: 2rem;
   text-align: left;
   border-radius: var(--radius) var(--radius) 0 0;
}

.carousel-caption h2 {
   color: white;
   font-weight: 700;
   text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-indicators li {
   width: 12px;
   height: 12px;
   border-radius: 50%;
   background-color: rgba(255, 255, 255, 0.5);
   transition: var(--transition);
}

.carousel-indicators .active {
   background-color: var(--accent-color);
   transform: scale(1.2);
}

.carousel-item img {
   border-radius: var(--radius);
   object-fit: cover;
}

/* ============================================
   PAGE TITLE - Modern Accent
   ============================================ */
.page-title {
   font-weight: 700;
   font-size: 1.75rem;
   color: var(--gray-800);
   position: relative;
   padding-bottom: 0.75rem;
   margin-bottom: 1.5rem;
   letter-spacing: -0.5px;
}

.page-title::after {
   content: '';
   position: absolute;
   bottom: 0;
   left: 0;
   width: 60px;
   height: 4px;
   background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
   border-radius: 2px;
}

footer .page-title::after {
   background: linear-gradient(90deg, white, var(--accent-color));
}

/* ============================================
   CARDS - Modern Minimalist Design
   ============================================ */
.card {
   border: 1px solid var(--gray-200);
   border-radius: var(--radius);
   overflow: hidden;
   transition: var(--transition);
   background: white;
   box-shadow: var(--shadow-sm);
}

.card:hover {
   box-shadow: var(--shadow-md);
   transform: translateY(-2px);
}

.card-img-top {
   border-radius: var(--radius) var(--radius) 0 0;
   object-fit: cover;
   transition: var(--transition);
}

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

.card-title {
   font-size: 1.125rem;
   font-weight: 600;
   color: var(--gray-800);
   margin-bottom: 0.75rem;
   line-height: 1.4;
}

.card-title a {
   color: var(--gray-800);
}

.card-title a:hover {
   color: var(--primary-color);
}

.card-text {
   color: var(--gray-600);
   line-height: 1.6;
}

.card-footer {
   background-color: var(--gray-100);
   border-top: 1px solid var(--gray-200);
   padding: 0.875rem 1.25rem;
}

/* ============================================
   QUOTE SECTION - Modern Animated
   ============================================ */
.quote {
   background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
   border-radius: var(--radius);
   overflow: hidden;
   box-shadow: var(--shadow-md);
}

.quote-title {
   background: var(--accent-color);
   color: white;
   font-weight: 700;
   padding: 0.875rem 1.5rem;
   font-size: 0.875rem;
   letter-spacing: 1px;
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
}

ul.quote {
   height: 50px;
   padding: 0;
   margin: 0;
   list-style: none;
}

ul.quote li {
   color: white;
   padding: 1rem 1.5rem;
   font-size: 0.9rem;
   line-height: 1.6;
}

ul.quote li span {
   color: var(--accent-color);
   font-weight: 600;
}

/* ============================================
   BUTTONS - Modern & Interactive
   ============================================ */
.action-button {
   background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
   color: white;
   border: none;
   padding: 0.625rem 1.25rem;
   border-radius: var(--radius);
   font-weight: 600;
   font-size: 0.9rem;
   transition: var(--transition);
   display: inline-flex;
   align-items: center;
   gap: 0.5rem;
   box-shadow: var(--shadow-sm);
}

.action-button:hover {
   background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
   transform: translateY(-2px);
   box-shadow: var(--shadow-md);
   color: white;
}

.action-button:active {
   transform: translateY(0);
}

.btn-sm {
   padding: 0.5rem 1rem;
   font-size: 0.875rem;
}

/* ============================================
   FORMS - Clean & Modern
   ============================================ */
.form-control,
.custom-select {
   border: 1px solid var(--gray-300);
   border-radius: var(--radius);
   padding: 0.625rem 1rem;
   transition: var(--transition);
   font-size: 0.9rem;
}

.form-control:focus,
.custom-select:focus {
   border-color: var(--primary-color);
   box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
   outline: none;
}

.form-label {
   font-weight: 500;
   color: var(--gray-800);
   margin-bottom: 0.5rem;
   font-size: 0.9rem;
}

/* ============================================
   SIDEBAR - Clean Design
   ============================================ */
.sidebar .list-group-item {
   border: 1px solid var(--gray-200);
   border-radius: var(--radius);
   margin-bottom: 0.5rem;
   transition: var(--transition);
   font-size: 0.9rem;
   background: white;
}

.sidebar .list-group-item:hover {
   background-color: var(--gray-100);
   border-color: var(--primary-color);
   transform: translateX(4px);
}

/* ============================================
   FOOTER - Modern & Organized
   ============================================ */
footer {
   color: white;
   font-size: 0.9rem;
   margin-top: 4rem;
}

footer .primary-footer {
   background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
   padding: 3rem 0 2rem;
}

footer .secondary-footer {
   background-color: var(--dark-color);
   border-top: 1px solid rgba(255, 255, 255, 0.1);
   padding: 1rem 0;
}

footer a {
   color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
   color: var(--accent-color);
}

footer dt {
   opacity: 0.7;
   font-weight: 500;
   font-size: 0.875rem;
}

footer dd {
   font-weight: 400;
}

/* ============================================
   SOCIAL ICONS - Modern Design
   ============================================ */
.social-icon {
   width: 42px;
   height: 42px;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   transition: var(--transition);
   font-size: 1.1rem;
   box-shadow: var(--shadow-sm);
}

.social-icon:hover {
   transform: translateY(-3px);
   box-shadow: var(--shadow-md);
}

.facebook { background: linear-gradient(135deg, #3b5998, #2d4373); }
.twitter { background: linear-gradient(135deg, #1da1f2, #1a8cd8); }
.instagram { background: linear-gradient(135deg, #e4405f, #833ab4); }
.youtube { background: linear-gradient(135deg, #ff0000, #cc0000); }
.linked-in { background: linear-gradient(135deg, #0077b5, #005885); }

/* ============================================
   TAGS - Modern Chips
   ============================================ */
.tag a {
   display: inline-block;
   padding: 0.5rem 1rem;
   margin: 0.25rem;
   background: rgba(255, 255, 255, 0.1);
   border: 1px solid rgba(255, 255, 255, 0.3);
   border-radius: 2rem;
   color: white;
   font-size: 0.8rem;
   font-weight: 500;
   transition: var(--transition);
   text-transform: uppercase;
   letter-spacing: 0.5px;
}

.tag a:hover {
   background: var(--accent-color);
   border-color: var(--accent-color);
   transform: translateY(-2px);
}

/* ============================================
   SEARCH - Modern Overlay
   ============================================ */
#search_form {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.95);
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 9999;
   opacity: 0;
   pointer-events: none;
   transition: opacity 0.3s ease;
   backdrop-filter: blur(10px);
}

#search_form.open {
   opacity: 1;
   pointer-events: all;
}

#search_form input[type="search_form"] {
   width: 80%;
   max-width: 600px;
   padding: 1.5rem;
   font-size: 2rem;
   background: rgba(255, 255, 255, 0.1);
   border: 2px solid rgba(255, 255, 255, 0.3);
   border-radius: var(--radius);
   color: white;
   outline: none;
   transition: var(--transition);
}

#search_form input[type="search_form"]:focus {
   border-color: var(--accent-color);
   background: rgba(255, 255, 255, 0.15);
}

#search_form .btn {
   margin-top: 2rem;
}

/* ============================================
   RETURN TO TOP - Modern Floating Button
   ============================================ */
#return-to-top {
   position: fixed;
   bottom: 2rem;
   right: 2rem;
   width: 50px;
   height: 50px;
   background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
   color: white;
   display: none;
   align-items: center;
   justify-content: center;
   border-radius: 50%;
   box-shadow: var(--shadow-lg);
   transition: var(--transition);
   z-index: 1000;
   cursor: pointer;
}

#return-to-top:hover {
   transform: translateY(-5px);
   box-shadow: 0 15px 30px rgba(37, 99, 235, 0.4);
}

#return-to-top i {
   font-size: 1.5rem;
   margin: 0;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading {
   opacity: 0.6;
   pointer-events: none;
   position: relative;
}

.loading::after {
   content: '';
   position: absolute;
   top: 50%;
   left: 50%;
   width: 30px;
   height: 30px;
   margin: -15px 0 0 -15px;
   border: 3px solid var(--gray-300);
   border-top-color: var(--primary-color);
   border-radius: 50%;
   animation: spin 0.8s linear infinite;
}

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

/* ============================================
   RESPONSIVE - Mobile First
   ============================================ */
@media (max-width: 991.98px) {
   .top-right {
      display: none;
   }
   
   .top-left {
      text-align: center;
   }
   
   .page-title {
      font-size: 1.5rem;
   }
   
   .carousel-caption {
      padding: 1rem;
   }
   
   #search_form input[type="search_form"] {
      font-size: 1.5rem;
   }
}

@media (max-width: 575.98px) {
   :root {
      font-size: 14px;
   }
   
   .top-bar {
      padding: 1rem 0;
   }
   
   .page-title {
      font-size: 1.25rem;
   }
   
   .card-body {
      padding: 1rem;
   }
   
   #return-to-top {
      width: 44px;
      height: 44px;
      bottom: 1rem;
      right: 1rem;
   }
}

/* ============================================
   ARCHIVE TREE - Interactive Year/Month Navigation
   ============================================ */
.archive-tree {
   padding: 0;
}

.archive-year-item {
   border-bottom: 1px solid var(--gray-200);
}

.archive-year-item:last-child {
   border-bottom: none;
}

.archive-year-btn {
   width: 100%;
   background: white;
   border: none;
   padding: 1rem 1.25rem;
   text-align: left;
   cursor: pointer;
   display: flex;
   align-items: center;
   gap: 0.5rem;
   transition: var(--transition);
   color: var(--gray-800);
   font-weight: 600;
   font-size: 0.95rem;
}

.archive-year-btn:hover {
   background-color: var(--gray-100);
}

.archive-year-btn.active {
   background-color: var(--primary-color);
   color: white;
}

.archive-year-btn.active .badge-primary {
   background-color: white !important;
   color: var(--primary-color) !important;
}

.archive-year-btn .toggle-icon {
   transition: transform 0.3s ease;
   margin-left: auto;
}

.archive-year-btn.active .toggle-icon {
   transform: rotate(180deg);
}

.archive-months {
   max-height: 0;
   overflow: hidden;
   background-color: var(--gray-100);
   transition: max-height 0.3s ease;
}

.archive-months.show {
   max-height: 800px;
}

.archive-month-link {
   display: flex;
   align-items: center;
   padding: 0.75rem 1.25rem 0.75rem 2.5rem;
   color: var(--gray-700);
   font-size: 0.875rem;
   transition: var(--transition);
   border-left: 3px solid transparent;
}

.archive-month-link:hover {
   background-color: white;
   color: var(--primary-color);
   border-left-color: var(--primary-color);
   padding-left: 2.75rem;
}

.archive-month-link .badge {
   font-size: 0.75rem;
   padding: 0.25rem 0.5rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-gradient {
   background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

.shadow-hover {
   transition: var(--transition);
}

.shadow-hover:hover {
   box-shadow: var(--shadow-lg);
}

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

::-webkit-scrollbar-track {
   background: var(--gray-200);
}

::-webkit-scrollbar-thumb {
   background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
   border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
   background: var(--secondary-color);
}

/* Selection */
::selection {
   background: var(--primary-color);
   color: white;
}

/* Focus visible for accessibility */
*:focus-visible {
   outline: 2px solid var(--primary-color);
   outline-offset: 2px;
}
