/* ===== RESPONSIVE CSS - MOBILE FIRST APPROACH ===== */

/* ===== EXTRA SMALL DEVICES (< 576px) ===== */
@media (max-width: 575.98px) {
  /* Container adjustments */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Typography responsive scaling */
  :root {
    --font-size-base: 0.9rem;
    --font-size-sm: 0.8rem;
    --font-size-lg: 1rem;
  }
  
  /* Header & Navigation */
  .navbar {
    padding: 0.5rem 0;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  /* Mobile menu toggle button - Enhanced Bootstrap styles */
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
    background: transparent;
    position: relative;
    z-index: 1001;
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
    outline: none;
  }
  
  /* Mobile navigation collapse - Bootstrap compatible */
  .navbar-collapse {
    background: white;
    border-top: 1px solid var(--neutral-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .navbar-nav {
    text-align: center;
    padding: 1rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-bottom: 1px solid var(--neutral-light);
    display: block;
    color: var(--neutral-dark);
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 0.25rem;
  }
  
  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link:focus {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.1);
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 80vh;
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-description {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }
  
  /* Sections */
  .section {
    padding: 1.5rem 0;
  }
  
  .section-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
  }
  
  .section-subtitle {
    font-size: 0.75rem;
  }
  
  .section-description {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }
  
  /* Grids - Stack on mobile */
  .services-grid,
  .team-grid,
  .reviews-grid,
  .gallery-grid,
  .blog-grid,
  .priceplan-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
  }
  
  /* Service Items */
  .service-item {
    padding: 1.5rem;
  }
  
  .service-image {
    height: 180px;
    margin-bottom: 1rem;
  }
  
  .service-name {
    font-size: 1.1rem;
  }
  
  .service-price {
    font-size: 1.2rem;
    padding: 0.75rem;
  }
  
  /* About Features */
  .about-feature {
    padding: 1.5rem 1rem;
  }
  
  .about-feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  /* Team Members */
  .team-member {
    padding: 1.5rem;
  }
  
  .team-photo {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
  }
  
  /* Reviews */
  .review-card {
    padding: 1.5rem;
  }
  
  /* Contact Form */
  .contact-form {
    padding: 1.5rem;
    margin: 0 1rem;
  }
  
  .form-control {
    padding: 0.6rem;
  }
  
  .btn-submit {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-section {
    margin-bottom: 2rem;
    text-align: center;
  }
  

  
  /* Gallery */
  .gallery-item img {
    height: 200px;
  }
  
  /* Blog */
  .blog-content {
    padding: 1rem;
  }
  
  .blog-title {
    font-size: 1rem;
  }
  
  .blog-excerpt {
    font-size: 0.85rem;
  }
}

/* ===== SMALL DEVICES (576px - 767.98px) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
  /* Typography adjustments */
  :root {
    --font-size-base: 0.92rem;
    --font-size-lg: 1.05rem;
  }
  
  /* Hero Section */
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  /* Grids - Two columns for some items */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Service Items */
  .service-item {
    padding: 1.75rem;
  }
  
  .service-image {
    height: 160px;
  }
  
  /* Contact Form */
  .contact-form {
    margin: 0 2rem;
  }
}

/* ===== MEDIUM DEVICES (768px - 991.98px) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Typography back to normal */
  :root {
    --font-size-base: 0.95rem;
    --font-size-lg: 1.1rem;
  }
  
  /* Hero Section */
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  /* Navigation - Desktop layout */
  .navbar-toggler {
    display: none;
  }
  
  .navbar-collapse {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: none;
  }
  
  .navbar-nav {
    flex-direction: row;
    margin: 0;
    padding: 0;
    text-align: left;
  }
  
  .navbar-nav .nav-link {
    margin: 0 0.3rem;
    padding: 0.5rem 0.75rem;
    border: none;
    display: inline-block;
    border-radius: 0.25rem;
  }
  
  /* Grids - More columns */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .priceplan-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Service Items */
  .service-image {
    height: 180px;
  }
  
  /* Contact Info & Form side by side */
  .contact-section .row {
    align-items: center;
  }
}

/* ===== LARGE DEVICES (992px - 1199.98px) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  /* Hero adjustments */
  .hero-title {
    font-size: 2.8rem;
  }
  
  /* Services - 3 columns */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Gallery - 4 columns */
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Navigation - Desktop layout */
  .navbar-toggler {
    display: none;
  }
  
  .navbar-collapse {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: none;
  }
  
  .navbar-nav {
    flex-direction: row;
    margin: 0;
    padding: 0;
    text-align: left;
  }
  
  .navbar-nav .nav-link {
    margin: 0 0.4rem;
    padding: 0.5rem 0.75rem;
    border: none;
    display: inline-block;
    border-radius: 0.25rem;
  }
}

