/* ===== SUSTAINABLE GARDENING COURSE TEMPLATE - RESPONSIVE CSS ===== */

/* ===== MOBILE FIRST APPROACH ===== */
/* Base styles are for mobile devices (320px and up) */

/* ===== EXTRA SMALL DEVICES (Portrait phones, less than 576px) ===== */
@media (max-width: 575.98px) {
  :root {
    --fs-xs: 0.625rem;
    --fs-sm: 0.75rem;
    --fs-base: 0.875rem;
    --fs-lg: 1rem;
    --fs-xl: 1.125rem;
    --fs-2xl: 1.25rem;
    --fs-3xl: 1.5rem;
    --fs-4xl: 1.75rem;
    
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  /* Navigation */
  .navbar-brand {
    font-size: var(--fs-lg);
  }
  
  .navbar-nav .nav-link {
    font-size: var(--fs-sm);
    margin: 0 var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
  }
  
  .navbar-collapse {
    text-align: center;
  }
  
  /* Hero Section */
  .hero-section {
    min-height: 80vh;
    padding: var(--spacing-lg) 0;
  }
  
  .hero-title {
    font-size: var(--fs-3xl);
    margin-bottom: var(--spacing-sm);
  }
  
  .hero-subtitle {
    font-size: var(--fs-lg);
    margin-bottom: var(--spacing-md);
  }
  
  .hero-desc {
    font-size: var(--fs-base);
    margin-bottom: var(--spacing-lg);
  }
  
  .hero-image {
    margin-top: var(--spacing-lg);
  }
  
  /* Section Spacing */
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  .section-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--spacing-xs);
  }
  
  .section-subtitle {
    font-size: var(--fs-lg);
    margin-bottom: var(--spacing-sm);
  }
  
  .section-desc {
    font-size: var(--fs-base);
    margin-bottom: var(--spacing-lg);
  }
  
  /* About Features */
  .about-feature {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  .about-feature i {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .about-feature h4 {
    font-size: var(--fs-lg);
  }
  
  /* Services */
  .service-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  .service-item img {
    height: 150px;
    margin-bottom: var(--spacing-sm);
  }
  
  .service-item h4 {
    font-size: var(--fs-lg);
  }
  
  .service-price {
    font-size: var(--fs-xl);
  }
  
  /* Features */
  .feature-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  .feature-item i {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .feature-item h4 {
    font-size: var(--fs-lg);
  }
  
  /* Price Plans */
  .priceplan-item {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
  }
  
  .priceplan-price {
    font-size: var(--fs-2xl);
  }
  
  /* Team */
  .team-member img {
    width: 150px;
    height: 150px;
    margin-bottom: var(--spacing-sm);
  }
  
  .team-member h5 {
    font-size: var(--fs-base);
  }
  
  /* Reviews */
  .review-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  /* Case Studies */
  .casestudy-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  .casestudy-item h4 {
    font-size: var(--fs-lg);
  }
  
  /* Process */
  .process-item {
    margin-bottom: var(--spacing-md);
  }
  
  .process-item h4 {
    font-size: var(--fs-lg);
    margin-top: var(--spacing-md);
  }
  
  .process-item::before {
    width: 30px;
    height: 30px;
    font-size: var(--fs-sm);
  }
  
  /* Timeline */
  .timeline-item {
    padding-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
  }
  
  .timeline-item h4 {
    font-size: var(--fs-lg);
  }
  
  /* Career */
  .career-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  .career-item h4 {
    font-size: var(--fs-lg);
  }
  
  /* Core Info */
  .coreinfo-item {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  .coreinfo-item i {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .coreinfo-item h4 {
    font-size: var(--fs-lg);
  }
  
  /* Contact */
  .contact-form {
    padding: var(--spacing-lg);
  }
  
  .form-group {
    margin-bottom: var(--spacing-md);
  }
  
  .btn-primary {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--fs-base);
    width: 100%;
  }
  
  /* Blog */
  .blog-item {
    margin-bottom: var(--spacing-md);
  }
  
  .blog-item img {
    height: 150px;
  }
  
  .blog-item .card-body {
    padding: var(--spacing-md);
  }
  
  .blog-item h4 {
    font-size: var(--fs-lg);
  }
  
  /* FAQ */
  .faq-item {
    margin-bottom: var(--spacing-sm);
  }
  
  .faq-question {
    padding: var(--spacing-sm);
    font-size: var(--fs-base);
  }
  
  .faq-answer {
    padding: var(--spacing-sm);
    font-size: var(--fs-sm);
  }
  
  /* Gallery */
  .gallery-item {
    margin-bottom: var(--spacing-md);
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  /* Footer */
  .footer {
    padding: var(--spacing-xl) 0 var(--spacing-md);
    text-align: center;
  }
  
  .footer h5 {
    font-size: var(--fs-lg);
    margin-bottom: var(--spacing-sm);
  }
  
  .footer p {
    font-size: var(--fs-sm);
    margin-bottom: var(--spacing-xs);
  }
  
  .footer-bottom {
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-md);
  }
  
  .footer-bottom small {
    font-size: var(--fs-xs);
  }
  
  /* Utility adjustments */
  .text-center-mobile {
    text-align: center;
  }
  
  .mt-mobile-lg {
    margin-top: var(--spacing-lg);
  }
  
  .mb-mobile-lg {
    margin-bottom: var(--spacing-lg);
  }
  
  .p-mobile-sm {
    padding: var(--spacing-sm);
  }
}

/* ===== SMALL DEVICES (Landscape phones, 576px and up) ===== */
@media (min-width: 576px) and (max-width: 767.98px) {
  :root {
    --fs-xs: 0.7rem;
    --fs-sm: 0.8rem;
    --fs-base: 0.9rem;
    --fs-lg: 1.1rem;
    --fs-xl: 1.2rem;
    --fs-2xl: 1.4rem;
    --fs-3xl: 1.6rem;
    --fs-4xl: 2rem;
  }
  
  .hero-section {
    min-height: 85vh;
  }
  
  .hero-title {
    font-size: var(--fs-4xl);
  }
  
  .hero-subtitle {
    font-size: var(--fs-xl);
  }
  
  .service-item img {
    height: 180px;
  }
  
  .team-member img {
    width: 180px;
    height: 180px;
  }
  
  .gallery-item img {
    height: 220px;
  }
  
  .blog-item img {
    height: 180px;
  }
  
  .btn-primary {
    width: auto;
  }
}

/* ===== MEDIUM DEVICES (Tablets, 768px and up) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
  :root {
    --fs-xs: 0.75rem;
    --fs-sm: 0.85rem;
    --fs-base: 0.95rem;
    --fs-lg: 1.15rem;
    --fs-xl: 1.25rem;
    --fs-2xl: 1.5rem;
    --fs-3xl: 1.75rem;
    --fs-4xl: 2.25rem;
  }
  
  .hero-section {
    min-height: 90vh;
  }
  
  .hero-title {
    font-size: var(--fs-4xl);
  }
  
  .hero-subtitle {
    font-size: var(--fs-xl);
  }
  
  .service-item img {
    height: 200px;
  }
  
  .team-member img {
    width: 200px;
    height: 200px;
  }
  
  .gallery-item img {
    height: 240px;
  }
  
  .blog-item img {
    height: 200px;
  }
  
  .navbar-nav .nav-link {
    margin: 0 var(--spacing-sm);
  }
  
  .footer {
    text-align: left;
  }
  
  .footer-bottom {
    text-align: center;
  }
}

/* ===== LARGE DEVICES (Desktops, 992px and up) ===== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-section {
    min-height: 95vh;
  }
  
  .service-item img {
    height: 220px;
  }
  
  .gallery-item img {
    height: 260px;
  }
  
  .blog-item img {
    height: 220px;
  }
  
  .about-feature:hover,
  .service-item:hover,
  .feature-item:hover,
  .priceplan-item:hover,
  .blog-item:hover,
  .gallery-item img:hover {
    transform: translateY(-5px);
  }
}

/* ===== EXTRA LARGE DEVICES (Large desktops, 1200px and up) ===== */
@media (min-width: 1200px) {
  .hero-section {
    min-height: 100vh;
  }
  
  .service-item img {
    height: 250px;
  }
  
  .gallery-item img {
    height: 280px;
  }
  
  .blog-item img {
    height: 250px;
  }
  
  .container {
    max-width: 1200px;
  }
  
  .section {
    padding: var(--spacing-2xl) 0;
  }
  
  /* Enhanced hover effects for larger screens */
  .about-feature:hover,
  .service-item:hover,
  .feature-item:hover,
  .priceplan-item:hover,
  .blog-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
  }
  
  .gallery-item img:hover {
    transform: scale(1.05);
  }
}

/* ===== EXTRA EXTRA LARGE DEVICES (Larger desktops, 1400px and up) ===== */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .section-subtitle {
    font-size: 1.375rem;
  }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (orientation: landscape) and (max-height: 500px) {
  .hero-section {
    min-height: 100vh;
    padding: var(--spacing-lg) 0;
  }
  
  .hero-title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--spacing-xs);
  }
  
  .hero-subtitle {
    font-size: var(--fs-lg);
    margin-bottom: var(--spacing-sm);
  }
  
  .hero-desc {
    font-size: var(--fs-base);
    margin-bottom: var(--spacing-md);
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
}

/* ===== HIGH RESOLUTION DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-section::before {
    background-image: url('../DEC_images/hero-bg@2x.webp');
  }
  
  .service-item img,
  .team-member img,
  .gallery-item img,
  .blog-item img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black !important;
    page-break-after: avoid;
  }
  
  .hero-section,
  .navbar,
  .footer,
  .contact-form,
  .btn {
    display: none !important;
  }
  
  .section {
    padding: 20pt 0;
  }
  
  .container {
    max-width: none;
    width: 100%;
  }
  
  .service-item,
  .feature-item,
  .priceplan-item,
  .review-item,
  .casestudy-item,
  .career-item,
  .coreinfo-item,
  .blog-item,
  .faq-item {
    page-break-inside: avoid;
    border: 1pt solid black;
    margin-bottom: 10pt;
  }
  
  .gallery-item img {
    max-width: 100%;
    height: auto;
  }
  
  a {
    color: black !important;
    text-decoration: underline !important;
  }
  
  .footer-bottom {
    display: block !important;
    text-align: center;
    margin-top: 20pt;
    border-top: 1pt solid black;
    padding-top: 10pt;
  }
}

/* ===== ACCESSIBILITY & REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .hero-section::before {
    animation: none !important;
  }
  
  .about-feature:hover,
  .service-item:hover,
  .feature-item:hover,
  .priceplan-item:hover,
  .blog-item:hover,
  .gallery-item img:hover {
    transform: none !important;
  }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  :root {
    --primary-green: #000000;
    --primary-sage: #000000;
    --primary-earth: #000000;
    --primary-sky: #000000;
    --primary-sunset: #000000;
    
    --light-green: #FFFFFF;
    --light-sage: #FFFFFF;
    --light-earth: #FFFFFF;
    --light-sky: #FFFFFF;
    --light-sunset: #FFFFFF;
    
    --dark-green: #000000;
    --dark-sage: #000000;
    --dark-earth: #000000;
    --dark-sky: #000000;
    --dark-sunset: #000000;
    
    --gray: #000000;
    --dark-gray: #000000;
    
    --gradient-primary: none;
    --gradient-secondary: none;
    --gradient-accent: none;
    --gradient-hero: none;
  }
  
  .hero-section {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  
  .hero-section::before {
    display: none !important;
  }
  
  .hero-content {
    color: #000000 !important;
  }
  
  .service-item,
  .feature-item,
  .priceplan-item,
  .review-item,
  .casestudy-item,
  .career-item,
  .coreinfo-item,
  .blog-item,
  .faq-item,
  .contact-form {
    border: 2px solid #000000 !important;
    background: #FFFFFF !important;
  }
  
  .btn-primary {
    background: #000000 !important;
    color: #FFFFFF !important;
    border: 2px solid #000000 !important;
  }
  
  .btn-primary:hover {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
}

/* ===== DARK MODE PREFERENCE ===== */

/* ===== FOCUS MANAGEMENT ===== */
@media (any-hover: none) {
  .about-feature:hover,
  .service-item:hover,
  .feature-item:hover,
  .priceplan-item:hover,
  .blog-item:hover,
  .gallery-item img:hover {
    transform: none;
  }
}

/* ===== PERFORMANCE OPTIMIZATION ===== */
@media (prefers-reduced-data: reduce) {
  .hero-section::before {
    background-image: none;
  }
  
  .service-item img,
  .team-member img,
  .gallery-item img,
  .blog-item img {
    background-color: var(--light-gray);
  }
}

/* ===== CONTAINER QUERIES (Future-proofing) ===== */
@container (min-width: 768px) {
  .service-item {
    display: flex;
    align-items: center;
    text-align: left;
  }
  
  .service-item img {
    flex: 0 0 200px;
    margin-right: var(--spacing-lg);
    margin-bottom: 0;
  }
  
  .service-item .content {
    flex: 1;
  }
}

/* ===== CUSTOM RESPONSIVE UTILITIES ===== */
.d-mobile-none {
  display: none;
}

.d-tablet-none {
  display: block;
}

.d-desktop-none {
  display: block;
}

@media (min-width: 768px) {
  .d-mobile-none {
    display: block;
  }
  
  .d-tablet-none {
    display: none;
  }
}

@media (min-width: 992px) {
  .d-tablet-none {
    display: block;
  }
  
  .d-desktop-none {
    display: none;
  }
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
@media (min-width: 576px) {
  .responsive-text {
    font-size: calc(1rem + 0.5vw);
  }
}

@media (min-width: 768px) {
  .responsive-text {
    font-size: calc(1rem + 1vw);
  }
}

@media (min-width: 992px) {
  .responsive-text {
    font-size: calc(1rem + 1.5vw);
  }
}

@media (min-width: 1200px) {
  .responsive-text {
    font-size: calc(1rem + 2vw);
  }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
  .btn-primary,
  .nav-link,
  .faq-question {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-link {
    padding: var(--spacing-sm) var(--spacing-md);
  }
  
  .service-item,
  .feature-item,
  .priceplan-item,
  .blog-item {
    transition: none;
  }
  
  .service-item:hover,
  .feature-item:hover,
  .priceplan-item:hover,
  .blog-item:hover {
    transform: none;
  }
}

/* ===== RTOL (Right-to-Left) SUPPORT ===== */
[dir="rtl"] .timeline-item {
  padding-left: 0;
  padding-right: var(--spacing-xl);
}

[dir="rtl"] .timeline-item::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .timeline-item::after {
  left: auto;
  right: 5px;
}

[dir="rtl"] .contact-info i {
  margin-left: var(--spacing-xs);
  margin-right: 0;
}

[dir="rtl"] .service-features li i {
  margin-left: var(--spacing-xs);
  margin-right: 0;
}

[dir="rtl"] .navbar-nav .nav-link {
  text-align: right;
}

[dir="rtl"] .hero-content {
  text-align: right;
}

[dir="rtl"] .section-title,
[dir="rtl"] .section-subtitle,
[dir="rtl"] .section-desc {
  text-align: right;
}

/* ===== RESPONSIVE IMAGES ===== */
img {
  max-width: 100%;
  height: auto;
}

.responsive-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ===== RESPONSIVE EMBEDS ===== */
.responsive-embed {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.responsive-embed::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 16:9 aspect ratio */
}

.responsive-embed iframe,
.responsive-embed embed,
.responsive-embed object,
.responsive-embed video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ===== RESPONSIVE TABLES ===== */
.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  min-width: 100%;
  margin-bottom: 0;
} 