/* --- POLKIWALA PAGE & COMPONENT SPECIFIC STYLES --- */

/* Page View Layout Wrapper */
.page-view {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Header & Navigation */
.header-glass {
  position: fixed;
  top: 15px;
  left: 5%;
  right: 5%;
  width: 90%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  z-index: 1000;
  border-radius: 35px;
}

.logo-display {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--text-light);
}

.logo-gold {
  color: var(--accent-gold);
}

.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  list-style: none;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold);
}

/* Auth Cards styling */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 100px 20px;
  position: relative;
  z-index: 10;
}

.auth-card {
  width: 100%;
  max-width: 450px;
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-title {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-toggle {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-toggle-link {
  color: var(--accent-gold);
  font-weight: 600;
  cursor: pointer;
}

.auth-toggle-link:hover {
  color: var(--accent-rose-gold);
}

/* Footer Section */
.footer-glass {
  margin-top: auto;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  padding: 40px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.2em;
}

.footer-links {
  display: flex;
  gap: 20px;
}

/* Standard Toast Alerts */
.toast-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
  animation: slideInToast 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-success {
  background: rgba(25, 135, 84, 0.9);
  border: 1px solid #198754;
  color: #fff;
}

.toast-error {
  background: rgba(220, 53, 69, 0.9);
  border: 1px solid #dc3545;
  color: #fff;
}

@keyframes slideInToast {
  0% { transform: translateX(120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* --- POLKIWALA RESPONSIVE OVERRIDES --- */

/* Breakpoint 1024px: Navbar and Sidebar grids collapse */
@media (max-width: 1024px) {
  #main-content {
    padding-top: 140px !important;
  }

  .header-glass {
    left: 3%;
    right: 3%;
    width: 94%;
    padding: 0 20px;
  }

  .nav-toggle-btn {
    display: block !important;
  }

  .nav-links {
    position: fixed;
    top: 85px;
    left: 3%;
    right: 3%;
    width: 94%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    flex-direction: column;
    padding: 30px 20px;
    gap: 15px;
    box-shadow: 0 15px 35px rgba(26, 40, 53, 0.12);
    transform: translateY(-15px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 10px 0;
    width: 100%;
    text-align: center;
  }
}

/* Breakpoint 992px: Hero structures, Brands columns, Dashboard columns */
@media (max-width: 992px) {
  .hero-section {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    text-align: center !important;
    padding-top: 20px !important;
  }
  
  .hero-section > div {
    text-align: center !important;
    margin: 0 auto;
  }
  
  .hero-section p {
    margin: 0 auto 30px auto !important;
  }
  
  .hero-section div[style*="display: flex; gap: 16px;"] {
    justify-content: center !important;
  }

  #brand-grid {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
  
  /* Split layout on dashboard and contact pages */
  div[style*="grid-template-columns: 1fr 2fr;"],
  div[style*="grid-template-columns: 1.1fr 2fr;"],
  div[style*="grid-template-columns: 1fr 1fr;"] {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* Footer multi-column layout collapsing */
  footer div[style*="grid-template-columns"] {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 30px !important;
  }
}

/* Breakpoint 768px: Player split layouts, Lightboxes, Modals, Typography scales */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2rem !important;
  }
  .hero-section h1 {
    font-size: 2.5rem !important;
  }
  h2 {
    font-size: 1.8rem !important;
  }
  
  /* Courses dynamic split player screen */
  div[style*="grid-template-columns: 280px 1fr;"] {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }

  /* Gallery modal split display layout collapsing */
  #modal-body-inject {
    grid-template-columns: 1fr !important;
    gap: 25px !important;
  }
  
  #modal-content-wrapper {
    padding: 25px !important;
    width: 95% !important;
  }

  /* Admin panel forms layout grids */
  div[style*="grid-template-columns: 2fr 1fr;"],
  div[style*="grid-template-columns: 1fr 1.5fr;"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  /* Stat count flex rows wrapping */
  section[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }

  /* Footer 2x2 grid layout - optimized */
  footer div.footer-columns-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 35px 20px !important;
  }
  footer div.footer-columns-grid > div:nth-child(1) {
    grid-column: span 2 !important;
  }
  footer div.footer-columns-grid > div:nth-child(2) {
    grid-column: span 2 !important;
  }
  
  .glass-panel {
    padding: 25px !important;
  }
  
  .glass-card {
    padding: 20px !important;
  }
}

/* Breakpoint 576px: Minor containers pads, small SVG heights, full width columns */
@media (max-width: 576px) {
  .hero-section h1 {
    font-size: 2.1rem !important;
  }
  
  section[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  /* Force 2x2 grid for stats count on phone */
  section.home-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
  }
  section.home-stats-grid h2 {
    font-size: 2.2rem !important;
  }

  /* Force 2x2 grid for footer columns on phone - optimized */
  footer div.footer-columns-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 30px 15px !important;
  }
  footer div.footer-columns-grid > div:nth-child(1) {
    grid-column: span 2 !important;
  }
  footer div.footer-columns-grid > div:nth-child(2) {
    grid-column: span 2 !important;
  }

  /* Tighten spacing */
  .container {
    padding: 0 16px !important;
  }
  
  body, html {
    font-size: 15px !important;
  }

  /* Constrain vector graphic outlines inside small screens */
  svg {
    max-width: 100% !important;
    height: auto !important;
  }
  
  footer div[style*="justify-content: space-between"] {
    flex-direction: column !important;
    text-align: center !important;
    gap: 10px !important;
  }
}
