/* ============================================================
   SHAKEMU GARDENS SCHOOL - style.css
   ============================================================ */

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F5F7FB; }
::-webkit-scrollbar-thumb { background: #0D47C7; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #082B8A; }

/* ── Clip-path geometric shapes ── */
.clip-slant-left   { clip-path: polygon(0 0, 100% 0, 78% 100%, 0% 100%); }
.clip-slant-right  { clip-path: polygon(12% 0, 100% 0, 100% 100%, 0% 100%); }
.clip-header-right { clip-path: polygon(10% 0, 100% 0, 100% 100%, 0% 100%); }

/* ============================================================
   DROPDOWN MENUS
   ============================================================ */
.nav-item .dropdown-menu {
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.nav-item.open .dropdown-menu,
.nav-item:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.nav-item.open .dropdown-arrow,
.nav-item:hover .dropdown-arrow {
    transform: rotate(180deg);
}
.dropdown-item {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #1E1E1E;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    border-bottom: 1px solid #D9E1EC44;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
    text-decoration: none;
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover {
    background: #F5F7FB;
    color: #0D47C7;
    padding-left: 24px;
}

/* Nested dropdown for Articles & Blogs */
.dropdown-item.has-submenu {
    position: relative;
    cursor: pointer;
}
.dropdown-item.has-submenu::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    margin-left: auto;
    transition: transform 0.2s ease;
}
.dropdown-item.has-submenu.open::after {
    transform: rotate(90deg);
}
.submenu {
    display: none;
    background: #FAFBFC;
    border-left: 3px solid #0D47C7;
    margin-top: 4px;
    animation: slideDown 0.3s ease;
}
.dropdown-item.has-submenu.open .submenu {
    display: block;
}
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}
.submenu a {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #1E1E1E;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 32px;
    border-bottom: 1px solid #D9E1EC22;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
    text-decoration: none;
}
.submenu a:last-child { border-bottom: none; }
.submenu a:hover {
    background: #F0F2F5;
    color: #0D47C7;
    padding-left: 36px;
}
.submenu a i {
    font-size: 12px;
    width: 16px;
}

/* ============================================================
   MOBILE MENU ENHANCEMENTS
   ============================================================ */
.navbar-inner.mobile-open {
    display: flex !important;
    flex-direction: column;
}

.navbar-inner .nav-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

body.menu-open {
    overflow: hidden;
}

/* ============================================================
   HERO SECTION
   ============================================================ */

/* Slideshow container */
.hero-slideshow {
    position: relative;
    height: 420px;
    width: 200%;
    border-radius: 16px;
    overflow: hidden;
    margin-right: 10px;
    margin-left: -80px;
    background: linear-gradient(120deg, #082B8A 0%, #0D47C7 50%, #1560e8 100%);

}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    background: linear-gradient(120deg, #082B8A 0%, #0D47C7 55%, #1560e8 100%);
}
.hero-slide.active { opacity: 1; }

/* Hero center image */
.hero-image {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-bg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 100%;
    background: rgba(255,255,255,.06);
    clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
}

.hero-image img {
    height: 360px;
    object-fit: contain;
    object-position: center;
    border-radius: 16px;
    filter: drop-shadow(0 8px 32px rgba(0,0,0,.4));
}

/* Hero right panel - Text Visibility Improvement */
.feature-text strong {
    display: block;
    font-size: 16px;          /* Slightly larger for clarity */
    font-weight: 900;         /* Heavier font weight */
    color: #082B8A;           /* Uses your --dark-blue variable for high contrast */
    font-family: 'Poppins', sans-serif;
    line-height: 1.4;
    text-shadow: 0px 1px 1px rgba(0,0,0,0.1); /* Subtle shadow to help it pop */
}

.tab-section { display: none; }
.tab-section.active-tab { display: block; }

/* ============================================================
   MISC COMPONENTS
   ============================================================ */
.whatsapp-widget {
    animation: wa-bounce 2.5s ease-in-out infinite;
}
@keyframes wa-bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE TWEAKS - COMPREHENSIVE MOBILE OPTIMIZATION
   ============================================================ */

/* ========== TABLET (1024px and below) ========== */
@media (max-width: 1024px) {
    .clip-header-right { display: none; }
    
    /* Hero adjustments */
    .hero-inner {
        grid-template-columns: 1fr 1fr 280px;
        gap: 16px;
    }
    
    .hero-year { font-size: 60px; }
    .hero-school { font-size: 48px; }
    .hero-admission { font-size: 38px; }
    .hero-open { font-size: 24px; }
}

/* ========== TABLET PORTRAIT (768px and below) ========== */
@media (max-width: 768px) {
    /* Top Header - Minimal mobile version */
    .top-header-inner {
        flex-direction: column;
        text-align: center;
        padding: 6px 12px;
    }
    
    .logo-area {
        flex-direction: column;
        gap: 2px;
    }
    
    /* Hide logo on mobile */
    .logo-img-wrap {
        display: none;
    }
    
    /* School name - 12pt Times New Roman */
    .school-name h1 {
        font-size: 12pt;
        font-family: 'Times New Roman', Times, serif;
        margin-bottom: 2px;
        font-weight: normal;
    }
    
    /* Tagline - 12pt Times New Roman */
    .school-name p {
        font-size: 12pt;
        font-family: 'Times New Roman', Times, serif;
        margin-bottom: 0;
        font-weight: normal;
    }
    
    /* Hide subtitle on mobile */
    .school-name small {
        display: none;
    }
    
    /* Hide location on mobile */
    .location-area {
        display: none;
    }
    
    /* Navbar - Mobile menu */
    .navbar {
        top: auto;
        position: relative;
    }
    
    .navbar-inner {
        flex-direction: column;
        padding: 0;
    }
    
    .hamburger {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        background: var(--blue);
        padding: 14px 20px;
    }
    
    .hamburger::after {
        content: '☰';
        font-size: 24px;
    }
    
    .hamburger.active::after {
        content: '✕';
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 14px 20px;
    }
    
    .nav-dropdown {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: rgba(255,255,255,0.95);
    }
    
    /* Hero - Stack vertically */
    .hero {
        min-height: auto;
    }
    
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }
    
    .hero-text {
        padding: 32px 20px;
        text-align: center;
    }
    
    .hero-year { font-size: 48px; letter-spacing: -2px; }
    .hero-school { font-size: 36px; letter-spacing: -1px; }
    .hero-admission { font-size: 28px; }
    .hero-open {
        font-size: 20px;
        margin: 10px auto 0;
    }
    
    .hero-btn {
        margin-top: 20px;
    }
    
    /* Hero slideshow */
    .hero-slideshow {
        width: 100%;
        height: 300px;
        margin: 0;
        border-radius: 0;
    }
    
    .hero-image {
        min-height: 300px;
        padding: 0;
    }
    
    .hero-image img {
        height: 280px;
    }
    
    .hero-image-bg {
        display: none;
    }
    
    /* Hero features panel */
    .hero-features {
        padding: 24px 20px;
    }
    
    .hero-features::before {
        display: none;
    }
    
    .feature-item {
        gap: 12px;
    }
    
    .feature-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
    
    .feature-text strong {
        font-size: 14px;
    }
    
    /* Three column layout - Stack */
    .three-col {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 16px;
    }
    
    .sidebar-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .sidebar-item {
        padding: 14px 12px;
    }
    
    .sidebar-item:hover,
    .sidebar-item.active {
        transform: translateY(-2px);
    }
}

/* ========== MOBILE (640px and below) ========== */
@media (max-width: 640px) {
    /* Base adjustments */
    body {
        font-size: 16px;
    }
    
    .whatsapp-widget span.whatsapp-label {
        display: none;
    }
    
    /* Top header */
    .top-header {
        position: relative;
    }
    
    .top-header-inner {
        padding: 10px 12px;
    }
    
    .logo-img-wrap {
        width: 50px;
        height: 50px;
    }
    
    .school-name h1 {
        font-size: 22px;
    }
    
    .school-name p {
        font-size: 12px;
    }
    
    .location-area i {
        font-size: 18px;
    }
    
    .location-area span {
        font-size: 12px;
    }
    
    /* Hero */
    .hero-text {
        padding: 24px 16px;
    }
    
    .hero-year { font-size: 36px; }
    .hero-school { font-size: 28px; }
    .hero-admission { font-size: 22px; }
    .hero-open { font-size: 16px; }
    
    .hero-btn {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .hero-slideshow {
        height: 250px;
    }
    
    .hero-image {
        min-height: 250px;
    }
    
    .hero-image img {
        height: 230px;
    }
    
    .hero-features {
        padding: 20px 16px;
        gap: 16px;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .feature-text strong {
        font-size: 13px;
    }
    
    .arrow-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Sidebar menu - Single column on small mobile */
    .sidebar-menu {
        grid-template-columns: 1fr;
    }
    
    /* Clip paths - Remove on mobile */
    .clip-slant-left,
    .clip-slant-right,
    .clip-header-right {
        clip-path: none;
    }
}

/* ========== SMALL MOBILE (480px and below) ========== */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    
    .top-header-inner {
        padding: 8px 10px;
    }
    
    .school-name h1 {
        font-size: 18px;
    }
    
    .school-name p {
        font-size: 11px;
    }
    
    .hero-year { font-size: 32px; }
    .hero-school { font-size: 24px; }
    .hero-admission { font-size: 20px; }
    .hero-open { font-size: 14px; }
    
    .hero-slideshow {
        height: 220px;
    }
    
    .hero-image {
        min-height: 220px;
    }
    
    .hero-image img {
        height: 200px;
    }
    
    .hero-features {
        padding: 16px 12px;
    }
    
    .feature-item {
        gap: 10px;
    }
    
    .feature-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .feature-text strong {
        font-size: 12px;
    }
}

/* ========== TOUCH DEVICE OPTIMIZATIONS ========== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-link {
        padding: 16px 20px;
        min-height: 48px;
    }
    
    .sidebar-item {
        padding: 16px;
        min-height: 56px;
    }
    
    .hero-btn {
        padding: 12px 24px;
        min-height: 44px;
    }
    
    .arrow-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .nav-item:hover .dropdown-menu {
        display: none;
    }
    
    .nav-item.open .dropdown-menu {
        display: block;
    }
    
    /* Tap highlight color */
    * {
        -webkit-tap-highlight-color: rgba(13, 71, 199, 0.2);
    }
}

/* ========== LANDSCAPE MOBILE ========== */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        min-height: 300px;
    }
    
    .hero-slideshow {
        height: 280px;
    }
    
    .hero-image {
        min-height: 280px;
    }
    
    .hero-image img {
        height: 260px;
    }
    
    .hero-text {
        padding: 20px 16px;
    }
    
    .hero-year { font-size: 32px; }
    .hero-school { font-size: 26px; }
    .hero-admission { font-size: 22px; }
}

