/**
 * Custom CSS Overrides
 * 
 * @package Fradox
 */

/* ========================================
   Pagination Styles
   ======================================== */
.nav-links {
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 0.5rem;
}

.nav-links .page-numbers {
     display: flex;
     align-items: center;
     justify-content: center;
     min-width: 2.5rem;
     height: 2.5rem;
     padding: 0 0.75rem;
     border-radius: 0.5rem;
     font-size: 0.875rem;
     font-weight: 500;
     color: var(--text-secondary, #616f89);
     background: var(--bg-card, white);
     border: 1px solid var(--border-color, #e5e7eb);
     transition: all 0.2s ease;
}

.nav-links .page-numbers:hover {
     border-color: var(--primary, #135bec);
     color: var(--primary, #135bec);
}

.nav-links .page-numbers.current {
     background: var(--primary, #135bec);
     color: white;
     border-color: var(--primary, #135bec);
}

.dark .nav-links .page-numbers {
     background: #1f2937;
     border-color: #374151;
     color: #9ca3af;
}

.dark .nav-links .page-numbers:hover {
     border-color: var(--primary, #135bec);
     color: var(--primary, #135bec);
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
textarea:focus,
select:focus {
     outline: none;
     border-color: var(--primary, #135bec);
     box-shadow: 0 0 0 3px rgba(19, 91, 236, 0.1);
}

/* ========================================
   Prose Styles for Content
   ======================================== */
.prose h2 {
     margin-top: 2rem;
     margin-bottom: 1rem;
}

.prose h3 {
     margin-top: 1.5rem;
     margin-bottom: 0.75rem;
}

.prose p {
     margin-bottom: 1rem;
}

.prose ul,
.prose ol {
     margin-bottom: 1rem;
     padding-left: 1.5rem;
}

.prose li {
     margin-bottom: 0.5rem;
}

.prose img {
     border-radius: 0.75rem;
     margin: 2rem 0;
}

.prose a {
     color: var(--primary, #135bec);
     text-decoration: underline;
     text-underline-offset: 2px;
}

.prose a:hover {
     text-decoration: none;
}

/* ========================================
   Navigation Menu Styles
   ======================================== */
.menu {
     list-style: none;
     margin: 0;
     padding: 0;
}

.menu li {
     display: inline-block;
}

.menu li a {
     display: block;
     padding: 0.5rem 0;
     color: var(--text-primary, #111318);
     font-size: 0.875rem;
     font-weight: 500;
     transition: color 0.2s ease;
}

.menu li a:hover {
     color: var(--primary, #135bec);
}

.dark .menu li a {
     color: white;
}

.dark .menu li a:hover {
     color: var(--primary, #135bec);
}

/* Mobile menu styles */
#mobile-menu .menu {
     display: flex;
     flex-direction: column;
}

#mobile-menu .menu li {
     display: block;
}

#mobile-menu .menu li a {
     padding: 0.75rem 1rem;
     border-radius: 0.5rem;
}

#mobile-menu .menu li a:hover {
     background: rgba(19, 91, 236, 0.1);
}

/* ========================================
   Custom Logo Styles
   ======================================== */
.custom-logo-link {
     display: flex;
     align-items: center;
}

.custom-logo {
     max-height: 40px;
     width: auto;
}

/* ========================================
   Scrollbar Styles
   ======================================== */
.no-scrollbar::-webkit-scrollbar {
     display: none;
}

.no-scrollbar {
     -ms-overflow-style: none;
     scrollbar-width: none;
}

/* Custom scrollbar for supported browsers */
::-webkit-scrollbar {
     width: 8px;
     height: 8px;
}

::-webkit-scrollbar-track {
     background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
     background: #c1c1c1;
     border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
     background: #a1a1a1;
}

.dark ::-webkit-scrollbar-track {
     background: #1f2937;
}

.dark ::-webkit-scrollbar-thumb {
     background: #4b5563;
}

.dark ::-webkit-scrollbar-thumb:hover {
     background: #6b7280;
}

/* ========================================
   Animation Classes
   ======================================== */
.animate-in {
     animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
     from {
          opacity: 0;
          transform: translateY(20px);
     }

     to {
          opacity: 1;
          transform: translateY(0);
     }
}

/* ========================================
   Line Clamp Utilities
   ======================================== */
.line-clamp-2 {
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
}

.line-clamp-3 {
     display: -webkit-box;
     -webkit-line-clamp: 3;
     -webkit-box-orient: vertical;
     overflow: hidden;
}

/* ========================================
   WordPress Core Block Styles
   ======================================== */
.wp-block-image {
     margin: 2rem 0;
}

.wp-block-image img {
     border-radius: 0.75rem;
}

.wp-block-quote {
     border-left: 4px solid var(--primary, #135bec);
     padding-left: 1.5rem;
     margin: 1.5rem 0;
     font-style: italic;
     color: var(--text-secondary, #616f89);
}

.wp-block-button__link {
     background: var(--primary, #135bec);
     color: white;
     padding: 0.75rem 1.5rem;
     border-radius: 0.5rem;
     font-weight: 600;
     display: inline-block;
     transition: background 0.2s ease;
}

.wp-block-button__link:hover {
     background: #0b4dc7;
     color: white;
}

/* ========================================
   Accessibility
   ======================================== */
.screen-reader-text {
     clip: rect(1px, 1px, 1px, 1px);
     position: absolute !important;
     height: 1px;
     width: 1px;
     overflow: hidden;
}

.screen-reader-text:focus {
     background-color: #f1f1f1;
     border-radius: 3px;
     box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
     clip: auto !important;
     color: #21759b;
     display: block;
     font-size: 14px;
     font-weight: bold;
     height: auto;
     left: 5px;
     line-height: normal;
     padding: 15px 23px 14px;
     text-decoration: none;
     top: 5px;
     width: auto;
     z-index: 100000;
}

/* ========================================
   Responsive Image Styles - CRITICAL
   ======================================== */

/* GLOBAL: Force all images to be responsive */
img,
picture,
video,
canvas,
svg {
     display: block;
     max-width: 100%;
     height: auto;
}

/* WordPress specific image classes */
.wp-post-image,
.attachment-post-thumbnail,
.attachment-medium,
.attachment-large,
.attachment-full,
.size-full,
.size-large,
.size-medium,
.size-thumbnail,
img.alignnone,
img.alignleft,
img.alignright,
img.aligncenter {
     max-width: 100% !important;
     height: auto !important;
     object-fit: contain;
}

/* Ensure featured images scale properly */
.post-thumbnail img,
.entry-thumbnail img,
.featured-image img,
.wp-block-image img {
     max-width: 100%;
     height: auto;
     object-fit: cover;
}

/* Background image utilities */
.bg-cover {
     background-size: cover;
     background-position: center;
}

.bg-contain {
     background-size: contain;
     background-position: center;
     background-repeat: no-repeat;
}

/* Responsive aspect ratio containers */
.aspect-video {
     aspect-ratio: 16 / 9;
}

.aspect-square {
     aspect-ratio: 1 / 1;
}

.aspect-\[4\/3\] {
     aspect-ratio: 4 / 3;
}

/* Object-fit utilities */
.object-cover {
     object-fit: cover;
}

.object-contain {
     object-fit: contain;
}

.object-fill {
     object-fit: fill;
}

/* Responsive image containers */
.img-container {
     position: relative;
     width: 100%;
     overflow: hidden;
}

.img-container img {
     width: 100%;
     height: 100%;
     object-fit: cover;
}

/* Show full image without cropping */
.img-container.contain img,
.img-responsive {
     object-fit: contain;
     width: 100%;
     height: auto;
}

/* Product and Gallery images */
.product-image,
.gallery-image {
     width: 100%;
     height: auto;
     object-fit: cover;
     object-position: center;
}

/* ========================================
   Mobile Responsive Breakpoints  
   ======================================== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
     img {
          max-width: 100%;
          height: auto;
     }
}

/* Tablets */
@media (max-width: 768px) {
     img {
          max-width: 100%;
          height: auto;
     }

     .grid img {
          max-width: 100%;
          height: auto;
     }
}

/* Mobile phones */
@media (max-width: 480px) {
     img {
          max-width: 100%;
          height: auto;
     }

     .wp-block-image img,
     .post-thumbnail img {
          width: 100%;
          height: auto;
     }
}

/* ========================================
   Fix for oversized images in containers
   ======================================== */

/* Prevent images from exceeding viewport */
.container img,
.max-w-7xl img,
article img,
.prose img,
.content img {
     max-width: 100%;
     height: auto;
}

/* Fix for images with inline width/height */
img[width],
img[height] {
     max-width: 100%;
     height: auto;
}

/* Override inline styles for responsive images */
img[style*="width"],
img[style*="height"] {
     max-width: 100% !important;
     height: auto !important;
}

/* Gallery hover effect */
.gallery-image:hover {
     transform: scale(1.05);
     transition: transform 0.5s ease;
}