/* ============================================
   PROPHET DOUALI FESAN MINISTRY
   Responsive Stylesheet
   Version: 1.0
   ============================================ */

/* ============================================
   TABLE OF CONTENTS
   1. Max 1400px
   2. Max 1200px
   3. Max 992px
   4. Max 768px
   5. Max 576px
   6. Max 480px
   ============================================ */

/* ============================================
   1. MAX 1400px
   ============================================ */
@media (max-width: 1400px) {
  .container {
    max-width: 1140px;
  }

  h1 { font-size: 3rem; }
  h2 { font-size: 2.4rem; }
}

/* ============================================
   2. MAX 1200px
   ============================================ */
@media (max-width: 1200px) {
  .container {
    max-width: 960px;
    padding: 0 24px;
  }

  h1 { font-size: 2.8rem; }
  h2 { font-size: 2.2rem; }
  h3 { font-size: 1.7rem; }

  .section {
    padding: 80px 0;
  }

  .hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }

  .about-grid {
    gap: 40px;
  }

  .counter-number {
    font-size: 2.5rem;
  }
}

/* ============================================
   3. MAX 992px
   ============================================ */
@media (max-width: 992px) {
  .container {
    max-width: 720px;
  }

  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.5rem; }

  .section {
    padding: 60px 0;
  }

  /* Navigation */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 100px 30px 30px;
    transition: var(--transition);
    overflow-y: auto;
    gap: 5px;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu > li {
    width: 100%;
  }

  .nav-link {
    padding: 14px 18px;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .nav-link::after {
    display: none;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    padding: 0 0 0 15px;
    display: none;
    min-width: auto;
  }

  .dropdown-menu.show {
    display: block;
  }

  .dropdown-menu li a {
    padding: 10px 18px;
    font-size: 0.9rem;
  }

  .dropdown-menu li a:hover {
    padding-left: 24px;
  }

  /* Mobile menu overlay */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  /* Hero */
  .hero {
    height: 85vh;
    min-height: 500px;
  }

  .hero-arrow {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .hero-arrow.prev { left: 10px; }
  .hero-arrow.next { right: 10px; }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  /* Grids */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image .experience-badge {
    bottom: -15px;
    right: -15px;
    width: 100px;
    height: 100px;
  }

  .about-image .experience-badge span {
    font-size: 1.6rem;
  }

  .ministry-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .sermon-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .event-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .donation-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .donation-card.featured {
    transform: none;
  }

  .donation-card.featured:hover {
    transform: translateY(-8px);
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(7) {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Newsletter */
  .newsletter-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .newsletter-form {
    max-width: 500px;
    margin: 0 auto;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Checkout */
  .checkout-form {
    grid-template-columns: 1fr;
  }

  .checkout-order-summary {
    position: static;
  }

  /* Page header */
  .page-header {
    padding: 120px 0 50px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  /* Cart table responsive */
  .cart-table thead {
    display: none;
  }

  .cart-table tbody tr {
    display: flex;
    flex-direction: column;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
    padding: 20px 0;
  }

  .cart-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border: none;
  }

  .cart-table td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .cart-table .product-info {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   4. MAX 768px
   ============================================ */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 0 20px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.3rem; }
  h4 { font-size: 1.15rem; }

  .section {
    padding: 50px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
  }

  p {
    font-size: 0.95rem;
  }

  /* Navigation */
  .navbar {
    padding: 15px 0;
  }

  .navbar.scrolled {
    padding: 10px 0;
  }

  .nav-brand img {
    width: 40px;
    height: 40px;
  }

  .nav-brand .brand-name {
    font-size: 1.1rem;
  }

  .nav-brand .brand-sub {
    font-size: 0.6rem;
  }

  /* Hero */
  .hero {
    height: 75vh;
    min-height: 450px;
  }

  .hero-content h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 16px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-controls {
    bottom: 25px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 14px 30px;
    font-size: 1rem;
  }

  /* Grids */
  .about-grid {
    gap: 30px;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .ministry-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .counter-item {
    padding: 25px 15px;
  }

  .counter-number {
    font-size: 2rem;
  }

  .counter-icon {
    font-size: 1.8rem;
  }

  .counter-label {
    font-size: 0.8rem;
  }

  .sermon-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .event-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .product-image {
    height: 160px;
  }

  .product-body {
    padding: 12px;
  }

  .product-body h3 {
    font-size: 0.9rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }

  .blog-image {
    height: 200px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .gallery-item img {
    min-height: 150px;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 18px;
    font-size: 0.8rem;
  }

  /* Donation */
  .donation-grid {
    max-width: 380px;
  }

  .donation-card {
    padding: 30px 20px;
  }

  .donation-amount {
    font-size: 2rem;
  }

  /* Newsletter */
  .newsletter-text h2 {
    font-size: 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    text-align: center;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-top {
    padding: 50px 0 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  /* Forms */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Countdown */
  .countdown {
    gap: 8px;
  }

  .countdown-item {
    padding: 8px 3px;
  }

  .countdown-item .num {
    font-size: 1.1rem;
  }

  /* Modal */
  .modal-content {
    padding: 25px;
    margin: 15px;
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
  }

  /* Search overlay */
  .search-overlay form {
    flex-direction: column;
  }

  /* Cart summary */
  .cart-summary {
    padding: 20px;
  }

  /* Admin login */
  .admin-login-card {
    padding: 30px 25px;
  }

  /* Prayer */
  .prayer-content h2 {
    font-size: 1.8rem;
  }

  /* Page header */
  .page-header {
    padding: 100px 0 40px;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  /* Back to top / WhatsApp */
  .whatsapp-float {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
    bottom: 80px;
    right: 15px;
  }

  .back-to-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
    bottom: 20px;
    right: 15px;
  }

  /* Loading overlay */
  .loading-overlay .loader-content .loader-logo {
    width: 60px;
    height: 60px;
  }

  /* Testimony */
  .testimony-card {
    padding: 20px;
  }

  .testimony-card p {
    font-size: 1rem;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  /* Dropdown on mobile - show as accordion */
  .nav-link .dropdown-arrow {
    margin-left: auto;
    transition: var(--transition);
  }

  .nav-link .dropdown-arrow.rotated {
    transform: rotate(180deg);
  }
}

/* ============================================
   5. MAX 576px
   ============================================ */
@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }

  .section {
    padding: 40px 0;
  }

  .section-header {
    margin-bottom: 30px;
  }

  p {
    font-size: 0.9rem;
  }

  /* Hero */
  .hero {
    height: 70vh;
    min-height: 400px;
  }

  .hero-content h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .hero-content p {
    font-size: 0.9rem;
  }

  .hero-badge {
    font-size: 0.7rem;
    padding: 5px 14px;
  }

  .hero-controls {
    bottom: 20px;
  }

  .hero-dot {
    width: 10px;
    height: 10px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  /* Grids */
  .about-image .experience-badge {
    width: 85px;
    height: 85px;
    bottom: -10px;
    right: -10px;
  }

  .about-image .experience-badge span {
    font-size: 1.4rem;
  }

  .about-image .experience-badge small {
    font-size: 0.65rem;
  }

  .counter-grid {
    gap: 10px;
  }

  .counter-item {
    padding: 20px 12px;
  }

  .counter-number {
    font-size: 1.6rem;
  }

  .counter-number .suffix {
    font-size: 1.2rem;
  }

  .counter-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .counter-label {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }

  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .product-image {
    height: 140px;
  }

  .product-body .product-price {
    font-size: 1rem;
  }

  .product-body .btn {
    padding: 8px;
    font-size: 0.8rem;
  }

  .product-actions a {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .ministry-card-image {
    height: 180px;
  }

  .sermon-thumb {
    height: 180px;
  }

  .sermon-play {
    width: 55px;
    height: 55px;
    font-size: 1.2rem;
  }

  .blog-image {
    height: 180px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .gallery-item img {
    min-height: 120px;
  }

  /* Newsletter */
  .newsletter-text h2 {
    font-size: 1.3rem;
  }

  .newsletter-form input {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .newsletter-form .btn {
    padding: 14px 20px;
  }

  /* Footer */
  .footer-grid {
    gap: 25px;
  }

  .footer-about h3 {
    font-size: 1.3rem;
  }

  .footer h4 {
    font-size: 1rem;
  }

  /* Forms */
  .form-control {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .admin-login-card {
    padding: 25px 20px;
  }

  .admin-login-card .login-logo img {
    width: 65px;
    height: 65px;
  }

  .admin-login-card .login-logo h2 {
    font-size: 1.3rem;
  }

  /* Lightbox */
  .lightbox-nav button {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .lightbox-close {
    font-size: 2rem;
    top: 10px;
    right: 15px;
  }

  /* 404 */
  .page-404 h2 {
    font-size: 1.5rem;
  }

  /* Cart */
  .cart-table td {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  .cart-qty input {
    width: 40px;
    height: 32px;
  }

  .cart-qty button {
    width: 32px;
    height: 32px;
  }

  /* Pagination */
  .pagination a,
  .pagination span {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }

  .pagination .next,
  .pagination .prev {
    padding: 0 14px;
    font-size: 0.85rem;
  }

  /* Breadcrumbs */
  .breadcrumb {
    font-size: 0.8rem;
  }

  /* Testimony */
  .testimony-author img {
    width: 50px;
    height: 50px;
  }

  .testimony-card .quote-icon {
    font-size: 2rem;
  }

  .video-play-btn {
    width: 60px;
    height: 60px;
  }

  .video-play-btn i {
    font-size: 1.4rem;
  }

  /* Page header */
  .page-header {
    padding: 90px 0 35px;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }
}

/* ============================================
   6. MAX 480px
   ============================================ */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.05rem; }

  .section {
    padding: 35px 0;
  }

  .hero {
    height: 65vh;
    min-height: 350px;
  }

  .hero-content h1 {
    font-size: clamp(1.3rem, 6vw, 1.7rem);
  }

  .hero-content p {
    font-size: 0.85rem;
    margin-bottom: 20px;
  }

  .hero-badge {
    font-size: 0.65rem;
    padding: 4px 12px;
    margin-bottom: 15px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
  }

  .product-image {
    height: 200px;
  }

  .counter-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .counter-item {
    padding: 15px 10px;
  }

  .counter-number {
    font-size: 1.4rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .gallery-item img {
    min-height: 100px;
  }

  .filter-buttons {
    gap: 5px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.75rem;
  }

  .countdown-item .num {
    font-size: 1rem;
  }

  .countdown-item .label {
    font-size: 0.6rem;
  }

  .nav-menu {
    width: 280px;
    padding: 90px 20px 20px;
  }

  .ministry-card-image {
    height: 160px;
  }

  .sermon-thumb {
    height: 160px;
  }

  .blog-image {
    height: 160px;
  }

  .prayer-content h2 {
    font-size: 1.5rem;
  }

  .donation-amount {
    font-size: 1.8rem;
  }

  .whatsapp-float {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    bottom: 70px;
    right: 12px;
  }

  .back-to-top {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    bottom: 15px;
    right: 12px;
  }

  .page-header {
    padding: 80px 0 30px;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  .page-header .breadcrumb {
    font-size: 0.75rem;
  }

  .modal-content {
    padding: 20px;
  }

  .error-number {
    font-size: clamp(5rem, 15vw, 8rem);
  }

  .page-404 h2 {
    font-size: 1.3rem;
  }

  .admin-login-card {
    padding: 20px 15px;
  }
}

/* ============================================
   DARK MODE SUPPORT (optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-light: #0d0d1a;
    --text: #e0e0e0;
    --text-light: #a0a0b0;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  }

  .section-light {
    background: var(--bg-light);
  }

  .ministry-card,
  .sermon-card,
  .event-card,
  .product-card,
  .blog-card,
  .donation-card,
  .cart-summary,
  .checkout-form .form-section,
  .checkout-order-summary {
    background: var(--dark-light);
  }

  .ministry-card-body p,
  .sermon-body p,
  .event-body p,
  .product-body .product-category,
  .blog-body p {
    color: rgba(255, 255, 255, 0.6);
  }

  .ministry-card-body h3,
  .sermon-body h3,
  .event-body h3,
  .product-body h3,
  .blog-body h3 {
    color: var(--accent);
  }

  .about-feature {
    background: rgba(255, 255, 255, 0.05);
  }

  .about-feature span {
    color: rgba(255, 255, 255, 0.7);
  }

  .filter-btn {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
  }

  .filter-btn:hover,
  .filter-btn.active {
    color: var(--accent);
  }

  .form-control {
    background: var(--dark-light);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--accent);
  }

  .form-group label {
    color: rgba(255, 255, 255, 0.8);
  }

  .admin-login-card {
    background: var(--dark-light);
  }

  .admin-login-card .form-group label {
    color: rgba(255, 255, 255, 0.8);
  }

  .modal-content {
    background: var(--dark-light);
    color: var(--accent);
  }

  .modal-close {
    color: var(--accent);
  }

  .breadcrumb a,
  .breadcrumb span,
  .breadcrumb .separator {
    color: rgba(255, 255, 255, 0.5);
  }

  .page-header {
    background: var(--gradient-primary);
  }

  .pagination a,
  .pagination span {
    background: var(--dark-light);
    color: rgba(255, 255, 255, 0.7);
  }

  .pagination a:hover {
    background: var(--primary);
    color: var(--accent);
  }

  .sermon-actions {
    border-top-color: rgba(255, 255, 255, 0.08);
  }

  .sermon-actions a {
    color: rgba(255, 255, 255, 0.5);
  }

  .countdown-item {
    background: rgba(255, 255, 255, 0.06);
  }

  .countdown-item .num {
    color: var(--secondary);
  }
}

/* ============================================
   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;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   7. MOBILE TOUCH & UX IMPROVEMENTS
   ============================================ */

/* Better touch targets */
@media (pointer: coarse) {
  .btn,
  button,
  a.nav-link,
  .nav-item > a,
  .dropdown-item,
  .social-link,
  .filter-btn,
  .pagination a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Mobile nav overlay animation */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile nav slide */
.mobile-nav {
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.mobile-nav.active {
  transform: translateX(0) !important;
}

/* Back to top animation */
#backToTop {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease !important;
}

/* Smooth scroll for the whole page */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .navbar,
  .whatsapp-float,
  .back-to-top,
  .footer,
  .hero-controls,
  .hero-arrow,
  .search-overlay,
  .lightbox,
  .modal {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  .section {
    padding: 20px 0;
  }
}
