/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 992px) {
  :root {
    --spacing-xxl: 3rem;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .welcome-container,
  .features-grid,
  .news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 2rem;
    --spacing-xxl: 2.5rem;
  }

  .navbar .container {
    padding: var(--spacing-sm);
  }

  .mobile-toggle {
    display: flex;
    z-index: 1001;
  }

  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }

  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }

  .nav-menu-wrapper {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 0 var(--spacing-md);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    margin-left: 0;
  }

  .nav-menu-wrapper.active {
    max-height: 500px;
    padding: var(--spacing-md);
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu a {
    padding: var(--spacing-sm);
    display: block;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-sm);
  }

  .nav-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .nav-actions .nav-search-icon {
    display: none; /* Hide search icon on mobile or make it a full search bar */
  }

    .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    border-radius: 0;
    margin-top: 0;
    padding: 0;
    border: none;
  }
  
  .dropdown-menu::before {
    display: none;
  }

  .dropdown.active .dropdown-menu {
    max-height: 400px;
  }
  
  .dropdown-menu li {
    margin-bottom: 5px;
  }
  
    .dropdown-menu li a {
    padding: 12px 20px 12px 40px;
    background: rgba(45, 95, 63, 0.03);
    border-radius: 10px;
    border-left: 3px solid transparent;
    color: var(--dark-gray) !important;
    font-size: 15px !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-align: left;
    -webkit-transform: translateZ(0);
  }
  
  .dropdown-menu li a:hover, .dropdown-menu li a.active {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    padding-left: 45px;
  }

  .btn-daftar,
  .btn-login {
    width: 100%;
    text-align: center;
    margin-top: var(--spacing-xs);
  }

  .hero {
    min-height: 90vh;
    padding: 120px 0 var(--spacing-xl);
  }

  .hero-overlay {
    background: rgba(0, 0, 0, 0.5); /* Solid semi-transparent dark background for mobile legibility */
  }

  .hero-text-wrapper {
    text-align: center;
  }

  .hero-title {
    font-size: 1.75rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  }

  .hero-subtitle {
    font-size: 0.9rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  }

  .hero-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .section {
    padding: var(--spacing-xl) 0;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-header.center {
    align-items: center;
  }

  .welcome-container {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
    padding: 15px;
    border-radius: var(--radius-lg);
  }

  .search-divider {
    width: 100%;
    height: 1px;
    margin: 10px 0;
  }

  .search-actions {
    width: 100%;
    justify-content: space-between;
    padding-left: 0;
    margin-top: 10px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .stat-card {
    padding: var(--spacing-md);
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .agenda-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .agenda-date {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
  }

  .agenda-date-day,
  .agenda-date-month {
    display: inline;
  }

  .agenda-meta {
    flex-direction: column;
    gap: var(--spacing-xs);
  }

  .cta-card {
    padding: var(--spacing-xl);
  }

  .cta-content h2 {
    font-size: 1.8rem;
  }

  .cta-content p {
    font-size: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-md);
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .logo-circle {
    width: 40px;
    height: 40px;
  }

  .logo-text {
    font-size: 0.75rem;
  }

  .brand-text h3 {
    font-size: 0.95rem;
  }

  .brand-text p {
    font-size: 0.7rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 2rem;
  }

  .profile-icon {
    width: 60px;
    height: 60px;
  }

  .profile-card h3 {
    font-size: 1.2rem;
  }

  .btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.9rem;
  }

  .btn-large {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .mobile-toggle,
  .hero-buttons,
  .scroll-indicator,
  .btn,
  .footer-social,
  .section-cta {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
  }

  .hero {
    min-height: auto;
    padding: 2rem 0;
    background: none;
  }

  .hero-content {
    color: #000;
  }

  .section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }

  .card,
  .news-card,
  .agenda-card,
  .profile-card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}

/* ==========================================================================
   MOBILE BOTTOM APP BAR (Added from Redesign)
   ========================================================================== */
@media (max-width: 768px) {
  /* Hide old mobile nav elements */
  .mobile-toggle,
  .nav-menu-wrapper {
    display: none !important;
  }
  
  /* Ensure navbar is just for the logo */
  .navbar {
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    padding-bottom: 5px;
  }
  
  .navbar .nav-brand {
    margin: 0 auto;
  }

  /* Bottom App Bar Container */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 15px;
    left: 15px;
    right: 15px;
    background: var(--white);
    border-radius: 40px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
  }

  /* Bottom Nav Items */
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    position: relative;
  }

  .bottom-nav-item svg {
    margin-bottom: 4px;
    color: var(--gray);
    transition: all 0.3s ease;
  }

  .bottom-nav-item.active,
  .bottom-nav-item:hover {
    color: var(--primary);
  }

  .bottom-nav-item.active svg,
  .bottom-nav-item:hover svg {
    color: var(--primary);
  }

  /* Center FAB Button (Daftar) */
  .bottom-nav-center {
    position: relative;
    top: -25px;
    background: var(--primary);
    color: var(--white) !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(45, 95, 63, 0.3);
    border: 4px solid var(--off-white);
  }

  .bottom-nav-center svg {
    color: var(--white) !important;
    margin-bottom: 2px;
  }
  
  .bottom-nav-center span {
    font-size: 0.65rem;
  }

  .bottom-nav-center:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
  }

  /* Submenu Popup for Profil */
  .bottom-dropdown-menu {
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 10px;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
  }

  .bottom-dropdown-menu::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: var(--white) transparent transparent transparent;
  }

  .bottom-dropdown.active .bottom-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  .bottom-dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--dark-gray);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    margin-bottom: 2px;
  }

  .bottom-dropdown-menu a:hover {
    background: rgba(45, 95, 63, 0.05);
    color: var(--primary);
  }
}

/* Mobile Top Bar Redesign */
@media (max-width: 768px) {
  /* Hide desktop brand text */
  .nav-brand {
    display: none !important;
  }

  /* Make navbar a floating pill on mobile */
  .navbar {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    padding: 8px 15px !important;
    top: 12px !important;
    left: 15px !important;
    right: 15px !important;
    width: calc(100% - 30px) !important;
    max-width: calc(100% - 30px) !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    transform: none !important;
  }
  
  .navbar .container {
    padding: 0 15px !important;
  }

  .mobile-top-bar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
  }

  

  .mobile-search-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
  }

  .mobile-search-input {
    width: 100%;
    padding: 8px 15px 8px 35px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.03);
    font-size: 0.85rem;
    color: var(--dark-gray);
    outline: none;
  }

  .mobile-search-input:focus {
    border-color: var(--primary);
    background: var(--white);
  }

  .mobile-search-icon {
    position: absolute;
    left: 10px;
    color: var(--gray);
  }

  .mobile-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .icon-btn {
    background: none;
    border: none;
    padding: 5px;
    color: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .icon-btn:hover {
    color: var(--primary);
  }

  .mobile-hamburger {
    margin-left: -5px;
  }
}