/* ===== EXTRA LARGE DEVICES (≥ 1200px) ===== */
@media (min-width: 1200px) {
  /* Full desktop layout - most styles from main.css apply */
  
  /* Hero Section enhancements */
  .hero-title {
    font-size: 3.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.4rem;
  }
  
  /* Services - maintain 3 columns but with better spacing */
  .services-grid {
    gap: 2.5rem;
  }
  
  /* Gallery - 5 columns for large screens */
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  /* Team - 5 columns to show all members in one row */
  .team-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  /* Enhanced spacing */
  .section {
    padding: 6rem 0;
  }
  
  /* Navigation - Desktop layout */
  .navbar-toggler {
    display: none;
  }
  
  .navbar-collapse {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    animation: none;
  }
  
  .navbar-nav {
    flex-direction: row;
    margin: 0;
    padding: 0;
    text-align: left;
  }
  
  .navbar-nav .nav-link {
    margin: 0 0.6rem;
    padding: 0.5rem 0.75rem;
    border: none;
    display: inline-block;
    border-radius: 0.25rem;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }
  
  .navbar,
  .footer,
  .btn-submit,
  .contact-form {
    display: none !important;
  }
  
  .section {
    padding: 1rem 0 !important;
    page-break-inside: avoid;
  }
  
  .hero-section {
    min-height: auto !important;
    padding: 2rem 0 !important;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0000ff;
    --secondary-color: #ff8000;
    --accent-color: #008000;
    --neutral-dark: #000000;
    --neutral-light: #ffffff;
  }
  
  .service-item,
  .team-member,
  .review-card,
  .about-feature {
    border: 2px solid var(--neutral-dark);
  }
  
  .btn-submit {
    border: 2px solid var(--neutral-dark);
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .hero-section::before {
    animation: none !important;
  }
  
  .gallery-item:hover,
  .service-item:hover,
  .team-member:hover,
  .review-card:hover {
    transform: none !important;
  }
}

/* Focus Visibility Enhancement */
@media (prefers-reduced-motion: no-preference) {
  *:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
  }
  
  .btn-submit:focus {
    outline-color: white;
  }
}

/* Dark Mode Support (for browsers that support it) */

/* ===== ORIENTATION CHANGES ===== */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-section {
    min-height: 90vh;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .section {
    padding: 3rem 0;
  }
}

/* ===== CONTAINER QUERIES (Future-proofing) ===== */
@container (max-width: 400px) {
  .service-item {
    padding: 1rem;
  }
  
  .service-name {
    font-size: 1rem;
  }
  
  .contact-form {
    padding: 1rem;
  }
}

/* ===== UTILITY CLASSES FOR RESPONSIVE BEHAVIOR ===== */
.hide-mobile {
  display: block;
}

.show-mobile {
  display: none;
}

@media (max-width: 767.98px) {
  .hide-mobile {
    display: none !important;
  }
  
  .show-mobile {
    display: block !important;
  }
}

.text-center-mobile {
  text-align: left;
}

@media (max-width: 767.98px) {
  .text-center-mobile {
    text-align: center !important;
  }
}

/* Stack columns on mobile */
.stack-mobile {
  display: flex;
  flex-direction: row;
}

@media (max-width: 767.98px) {
  .stack-mobile {
    flex-direction: column !important;
  }
}

/* Responsive spacing utilities */
.mb-mobile-2 {
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .mb-mobile-2 {
    margin-bottom: 2rem !important;
  }
}

.p-mobile-1 {
  padding: inherit;
}

@media (max-width: 767.98px) {
  .p-mobile-1 {
    padding: 1rem !important;
  }
}

/* Responsive font sizes */
.fs-responsive-lg {
  font-size: var(--font-size-lg);
}

@media (max-width: 767.98px) {
  .fs-responsive-lg {
    font-size: var(--font-size-base) !important;
  }
}

.fs-responsive-xl {
  font-size: 1.5rem;
}

@media (max-width: 767.98px) {
  .fs-responsive-xl {
    font-size: 1.2rem !important;
  }
}

/* Responsive image handling */
.img-responsive {
  width: 100%;
  height: auto;
  max-width: 100%;
}

@media (max-width: 767.98px) {
  .img-responsive {
    height: auto !important;
    object-fit: cover;
  }
}

/* Responsive flexbox utilities */
.flex-mobile-column {
  display: flex;
}

@media (max-width: 767.98px) {
  .flex-mobile-column {
    flex-direction: column !important;
  }
  
  .flex-mobile-column > * {
    margin-bottom: 1rem;
  }
  
  .flex-mobile-column > *:last-child {
    margin-bottom: 0;
  }
} 

.hero-content {
    padding-top: 200px;
}