/* Comprehensive Mobile Responsive Stylesheet for AssamInfo.com */

/* Import the main responsive stylesheet */
@import url('new-responsive-stylesheet.css');

/* Additional Mobile-First Responsive Styles */

/* Base Mobile Styles */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile-First Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem 0;
  line-height: 1.2;
  word-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: 1.75rem;
  text-align: center;
  margin: 1rem 0;
  color: #0055a5;
}

h2 {
  font-size: 1.5rem;
  color: #0055a5;
  margin: 1.5rem 0 1rem 0;
}

h3 {
  font-size: 1.25rem;
  color: #0055a5;
  margin: 1.25rem 0 0.75rem 0;
}

p {
  margin: 0 0 1rem 0;
  text-align: justify;
  line-height: 1.7;
  word-wrap: break-word;
}

/* Mobile-First Layout */
.layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem;
  max-width: 100%;
  margin: 0 auto;
  min-height: calc(100vh - 200px);
}

/* Mobile-First Sidebar */
.sidebar {
  width: 100%;
  order: 2;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 1rem;
  margin-bottom: 1rem;
  overflow: visible;
  min-height: auto;
}

.sidebar.left {
  order: 2;
}

.sidebar.right {
  order: 3;
}

.sidebar-content {
  height: auto;
  overflow: visible;
  min-height: 0;
}

/* Ensure sidebar links are fully visible */
.sidebar .block-container {
  margin-bottom: 0;
  overflow: visible;
  width: 100%;
}

.sidebar .block1 {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  overflow: visible;
  width: 100%;
}

.sidebar .block1:last-child {
  margin-bottom: 0;
}

.sidebar .block1 strong {
  color: #0055a5;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: block;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e9ecef;
}

.sidebar .block1 ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
  background: none;
  margin-bottom: 0;
  overflow: visible;
  width: 100%;
}

.sidebar .block1 li {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.4;
  word-wrap: break-word;
  overflow: visible;
  width: 100%;
}

.sidebar .block1 li:last-child {
  margin-bottom: 0;
}

.sidebar .block1 a {
  color: #007BFF;
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
  max-width: 100%;
  width: 100%;
  word-wrap: break-word;
  overflow: visible;
  white-space: normal;
  line-height: 1.3;
}