/* ============================================================
   MODAL STYLES - Sponsorship & Donation
   ============================================================ */

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 15px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #666;
}

.close-modal:hover {
  color: #000;
}

/* Form Styles */
.modal-content form input,
.modal-content form select,
.modal-content form textarea {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
}

.modal-content form input:focus,
.modal-content form select:focus,
.modal-content form textarea:focus {
  outline: none;
  border-color: #0D47C7;
  box-shadow: 0 0 0 3px rgba(13, 71, 199, 0.1);
}

.modal-content form button {
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  background: linear-gradient(135deg, #0D47C7 0%, #082B8A 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'Poppins', sans-serif;
}

.modal-content form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 71, 199, 0.3);
}

.modal-content form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.modal-content h2 {
  color: #082B8A;
  margin-bottom: 20px;
  font-size: 28px;
  font-family: 'Poppins', sans-serif;
}

.modal-content h3 {
  color: #0D47C7;
  margin: 20px 0 15px;
  font-size: 20px;
  font-family: 'Poppins', sans-serif;
}

/* Payment Method Buttons */
.payment-btn {
  width: 100%;
  padding: 20px;
  margin: 10px 0;
  background: white;
  border: 2px solid #0D47C7;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  color: #0D47C7;
  font-family: 'Poppins', sans-serif;
}

