/**
 * Hero Slider Styles
 * Modern, responsive slider with smooth animations
 *
 * @category  Panth
 * @package   Panth_Homepage
 */

/* ========================================
   Slider Container & Wrapper
   ======================================== */

.hero-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto 30px;
    overflow: hidden;
}

.hero-slider-wrapper .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 8px; /* Add subtle border radius */
}

/* Responsive heights */
@media (max-width: 1023px) {
    .hero-slider-container {
        height: 450px;
    }

    .hero-slider-wrapper .container {
        padding: 0 12px;
    }
}

@media (max-width: 767px) {
    .hero-slider-container {
        height: 400px;
    }

    .hero-slider-wrapper .container {
        padding: 0 10px;
    }
}

@media (max-width: 479px) {
    .hero-slider-container {
        height: 350px;
    }

    .hero-slider-wrapper .container {
        padding: 0 8px;
    }
}

/* ========================================
   Swiper Slide Styles
   ======================================== */

.hero-slide {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* ========================================
   Image Styles
   ======================================== */

.hero-slide-picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 8px; /* Match container border radius */
}

/* Image transition effect */
.swiper-slide-active .hero-slide-image {
    animation: scaleIn 0.8s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(1.1);
        opacity: 0.8;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   Content Overlay Styles
   ======================================== */

.hero-slide-content {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.hero-slide-content-inner {
    max-width: 800px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out 0.3s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content positioning based on layout type */
.hero-slide[data-layout="content_only"] .hero-slide-picture {
    display: none;
}

.hero-slide[data-layout="content_only"] .hero-slide-content {
    background: #1F2E44;
    padding: 0;
    text-align: center;
}

.hero-slide[data-layout="content_only"] .hero-slide-content-inner {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.hero-slide[data-layout="content_only"] .hero-slide-content h1,
.hero-slide[data-layout="content_only"] .hero-slide-content h2,
.hero-slide[data-layout="content_only"] .hero-slide-content h3,
.hero-slide[data-layout="content_only"] .hero-slide-content p {
    text-align: center;
}

.hero-slide[data-layout="image_content"] .hero-slide-content {
    text-align: center;
}

.hero-slide[data-layout="image_content"] .hero-slide-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%);
    z-index: -1;
}

.hero-slide[data-layout="image_content"] .hero-slide-content-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-slide[data-layout="image_content"] .hero-slide-content h1,
.hero-slide[data-layout="image_content"] .hero-slide-content h2,
.hero-slide[data-layout="image_content"] .hero-slide-content h3,
.hero-slide[data-layout="image_content"] .hero-slide-content p {
    text-align: center;
}

/* Text color for content_only slides (dark background) */
.hero-slide[data-layout="content_only"] .hero-slide-content h1,
.hero-slide[data-layout="content_only"] .hero-slide-content h2,
.hero-slide[data-layout="content_only"] .hero-slide-content h3 {
    color: #ffffff;
}

.hero-slide[data-layout="content_only"] .hero-slide-content p {
    color: #E8EDF3;
}

/* Responsive content padding */
@media (max-width: 1023px) {
    .hero-slide-content {
        padding: 30px;
    }

    .hero-slide[data-layout="content_only"] .hero-slide-content {
        padding: 40px 30px;
    }
}

@media (max-width: 767px) {
    .hero-slide-content {
        padding: 20px;
    }

    .hero-slide-content-inner {
        max-width: 100%;
    }

    .hero-slide[data-layout="content_only"] .hero-slide-content {
        padding: 30px 20px;
    }
}

/* ========================================
   Navigation Buttons
   ======================================== */

/* Hide Swiper's default arrow content (::after) */
.hero-slider-prev::after,
.hero-slider-next::after {
    display: none !important;
    content: '' !important;
}

.hero-slider-prev,
.hero-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-slider-prev {
    left: 20px;
}

.hero-slider-next {
    right: 20px;
}

.hero-slider-prev:hover,
.hero-slider-next:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.hero-slider-prev.swiper-button-disabled,
.hero-slider-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.hero-slider-prev svg,
.hero-slider-next svg {
    width: 24px;
    height: 24px;
    color: #333;
}

/* Hide navigation on mobile */
@media (max-width: 767px) {
    .hero-slider-prev,
    .hero-slider-next {
        width: 40px;
        height: 40px;
    }

    .hero-slider-prev {
        left: 10px;
    }

    .hero-slider-next {
        right: 10px;
    }

    .hero-slider-prev svg,
    .hero-slider-next svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 479px) {
    .hero-slider-prev,
    .hero-slider-next {
        display: none;
    }
}

/* ========================================
   Pagination Dots
   ======================================== */

.hero-slider-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.hero-slider-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    margin: 0 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-slider-pagination .swiper-pagination-bullet-active {
    background: rgba(255, 255, 255, 1);
    width: 30px;
    border-radius: 6px;
}

.hero-slider-pagination .swiper-pagination-bullet:hover {
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 767px) {
    .hero-slider-pagination {
        bottom: 15px;
    }

    .hero-slider-pagination .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }

    .hero-slider-pagination .swiper-pagination-bullet-active {
        width: 24px;
    }
}

/* ========================================
   Loading State
   ======================================== */

.hero-slider-wrapper:not(.swiper-initialized) .hero-slider-container {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.hero-slider-wrapper.swiper-initialized .hero-slider-container {
    background: transparent;
    animation: none;
}

/* ========================================
   Accessibility
   ======================================== */

.hero-slider-prev:focus,
.hero-slider-next:focus,
.hero-slider-pagination .swiper-pagination-bullet:focus {
    outline: 2px solid #007bdb;
    outline-offset: 3px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   Custom Content Styles (for slide content)
   ======================================== */

/* Default heading styles in content */
.hero-slide-content h1,
.hero-slide-content h2,
.hero-slide-content h3 {
    font-family: Poppins, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-slide-content h1 {
    font-size: 48px;
}

.hero-slide-content h2 {
    font-size: 36px;
}

.hero-slide-content h3 {
    font-size: 28px;
}

.hero-slide-content p {
    font-family: Poppins, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-slide-content a:not([class]) {
    display: inline-block;
    padding: 12px 30px;
    background: #1F2E44;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-family: Poppins, sans-serif;
    transition: all 0.3s ease;
}

.hero-slide-content a:not([class]):hover {
    background: #2B3F5C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 46, 68, 0.3);
}

/* Responsive content typography */
@media (max-width: 1023px) {
    .hero-slide-content h1 {
        font-size: 36px;
    }

    .hero-slide-content h2 {
        font-size: 28px;
    }

    .hero-slide-content h3 {
        font-size: 24px;
    }

    .hero-slide-content p {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    .hero-slide-content h1 {
        font-size: 28px;
    }

    .hero-slide-content h2 {
        font-size: 24px;
    }

    .hero-slide-content h3 {
        font-size: 20px;
    }

    .hero-slide-content p {
        font-size: 14px;
    }

    .hero-slide-content a:not([class]) {
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* ========================================
   Dark Mode Support (optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .hero-slider-prev,
    .hero-slider-next {
        background: rgba(40, 40, 40, 0.9);
    }

    .hero-slider-prev svg,
    .hero-slider-next svg {
        color: #fff;
    }

    .hero-slider-prev:hover,
    .hero-slider-next:hover {
        background: rgba(40, 40, 40, 1);
    }
}

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

@media print {
    .hero-slider-prev,
    .hero-slider-next,
    .hero-slider-pagination {
        display: none !important;
    }

    .hero-slider-container {
        height: auto !important;
    }

    .hero-slide {
        page-break-inside: avoid;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-slide-image,
    .hero-slide-content-inner,
    .hero-slider-prev,
    .hero-slider-next,
    .hero-slider-pagination .swiper-pagination-bullet {
        animation: none !important;
        transition: none !important;
    }
}