.sidebar .block1 a:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Mobile-First Main Content */
.main-content, main {
  width: 100%;
  order: 1;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Mobile-First Navigation */
.navbar {
  background: linear-gradient(135deg, #007BFF, #0056b3);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
}

.navbar.collapsed {
  display: none;
}

.navbar.expanded {
  display: flex;
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.navbar a:last-child {
  border-bottom: none;
}

.navbar a:hover {
  background-color: rgba(255,255,255,0.2);
}

.mobile-nav-toggle {
  display: block;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.75rem;
  width: 100%;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-toggle:hover {
  background-color: rgba(255,255,255,0.1);
}

/* Mobile-First Container */
.container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.container ul {
  width: 100%;
  list-style-type: disc;
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  background: #f8f9fa;
  border-radius: 6px;
  margin: 0;
}

.container li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.image-container {
  width: 100%;
  text-align: center;
  padding: 1rem;
}

.image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Mobile-First Block Container */
.block-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.block, .block1 {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.block1 strong {
  color: #0055a5;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: block;
}

.block1 ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-top: 0.75rem;
  background: none;
}

.block1 li {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

/* Mobile-First Image Gallery */
.image-gallery-section {
  margin: 1.5rem 0;
}

.image-gallery-section h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #0055a5;
  font-size: 1.25rem;
}

.image-row-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.image-item {
  text-align: center;
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.image-item:hover {
  transform: translateY(-3px);
}

.image-item img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.image-caption {
  display: block;
  margin-top: 0.5rem;
  font-weight: 500;
  color: #333;
  font-size: 0.9rem;
}

.gallery-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.gallery-image:hover {
  transform: scale(1.02);
}

/* Mobile-First Article Content */
.article-content {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.article-content h2 {
  color: #0055a5;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.article-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* Mobile-First Info Lists */
.info-list {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.history-list {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.history-list li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* Mobile-First Polytechnic List */
.polytechnic-list p {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #007BFF;
  font-size: 0.9rem;
}

.polytechnic-list a {
  color: #007BFF;
  text-decoration: none;
  font-weight: 500;
}

.polytechnic-list a:hover {
  text-decoration: underline;
}

/* Mobile-First Footer */
.responsive-footer {
  background: linear-gradient(135deg, #007BFF, #0056b3);
  color: white;
  margin-top: 2rem;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  max-width: 100%;
  margin: 0 auto;
}

.footer-section h3 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1rem;
  border-bottom: 2px solid rgba(255,255,255,0.3);
  padding-bottom: 0.5rem;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.85rem;
  text-align: center;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-section p {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
  text-align: center;
}

.contact-link {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: #e0e0e0;
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-bottom {
  background: rgba(0,0,0,0.2);
  text-align: center;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
}

/* Mobile-First Link Styles */
.linkstyle1, .linkstyle2, .linkstyle3, .linkstyle4, .linkstyle5, .linkstyle6, .linkstyle7, .linkstyle8, .linkstyle9 {
  font-family: Verdana, sans-serif;
  text-decoration: none;
  transition: all 0.3s ease;
}

.linkstyle1 {
  font-size: 0.75rem;
  color: #ffffff;
  font-weight: bold;
}

.linkstyle2 {
  font-size: 0.8rem;
  color: #0686A1;
}

.linkstyle3 {
  font-size: 0.875rem;
  color: #003399;
}

.linkstyle4 {
  font-size: 0.9rem;
  color: #003399;
}

.linkstyle5 {
  font-size: 0.75rem;
  color: #ffffff;
}

.linkstyle6 {
  font-size: 0.75rem;
  color: #003399;
}

.linkstyle7 {
  font-size: 0.8rem;
  color: #003399;
}

.linkstyle8 {
  font-size: 0.8rem;
  color: #ffffff;
  font-weight: bold;
}

.linkstyle9 {
  font-size: 0.8rem;
  color: #007EBB;
  font-weight: bold;
}

/* Hover effects for all link styles */
.linkstyle1:hover, .linkstyle2:hover, .linkstyle3:hover, .linkstyle4:hover, .linkstyle5:hover, .linkstyle6:hover, .linkstyle7:hover, .linkstyle8:hover, .linkstyle9:hover {
  text-decoration: underline;
}

/* Tablet Styles */
@media (min-width: 768px) {
  .layout {
    flex-direction: row;
    gap: 1.5rem;
    padding: 1rem;
  }
  
  .sidebar {
    flex: 0 0 250px;
    order: 1;
    margin-bottom: 0;
  }
  
  .main-content, main {
    order: 2;
    padding: 1.5rem;
  }
  
  .navbar {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .navbar a {
    width: auto;
    border-bottom: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
  }
  
  .mobile-nav-toggle {
    display: none;
  }
  
  .container {
    flex-direction: row;
    gap: 1.5rem;
  }
  
  .container ul, .image-container {
    flex: 1 1 300px;
  }
  
  .image-row-wrapper {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
  }
  
  .block-container {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .footer-content {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
  
  .footer-section h3 {
    text-align: left;
  }
  
  .footer-links a {
    text-align: left;
  }
  
  .footer-section p {
    text-align: left;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  .image-gallery-section h2 {
    font-size: 1.5rem;
  }
  
  .article-content {
    padding: 2rem;
  }
  
  .article-content h2 {
    font-size: 1.5rem;
  }
}

/* Desktop Styles */
@media (min-width: 1200px) {
  .layout {
    max-width: 1400px;
    gap: 2rem;
    padding: 1.5rem;
  }
  
  .sidebar {
    flex: 0 0 280px;
  }
  
  .main-content, main {
    padding: 2rem;
  }
  
  .container {
    gap: 2rem;
  }
  
  .image-row-wrapper {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
  }
  
  .block-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }
  
  .footer-content {
    max-width: 1400px;
    gap: 3rem;
    padding: 3rem 2rem;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
}

/* Large Desktop Styles */
@media (min-width: 1600px) {
  .layout {
    max-width: 1600px;
    gap: 3rem;
    padding: 2rem;
  }
  
  .sidebar {
    flex: 0 0 320px;
  }
  
  .main-content, main {
    padding: 3rem;
  }
  
  .container {
    gap: 3rem;
  }
  
  .image-row-wrapper {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
  }
  
  .block-container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
  }
}

/* Print Styles */
@media print {
  .navbar, .sidebar, .mobile-nav-toggle, .responsive-footer {
    display: none;
  }
  
  .layout {
    flex-direction: column;
  }
  
  .main-content, main {
    width: 100%;
    box-shadow: none;
    border: none;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  h1, h2, h3 {
    color: black;
  }
  
  .image-item, .block, .block1 {
    break-inside: avoid;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .navbar {
    background: #000;
    border: 2px solid #fff;
  }
  
  .navbar a {
    border: 1px solid #fff;
  }
  
  .block, .block1 {
    border: 2px solid #000;
  }
  
  .image-item {
    border: 2px solid #000;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  
  .main-content, main, .sidebar, .block, .block1, .article-content {
    background: #2d2d2d;
    color: #e0e0e0;
  }
  
  .navbar {
    background: linear-gradient(135deg, #1a1a1a, #333);
  }
  
  .container ul, .info-list, .history-list {
    background: #3d3d3d;
  }
  
  .image-item {
    background: #2d2d2d;
  }
  
  .responsive-footer {
    background: linear-gradient(135deg, #1a1a1a, #333);
  }
  
  .footer-bottom {
    background: rgba(0,0,0,0.4);
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .navbar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .navbar a {
    width: auto;
    border-bottom: none;
    padding: 0.5rem 0.75rem;
  }
  
  .mobile-nav-toggle {
    display: none;
  }
  
  .layout {
    flex-direction: row;
  }
  
  .sidebar {
    flex: 0 0 200px;
    order: 1;
    margin-bottom: 0;
  }
  
  .main-content, main {
    order: 2;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .image-item:hover {
    transform: none;
  }
  
  .gallery-image:hover {
    transform: none;
  }
  
  .navbar a:hover {
    background-color: transparent;
  }
  
  .linkstyle1:hover, .linkstyle2:hover, .linkstyle3:hover, .linkstyle4:hover, .linkstyle5:hover, .linkstyle6:hover, .linkstyle7:hover, .linkstyle8:hover, .linkstyle9:hover {
    text-decoration: none;
  }
}

/* Focus styles for accessibility */
.navbar a:focus,
.mobile-nav-toggle:focus,
.footer-links a:focus,
.contact-link:focus,
.polytechnic-list a:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Skip to content link for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #000;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 10000;
}

.skip-link:focus {
  top: 6px;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Ensure text is readable on mobile */
p, li, td, th {
  font-size: 1rem;
  line-height: 1.6;
}

/* Mobile-friendly form elements */
input, textarea, select, button {
  font-size: 16px; /* Prevents zoom on iOS */
  max-width: 100%;
}

/* Ensure tables are mobile-friendly */
table {
  width: 100%;
  border-collapse: collapse;
}

td, th {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

/* Mobile-first grid system */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Special styling for Famous Tourist Destinations - 5 images in a row */
.famous-destinations .image-row-wrapper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin: 1rem 0;
}

.famous-destinations .image-item {
  padding: 0.75rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.famous-destinations .image-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.famous-destinations .image-caption {
  font-size: 0.8rem;
  font-weight: 600;
  color: #0055a5;
  text-align: center;
  margin-top: auto;
}

/* Responsive breakpoints for Famous Tourist Destinations */
@media (max-width: 1200px) {
  .famous-destinations .image-row-wrapper {
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
  }
  
  .famous-destinations .image-item img {
    height: 100px;
  }
}

@media (max-width: 992px) {
  .famous-destinations .image-row-wrapper {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
  
  .famous-destinations .image-item img {
    height: 120px;
  }
}

@media (max-width: 768px) {
  .famous-destinations .image-row-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .famous-destinations .image-item img {
    height: 100px;
  }
  
  .famous-destinations .image-caption {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .famous-destinations .image-row-wrapper {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .famous-destinations .image-item img {
    height: 150px;
  }
  
  .famous-destinations .image-item {
    min-height: 180px;
  }
}

/* Performance Optimizations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Optimize images for mobile */
img {
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .sidebar .block1 {
    border: 2px solid #000;
    background: #fff;
  }
  
  .sidebar .block1 a {
    color: #000;
    text-decoration: underline;
  }
  
  .famous-destinations .image-caption,
  .cultural-highlights .image-caption {
    color: #000;
    font-weight: bold;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #1a1a1a;
    color: #e0e0e0;
  }
  
  .sidebar {
    background: #2d2d2d;
    color: #e0e0e0;
  }
  
  .sidebar .block1 {
    background: #3d3d3d;
    border-color: #555;
  }
  
  .sidebar .block1 strong {
    color: #4da6ff;
    border-color: #555;
  }
  
  .sidebar .block1 a {
    color: #4da6ff;
  }
  
  .sidebar .block1 a:hover {
    color: #66b3ff;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .nav-links a,
  .sidebar .block1 a,
  .famous-destinations .image-item a,
  .cultural-highlights .image-item a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-nav-toggle {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Print styles */
@media print {
  .navbar,
  .mobile-nav-toggle,
  .sidebar {
    display: none !important;
  }
  
  .main-content,
  main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .famous-destinations .image-row-wrapper,
  .cultural-highlights .image-row-wrapper {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }
  
  .famous-destinations .image-item img,
  .cultural-highlights .image-item img {
    height: 80px !important;
  }
  
  a {
    text-decoration: underline !important;
    color: #000 !important;
  }
  
  .image-caption {
    color: #000 !important;
    font-weight: bold !important;
  }
}