/**
 * NossaBet Custom Styles
 * Additional styles and responsive design
 */

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.custom-logo {
    height: 2rem;
    width: auto;
}

/* ==========================================================================
   Navigation Styles
   ========================================================================== */

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

/* ==========================================================================
   Grid System
   ========================================================================== */

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

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

/* ==========================================================================
   Flexbox Utilities
   ========================================================================== */

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.space-x-6 > * + * {
    margin-left: 1.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Gap utilities for flexbox */
.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

/* ==========================================================================
   Responsive Display Utilities
   ========================================================================== */

.hidden {
    display: none !important;
}

.block {
    display: block;
}

.inline-flex {
    display: inline-flex;
}

.flex-col {
    flex-direction: column;
}

/* Small screens (640px+) */
@media (min-width: 640px) {
    .sm\:block,
    [class*="sm:block"] {
        display: block !important;
    }

    .sm\:inline-flex,
    [class*="sm:inline-flex"] {
        display: inline-flex !important;
    }
}

/* Medium screens (768px+) */
@media (min-width: 768px) {
    .md\:block,
    [class*="md:block"] {
        display: block !important;
    }

    .md\:flex,
    [class*="md:flex"] {
        display: flex !important;
    }

    .md\:grid-cols-2,
    [class*="md:grid-cols-2"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Large screens (1024px+) */
@media (min-width: 1024px) {
    .lg\:hidden,
    [class*="lg:hidden"] {
        display: none !important;
    }

    .lg\:flex,
    [class*="lg:flex"] {
        display: flex !important;
    }

    .lg\:block,
    [class*="lg:block"] {
        display: block !important;
    }

    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }

    .lg\:grid-cols-3,
    [class*="lg:grid-cols-3"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4,
    [class*="lg:grid-cols-4"] {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Responsive text sizes */
    .lg\:text-3xl,
    [class*="lg:text-3xl"] {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    .lg\:text-4xl,
    [class*="lg:text-4xl"] {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

/* ==========================================================================
   Search Form Styles
   ========================================================================== */

.search-form-header input[type="search"] {
    outline: none;
    height: 2.5rem;
    padding: 0.5rem 1rem 0.5rem 2.5rem !important;
    font-size: 0.875rem;
    line-height: 1.25rem;
    border: none !important;
    border-radius: var(--radius) !important;
}

.search-form-header input[type="search"]:focus {
    box-shadow: 0 0 0 3px rgba(138, 92, 255, 0.1);
}

/* ==========================================================================
   Button Hover Effects
   ========================================================================== */

#mobile-menu-toggle:hover {
    color: var(--foreground);
}

#scroll-to-top:hover {
    background-color: rgba(138, 92, 255, 0.2);
    color: var(--primary);
}

#scroll-to-top svg {
    transition: var(--transition-smooth);
}

#scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* ==========================================================================
   Post Card Animations
   ========================================================================== */

.post-card img {
    transition: var(--transition-smooth);
}

.post-card:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   Footer Styles
   ========================================================================== */

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

.w-full {
    width: 100%;
}

.h-16 {
    height: 4rem;
}

.h-5 {
    height: 1.25rem;
}

.w-5 {
    width: 1.25rem;
}

.min-h-screen {
    min-height: 100vh;
}

/* Position */
.sticky {
    position: sticky;
}

.relative {
    position: relative;
}

.top-0 {
    top: 0;
}

/* Z-index */
.z-50 {
    z-index: 50;
}

/* Border */
.border-b {
    border-bottom-width: 1px;
}

.border-t {
    border-top-width: 1px;
}

/* Padding */
.p-2 {
    padding: 0.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.pt-2 {
    padding-top: 0.5rem;
}

/* Margin */
.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Text Sizes */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

/* Text Alignment */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Line Height */
.leading-relaxed {
    line-height: 1.625;
}

.leading-tight {
    line-height: 1.25;
}

.leading-normal {
    line-height: 1.5;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Font Families */
.font-heading {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.font-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.font-sans {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Rounded */
.rounded-md {
    border-radius: var(--radius);
}

.rounded-lg {
    border-radius: var(--radius);
}

/* ==========================================================================
   Mobile Menu Animation
   ========================================================================== */

#mobile-menu {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Responsive Typography
   ========================================================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .hero-section {
        padding: 2rem 0 !important;
    }
}

/* ==========================================================================
   WordPress Core Alignment
   ========================================================================== */

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100%;
    width: 100%;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    #mobile-menu-toggle,
    .cta-primary,
    .cta-secondary {
        display: none;
    }
}

/* ==========================================================================
   Carousel Styles
   ========================================================================== */

.betting-carousel {
    margin: 2rem auto;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-viewport {
    overflow: hidden;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Navigation Arrows */
.carousel-prev,
.carousel-next {
    transition: var(--transition-smooth);
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev:active,
.carousel-next:active {
    transform: translateY(-50%) scale(0.95);
}

/* Dot Indicators */
.carousel-dot {
    transition: var(--transition-smooth);
}

.carousel-dot:hover {
    opacity: 0.8;
}

.carousel-dot.active {
    background-color: var(--primary) !important;
    width: 1rem !important;
}

/* ==========================================================================
   Featured Post Styles
   ========================================================================== */

/* Responsive grid for featured post */
@media (min-width: 1024px) {
    .lg\:grid-cols-2,
    [class*="lg:grid-cols-2"] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:gap-12,
    [class*="lg:gap-12"] {
        gap: 3rem;
    }

    .lg\:p-12,
    [class*="lg:p-12"] {
        padding: 3rem;
    }

    .lg\:text-3xl,
    [class*="lg:text-3xl"] {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
}

.max-w-6xl {
    max-width: 72rem;
}

.rounded-xl {
    border-radius: var(--radius-lg);
}

.gap-8 {
    gap: 2rem;
}

.p-8 {
    padding: 2rem;
}

/* Featured post responsive adjustments */
@media (max-width: 1023px) {
    .post-card-featured .grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 2rem !important;
    }
}

@media (min-width: 1024px) {
    .post-card-featured .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 3rem !important;
        padding: 3rem !important;
    }

    .post-card-featured h2 {
        font-size: 2.25rem !important;
    }

    .post-card-featured h3 {
        font-size: 1.875rem !important;
    }
}

/* ==========================================================================
   Popular Posts Styles
   ========================================================================== */

.post-card-popular:hover .popular-read-more {
    opacity: 1 !important;
    transform: translateX(0.25rem);
}

.cta-secondary:hover .arrow-icon {
    transform: translateX(0.25rem);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-glow) 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, hsl(43, 96%, 66%) 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success) 0%, hsl(158, 64%, 62%) 100%);
}