.payment-btn:hover {
  background: #0D47C7;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 71, 199, 0.3);
}

.payment-btn i {
  margin-right: 10px;
}

/* Bank Info */
.bank-info {
  background: #F5F7FB;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid #0D47C7;
}

.bank-info h4 {
  color: #082B8A;
  margin-bottom: 15px;
  font-size: 18px;
  font-family: 'Poppins', sans-serif;
}

.bank-info p {
  margin: 10px 0;
  color: #1E1E1E;
  font-size: 14px;
}

.bank-info strong {
  color: #082B8A;
  font-weight: 600;
}

.info-text {
  color: #666;
  font-size: 14px;
  margin: 15px 0;
  font-style: italic;
}

/* Messages */
.success-message,
.error-message {
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}

.success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.success-message i,
.error-message i {
  font-size: 48px;
  margin-bottom: 10px;
  display: block;
}

.success-message p,
.error-message p {
  margin: 8px 0;
  font-size: 15px;
}

/* Step visibility */
#donorInfoStep,
#paymentMethodStep,
#bankTransferStep {
  transition: opacity 0.3s ease;
}

/* File input styling */
.modal-content form input[type="file"] {
  padding: 10px;
  border: 2px dashed #ddd;
  background: #f9f9f9;
  cursor: pointer;
}

