/* ==================== RESPONSIVE.CSS ==================== */
/* ALL media queries for responsive design across all pages and components */

/* Responsive - Home Page Madayn Style */
@media (max-width: 1200px) {
  .features-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .slide-content h1 {
    font-size: 3.5rem;
  }
  
  .slide-content h1 .highlight {
    font-size: 2.5rem;
  }

  .slide-subtitle {
    font-size: 1.1rem;
    margin: 20px auto 25px;
  }

  .slide-buttons {
    gap: 15px;
  }

  .slide-btn {
    padding: 14px 24px;
    font-size: 0.95rem;
  }

  .features-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .explore-content {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .explore-image {
    order: -1;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .footer-links h4 {
    justify-content: center;
  }
  
  .footer-links h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-links a {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero-slider {
    height: 80vh;
    min-height: 500px;
  }
  
  .slide-content h1 {
    font-size: 2.5rem;
  }
  
  .slide-content h1 .highlight {
    font-size: 1.8rem;
  }

  .slide-badge {
    padding: 8px 16px;
    font-size: 0.75rem;
    margin-bottom: 15px;
  }

  .slide-subtitle {
    font-size: 1rem;
    margin: 15px auto 20px;
    padding: 0 10px;
  }

  .slide-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .slide-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  
  .stats-banner-inner {
    flex-wrap: wrap;
  }
  
  .stat-banner-item {
    flex: 1 1 50%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
  }
  
  .stat-banner-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .stat-banner-item:nth-child(3),
  .stat-banner-item:nth-child(4) {
    border-bottom: none;
  }
  
  .world-class-section,
  .explore-section {
    padding: 60px 24px;
  }

  .wc-floating-orb {
    display: none;
  }

  .explore-bg-shapes,
  .floating-cards,
  .ql-gradient-orb {
    display: none;
  }

  .section-tag {
    font-size: 0.75rem;
    padding: 8px 18px;
    letter-spacing: 2px;
  }

  .section-tag-light {
    font-size: 0.75rem;
    padding: 8px 18px;
  }
  
  .section-header-modern h2 {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1.1rem;
  }

  .header-decoration {
    gap: 15px;
  }

  .deco-line {
    width: 50px;
  }
  
  .features-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card-modern {
    padding: 35px 25px 30px;
  }

  .feature-card-number {
    font-size: 2.5rem;
  }

  .feature-card-icon {
    width: 80px;
    height: 80px;
  }

  .feature-card-icon i {
    font-size: 2rem;
  }
  
  .explore-features {
    grid-template-columns: 1fr;
  }

  .explore-title {
    font-size: 2rem;
  }

  .explore-title .title-line {
    font-size: 1.3rem;
  }

  .image-frame img {
    height: 350px;
  }

  .frame-corner {
    width: 40px;
    height: 40px;
  }

  .explore-buttons {
    flex-direction: column;
  }

  .btn-explore {
    width: 100%;
    justify-content: center;
  }

  .ql-icon-wrapper {
    width: 70px;
    height: 70px;
  }

  .ql-icon-wrapper i {
    font-size: 2rem;
  }

  .footer-tech-badges {
    justify-content: center;
  }
  
  .slider-nav {
    bottom: 100px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

/* ==================== COMPREHENSIVE RESPONSIVE STYLES ==================== */

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Large Screens (1200px - 1399px) */
@media (max-width: 1399px) {
  .logo-text h1 {
    font-size: 1.3rem;
  }
  
  .nav-tab {
    padding: 10px 18px;
    font-size: 0.85rem;
  }
}

/* Medium-Large Screens (992px - 1199px) */
@media (max-width: 1199px) {
  .header {
    padding: 0 20px;
  }
  
  .logo-img {
    height: 45px;
  }
  
  .logo-text {
    padding-left: 15px;
  }
  
  .logo-text h1 {
    font-size: 1.2rem;
  }
  
  .logo-text span {
    font-size: 0.7rem;
    letter-spacing: 1.5px;
  }
  
  .nav-tab {
    padding: 8px 14px;
    font-size: 0.8rem;
    gap: 6px;
  }
  
  .nav-tab i {
    font-size: 0.9rem;
  }
  
  /* Map panels */
  .layer-panel, .layer-panel-3d {
    width: 260px;
  }
  
  .search-panel {
    width: 320px;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

/* Tablet Screens (768px - 991px) */
@media (max-width: 991px) {
  /* Header */
  .header {
    height: auto;
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .logo {
    flex: 1;
  }
  
  .nav-tabs {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .nav-tab {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  /* Map Toolbar */
  .map-toolbar {
    top: 10px;
    left: 10px;
    flex-wrap: wrap;
    max-width: 200px;
  }
  
  .map-toolbar button {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
  
  /* Map Info Panel */
  .map-info-panel {
    top: 10px;
    right: 10px;
    padding: 10px 15px;
    gap: 12px;
  }
  
  .map-info-item span {
    font-size: 0.65rem;
  }
  
  .map-info-item strong {
    font-size: 0.8rem;
  }
  
  /* Layer Panel */
  .layer-panel, .layer-panel-3d {
    width: 250px;
    top: 70px;
    right: 10px;
  }
  
  /* Search Panel */
  .search-panel {
    width: 280px;
    left: 10px;
    top: 70px;
  }
  
  /* Mini Map */
  .mini-map {
    width: 150px;
    height: 120px;
    bottom: 10px;
    left: 10px;
  }
  
  /* Legend */
  .map-legend {
    bottom: 10px;
    right: 10px;
    max-width: 180px;
    padding: 12px;
  }
  
  .legend-header h4 {
    font-size: 0.85rem;
  }
  
  .legend-item {
    font-size: 0.75rem;
    padding: 6px 0;
  }
  
  /* View Controls Panel */
  .view-controls-panel {
    width: 250px;
    top: 70px;
    left: 10px;
  }
  
  /* Feature Panel */
  .feature-panel {
    width: 280px;
    max-height: 60vh;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-links h4 {
    justify-content: center;
  }
  
  .footer-links h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-section ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
  }
  
  .footer-section ul li {
    margin: 0;
  }
}

/* Mobile Landscape & Small Tablets (576px - 767px) */
@media (max-width: 767px) {
  /* Mobile Menu Toggle */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Navigation - Mobile Dropdown */
  .nav-tabs {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--navy), var(--navy-dark));
    flex-direction: column;
    padding: 20px 15px;
    gap: 8px;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-top: 2px solid rgba(0, 180, 216, 0.3);
    z-index: 999;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    animation: slideDown 0.3s ease-out;
    justify-content: flex-start;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .nav-tabs.active {
    display: flex;
  }
  
  .nav-tab {
    width: 100%;
    padding: 14px 18px;
    justify-content: flex-start;
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(0, 180, 216, 0.05);
    border: 1px solid rgba(0, 180, 216, 0.1);
  }
  
  .nav-tab:hover {
    background: rgba(0, 180, 216, 0.15);
    transform: translateX(5px);
  }
  
  .nav-tab.active {
    background: rgba(0, 180, 216, 0.25);
    border-color: rgba(0, 180, 216, 0.4);
  }
  
  .nav-tab span {
    display: inline !important;
  }
  
  .nav-tab::before {
    display: none;
  }
  
  .nav-tab i {
    font-size: 1.1rem;
    width: 24px;
  }
  
  /* Header */
  .header {
    padding: 12px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  .logo-img {
    height: 40px;
  }
  
  .logo-text {
    padding-left: 12px;
  }
  
  .logo-text h1 {
    font-size: 1rem;
  }
  
  .logo-text span {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }
  
  /* Main Content */
  .main-content {
    padding-top: 0;
  }
  
  /* Map Container */
  .map-container {
    height: calc(100vh - 120px);
  }
  
  /* Map Toolbar - Compact */
  .map-toolbar {
    top: 8px;
    left: 8px;
    padding: 6px;
    gap: 4px;
    max-width: 180px;
  }
  
  .map-toolbar button {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }
  
  .map-toolbar .divider {
    height: 20px;
  }
  
  /* Hide Map Info Panel on Mobile */
  .map-info-panel {
    display: none;
  }
  
  /* Layer Panel - Full Width on Mobile */
  .layer-panel, .layer-panel-3d {
    width: calc(100% - 20px);
    max-width: 300px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    top: 60px;
  }
  
  /* Search Panel - Full Width */
  .search-panel {
    width: calc(100% - 20px);
    max-width: 300px;
    left: 50%;
    transform: translateX(-50%);
    top: 60px;
  }
  
  /* Hide Mini Map on Small Screens */
  .mini-map {
    display: none;
  }
  
  /* Legend - Compact */
  .map-legend {
    bottom: 8px;
    right: 8px;
    max-width: 160px;
    padding: 10px;
    font-size: 0.7rem;
  }
  
  .legend-header {
    margin-bottom: 8px;
  }
  
  .legend-header h4 {
    font-size: 0.8rem;
  }
  
  .legend-item {
    padding: 4px 0;
    font-size: 0.7rem;
  }
  
  .legend-symbol, .legend-line, .legend-area {
    width: 14px;
    height: 14px;
  }
  
  /* View Controls - Full Width */
  .view-controls-panel {
    width: calc(100% - 20px);
    max-width: 280px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* Feature Panel - Full Width */
  .feature-panel {
    width: calc(100% - 20px);
    max-width: 300px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-height: 50vh;
  }
  
  /* Dashboard */
  .dashboard {
    padding: 15px;
  }
  
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .dashboard-header h2 {
    font-size: 1.3rem;
  }
  
  .dashboard-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .dashboard-header-actions button {
    flex: 1;
    min-width: 100px;
  }
  
  /* Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .stat-card {
    padding: 15px;
  }
  
  .stat-card .stat-value {
    font-size: 1.8rem;
  }
  
  /* Charts */
  .chart-card {
    padding: 15px;
  }
  
  .chart-card h3 {
    font-size: 0.95rem;
  }
  
  /* Footer */
  .footer {
    padding: 30px 15px 20px;
  }
  
  .footer-content {
    gap: 25px;
  }
  
  .footer-links h4 {
    justify-content: center;
  }
  
  .footer-links h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-section h4 {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  
  .footer-section p {
    font-size: 0.85rem;
  }
  
  .footer-bottom p {
    font-size: 0.75rem;
  }
}

/* Mobile Portrait (under 576px) */
@media (max-width: 575px) {
  /* Header - Compact */
  .header {
    padding: 10px 12px;
    height: 70px;
  }
  
  .logo {
    gap: 10px;
  }
  
  .logo-img {
    height: 35px;
  }
  
  .logo-text {
    padding-left: 10px;
  }
  
  .logo-text h1 {
    font-size: 0.9rem;
  }
  
  .logo-text span {
    font-size: 0.55rem;
    letter-spacing: 0.5px;
  }
  
  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  /* Navigation */
  .nav-tabs {
    top: 70px;
    padding: 15px 12px;
  }
  
  .nav-tab {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  /* Main Content */
  .main-content {
    padding-top: 0;
  }
  
  /* Map Container */
  .map-container, .map-section {
    height: calc(100vh - 70px);
  }
  
  /* Map Toolbar - Vertical & Compact */
  .map-toolbar {
    flex-direction: column;
    top: 10px;
    left: 10px;
    padding: 6px;
    gap: 6px;
  }
  
  .map-toolbar button {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    padding: 0;
  }
  
  .map-toolbar .divider {
    width: 100%;
    height: 1px;
    margin: 2px 0;
  }
  
  /* Panels - Full Width Mobile */
  .layer-panel, .layer-panel-3d,
  .search-panel,
  .view-controls-panel,
  .feature-panel {
    width: calc(100% - 16px);
    max-width: 100%;
    left: 8px;
    right: 8px;
    transform: none;
    top: 80px;
  }
  
  /* Legend - Minimal */
  .map-legend {
    bottom: 10px;
    right: 10px;
    max-width: 130px;
    padding: 8px;
  }
  
  .legend-header h4 {
    font-size: 0.7rem;
  }
  
  .legend-header button {
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
  }
  
  .legend-item {
    font-size: 0.65rem;
    padding: 3px 0;
  }
  
  .legend-symbol, .legend-line, .legend-area {
    width: 12px;
    height: 12px;
  }
  
  /* Dashboard */
  .dashboard {
    padding: 12px;
  }
  
  .dashboard-header {
    margin-bottom: 15px;
  }
  
  .dashboard-header h2 {
    font-size: 1.1rem;
  }
  
  .dashboard-header-actions {
    gap: 8px;
  }
  
  .dashboard-header-actions button {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
  
  /* Stats Grid */
  .stats-grid {
    gap: 10px;
  }
  
  .stat-card {
    padding: 12px;
  }
  
  .stat-card .stat-icon {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
  }
  
  .stat-card .stat-value {
    font-size: 1.4rem;
    margin: 8px 0 4px;
  }
  
  .stat-card .stat-label {
    font-size: 0.7rem;
  }
  
  .stat-card .stat-change {
    font-size: 0.7rem;
  }
  
  /* Charts */
  .chart-card {
    padding: 12px;
  }
  
  .chart-card h3 {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }
  
  .chart-card canvas {
    max-height: 220px !important;
  }
  
  /* FAQ */
  .faq-container {
    padding: 15px;
  }
  
  .faq-item {
    margin-bottom: 10px;
  }
  
  .faq-question {
    padding: 12px 15px;
    font-size: 0.9rem;
  }
  
  .faq-answer {
    padding: 12px 15px;
    font-size: 0.85rem;
  }
  
  /* Footer */
  .footer {
    padding: 20px 12px 15px;
    font-size: 0.75rem;
  }
  
  .footer-links h4 {
    justify-content: center;
  }
  
  .footer-links h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-section h4 {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }
  
  .footer-section p,
  .footer-section li {
    font-size: 0.8rem;
  }
  
  .footer-bottom {
    padding-top: 15px;
    font-size: 0.7rem;
  }
}

/* Extra Small Devices (under 400px) */
@media (max-width: 399px) {
  /* Header - Ultra Compact */
  .header {
    padding: 8px 10px;
    height: 65px;
  }
  
  .logo-img {
    height: 32px;
  }
  
  .logo-text h1 {
    font-size: 0.85rem;
  }
  
  .logo-text span {
    font-size: 0.5rem;
    letter-spacing: 0.3px;
  }
  
  .mobile-menu-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  /* Navigation */
  .nav-tabs {
    top: 65px;
    padding: 12px 10px;
    gap: 6px;
  }
  
  .nav-tab {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  /* Map Container */
  .map-container, .map-section {
    height: calc(100vh - 65px);
  }
  
  /* Map Toolbar - Compact */
  .map-toolbar {
    top: 8px;
    left: 8px;
    max-width: 36px;
    padding: 4px;
    gap: 4px;
  }
  
  .map-toolbar button {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }
  
  /* Panels - Full Screen Mobile */
  .layer-panel, .layer-panel-3d,
  .search-panel,
  .view-controls-panel,
  .feature-panel {
    width: calc(100% - 12px);
    left: 6px;
    right: 6px;
    top: 70px;
  }
  
  /* Legend - Minimal */
  .map-legend {
    bottom: 8px;
    right: 8px;
    max-width: 120px;
    padding: 6px;
  }
  
  .legend-header h4 {
    font-size: 0.65rem;
  }
  
  .legend-item {
    font-size: 0.6rem;
    padding: 2px 0;
  }
  
  /* Dashboard */
  .dashboard {
    padding: 10px;
  }
  
  .dashboard-header h2 {
    font-size: 1rem;
  }
  
  .dashboard-header-actions button {
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  
  .stat-card .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  
  .stat-card .stat-value {
    font-size: 1.3rem;
  }
  
  .stat-card .stat-label {
    font-size: 0.65rem;
  }
  
  .chart-card h3 {
    font-size: 0.8rem;
  }
  
  /* FAQ */
  .faq-question {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .faq-answer {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .nav-tab,
  .map-toolbar button,
  .panel-toggle,
  button,
  a {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Remove hover effects on touch */
  .nav-tab:hover,
  .map-toolbar button:hover,
  button:hover {
    transform: none;
  }
  
  /* Add touch feedback */
  .nav-tab:active,
  .map-toolbar button:active,
  button:active {
    transform: scale(0.95);
    opacity: 0.8;
  }
  
  /* Improve scrolling */
  .nav-tabs,
  .panel-content,
  .activity-list,
  .alerts-list {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}

/* Landscape Mobile Specific */
@media (max-width: 767px) and (orientation: landscape) {
  .header {
    height: 60px;
  }
  
  .logo-img {
    height: 35px;
  }
  
  .map-container, .map-section {
    height: calc(100vh - 60px);
  }
  
  .nav-tabs {
    top: 60px;
    max-height: calc(100vh - 60px);
  }
  
  /* Make panels smaller in landscape */
  .layer-panel, .layer-panel-3d,
  .search-panel,
  .feature-panel {
    max-height: calc(100vh - 120px);
  }
}

/* Print Styles */
@media print {
  .header,
  .mobile-menu-toggle,
  .map-toolbar,
  .panel-toggle,
  .footer {
    display: none !important;
  }
  
  .map-container,
  .dashboard,
  .faq-container {
    height: auto !important;
    overflow: visible !important;
  }
  
  .main-content {
    padding: 0 !important;
  }
}
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }
  
  .map-legend {
    max-width: 120px;
    padding: 6px;
    font-size: 0.6rem;
  }
  
  /* Dashboard */
  .stat-card .stat-value {
    font-size: 1.3rem;
  }
  
  .chart-container {
    height: 180px !important;
  }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) {
  .header {
    height: auto;
    padding: 8px 15px;
  }
  
  .logo-img {
    height: 35px;
  }
  
  .map-container {
    height: calc(100vh - 60px);
  }
  
  .hero-slider {
    height: 100vh;
    min-height: auto;
  }
  
  .slide-content h1 {
    font-size: 2rem;
  }
  
  .footer {
    padding: 20px 15px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .map-toolbar button {
    min-width: 44px;
    min-height: 44px;
  }
  
  .nav-tab {
    min-height: 44px;
  }
  
  .legend-header button {
    min-width: 36px;
    min-height: 36px;
  }
  
  .layer-checkbox {
    min-height: 44px;
  }
  
  .faq-question {
    min-height: 50px;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .map-toolbar,
  .map-legend,
  .mini-map,
  .layer-panel,
  .search-panel,
  .view-controls-panel {
    display: none !important;
  }
  
  .map-container {
    height: 100vh !important;
  }
  
  .dashboard {
    background: white;
  }
  
  .chart-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
  }
  
  .nav-tab {
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
  
  .map-toolbar button {
    border: 1px solid var(--gray-300);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