.modal-content form input[type="file"]:hover {
  border-color: #0D47C7;
  background: #f5f7fb;
}
/* Bank Details Container */
.bank-details-container,
.mpesa-details-container {
  margin: 20px 0;
}

.bank-info-card,
.mpesa-info-card {
  background: #F5F7FB;
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #D9E1EC;
  margin-bottom: 20px;
}

.bank-info-card h4,
.mpesa-info-card h4 {
  color: #082B8A;
  margin-bottom: 20px;
  font-size: 20px;
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bank-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #D9E1EC;
}

.bank-detail-row:last-of-type {
  border-bottom: none;
}

.detail-label {
  color: #666;
  font-size: 14px;
  font-weight: 500;
}

.detail-value {
  color: #082B8A;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

.detail-value.highlight {
  color: #0D47C7;
  font-size: 18px;
  background: white;
  padding: 5px 15px;
  border-radius: 6px;
}

.bank-note {
  background: #FFF9E6;
  border-left: 4px solid #F5B400;
  padding: 15px;
  margin-top: 20px;
  border-radius: 6px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.bank-note i {
  color: #F5B400;
  font-size: 20px;
  margin-top: 2px;
}

.bank-note p {
  margin: 0;
  color: #1E1E1E;
  font-size: 14px;
  line-height: 1.6;
}

.bank-note strong {
  color: #082B8A;
}

/* M-Pesa Steps */
.mpesa-steps {
  margin: 20px 0;
}

.mpesa-step {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  margin: 10px 0;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #0D47C7;
}

.step-number {
  background: linear-gradient(135deg, #0D47C7 0%, #082B8A 100%);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.step-text {
  color: #1E1E1E;
  font-size: 14px;
  line-height: 1.5;
}

.step-text strong {
  color: #0D47C7;
  font-weight: 700;
}

.mpesa-detail-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 2px solid #0D47C7;
}

/* File Upload Label */
.file-upload-label {
  display: block;
  color: #666;
  font-size: 13px;
  margin-top: -5px;
  margin-bottom: 10px;
  font-style: italic;
}

.file-upload-label i {
  margin-right: 5px;
  color: #0D47C7;
}

/* Step visibility - Updated */
#donorInfoStep,
#paymentMethodStep,
#bankTransferStep,
#mpesaStep {
  transition: opacity 0.3s ease;
}


/* Responsive */
@media (max-width: 768px) {
  .modal-content {
    padding: 20px;
    margin: 10px;
  }
  
  .modal-content h2 {
    font-size: 24px;
  }
  
  .modal-content h3 {
    font-size: 18px;
  }
  
  .payment-btn {
    font-size: 16px;
    padding: 15px;
  }
  
  .close-modal {
    font-size: 24px;
    top: 10px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .modal {
    padding: 10px;
  }
  
  .modal-content {
    padding: 15px;
  }
  
  .modal-content form input,
  .modal-content form select,
  .modal-content form textarea {
    font-size: 14px;
    padding: 10px;
  }
  
  .modal-content form button {
    font-size: 14px;
    padding: 12px;
  }
}