/* ========== TUTOR LISTING BY COUNTRY - SPECIFIC STYLES ========== */

/* Filter Section Styles */
#desktop-filter-section {
    position: relative !important;
    z-index: 200 !important;
    background: #ffffff !important;
    transition: box-shadow 0.3s ease, position 0.3s ease;
}

/* When scrolled to filter section, make it fixed */
#desktop-filter-section.fixed-to-top {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 15px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Fallback for browsers that don't support :has() */
#desktop-filter-section.fixed-to-top ~ section .tutor-cards-col,
#desktop-filter-section.fixed-to-top + section .tutor-cards-col {
    padding-top: 120px !important;
}

.si-filter-wrapper {
    position: relative;
}

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

.si-filter-clear-container {
    animation: fadeIn 0.3s ease;
}

.si-filter-clear-container.filters-open {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Page Header Styles */
.si-container {
    max-width: 1200px;
    margin: 0 auto;
}

.si-hero-section {
    margin-top: -10px !important;
    background: linear-gradient(135deg, #0056b3, #0066cc, #2691e4, #4da6ff);
    position: relative;
    padding: 60px 0 140px 0; /* Increase padding for waves */
    color: #ffffff;
    margin-bottom: 0;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Subtle Geometric Pattern Overlay */
.si-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.4) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    opacity: 0.6;
    z-index: 1;
}

/* Wave Container */
.si-hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px; /* Adjust based on preference */
    overflow: hidden;
    line-height: 0;
    z-index: 2;
}

.waves {
    position: relative;
    width: 100%;
    height: 100px;
    margin-bottom: -7px; /* Fix gap */
    min-height: 100px;
    max-height: 150px;
}

/* Animation */
.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}

@keyframes move-forever {
    0% { transform: translate3d(-90px,0,0); }
    100% { transform: translate3d(85px,0,0); }
}

.si-hero-wrapper {
    margin-top: 90px !important;
    margin-bottom: 35px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
}

.si-hero-content {
    flex: 1;
    z-index: 2; /* Ensure text is above background */
    position: relative;
}

.si-hero-title {
    font-size: 32px; /* Increased size like reference */
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.si-hero-title span {
    color: #ffffff; /* Keep white to match reference */
    display: block; /* Stack if needed or inline */
}

.si-hero-subtext {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    max-width: 600px;
}

.si-hero-image {
    flex: 0 0 350px; /* Give more space for the blob */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Organic Blob Shape Background */
/* Logo Replacement for Blob */
/* Cloud/Blob with Image Background */
.si-hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 320px;
    background: url('../../../assets/img/listing-hero-section.avif') no-repeat center center;
    background-size: cover;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: 1;
    animation: blob-float 8s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.si-hero-image img {
    max-width: 100%;
    width: 280px; /* Slightly larger image */
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    position: relative;
    z-index: 2;
    /* Remove box shadow from image itself if previously added, let blob handle depth */
}

@keyframes blob-float {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    33% { border-radius: 20% 80% 30% 70% / 50% 30% 70% 50%; }
    66% { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; }
}

.si-hero-illustration {
    font-size: 180px;
    color: #0066cc;
    opacity: 0.1;
    transform: rotate(-10deg);
}

@media (max-width: 991px) {
    .si-hero-section {
        padding: 10px 0 15px 0;
    }
    
    .si-hero-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        margin-bottom: 90px !important;
    }
    
    .si-hero-content {
        max-width: 100%;
    }
    
    .si-hero-image {
        display: none;
    }
    
    .si-hero-title {
        font-size: 22px;
    }
    
    .si-hero-subtext {
        font-size: 15px;
    }
}

.si-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.si-breadcrumb ol {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.si-breadcrumb li {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
}

.si-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin: 0 6px;
    color: #9ca3af;
}

.si-breadcrumb a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.si-breadcrumb a:hover {
    color: #0052a3;
    text-decoration: underline;
}

.si-h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.si-lead {
    font-size: 18px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.si-section-title {
    font-size: 38px;
    font-weight: 800;
    color: #111827;
    text-align: center;
    margin-bottom: 70px;
    letter-spacing: -0.01em;
    position: relative;
    display: inline-block;
    width: 100%;
}

.si-how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.si-how-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 45px 35px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid rgba(0, 102, 204, 0.03);
    overflow: hidden;
    height: 100%;
    z-index: 1;
}

.si-how-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #0066cc, #00c6ff);
    z-index: 2;
}

.si-how-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 102, 204, 0.15);
}

.si-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e6f0ff 0%, #f0f7ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: #0066cc;
    font-size: 32px;
    transition: transform 0.4s ease;
}

.si-how-card:hover .si-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: #0066cc;
    color: #ffffff;
}

.si-how-step {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    font-weight: 900;
    color: rgba(0, 102, 204, 0.05);
    line-height: 1;
    z-index: 0;
    transition: all 0.4s ease;
}

.si-how-card:hover .si-how-step {
    color: rgba(0, 102, 204, 0.1);
    transform: scale(1.2);
}

.si-how-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    text-align: center;
}

.si-how-card p {
    font-size: 16px;
    color: #555;
    line-height: 1.7;
    margin: 0;
    text-align: center;
}

/* Why Choose Section */
.si-why-section {
    padding: 100px 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.si-why-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border-radius: 24px;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(0, 68, 153, 0.3);
    text-align: center;
    color: #ffffff;
}

.si-why-wrap::before {
    content: '\f132'; /* FontAwesome shield icon */
    font-family: 'FontAwesome';
    position: absolute;
    top: -30px;
    left: -30px;
    font-size: 200px;
    color: rgba(255, 255, 255, 0.05);
    transform: rotate(-15deg);
    pointer-events: none;
}

.si-why-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.1) 1px, transparent 0);
    background-size: 30px 30px;
    opacity: 0.3;
    pointer-events: none;
}

.si-why-section .si-section-title {
    color: #ffffff;
    margin-bottom: 30px;
    z-index: 1;
    position: relative;
}

.si-why-desc {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin: 0 auto;
    max-width: 800px;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.si-why-grid {
    display: none; 
}

/* Enhancements for Responsive Design */
@media (max-width: 991px) {
    .si-how-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .si-why-wrap {
        padding: 40px 30px;
        margin: 0 20px;
    }
}



/* Note: All filter styles are inherited from tutor_listing_style_v1.css */
/* This file only contains country-specific page styles (breadcrumb, sections, etc.) */

/* Responsive Styles */
@media (max-width: 768px) {
    .si-h1 {
        font-size: 24px;
    }

    .si-lead {
        font-size: 16px;
    }

    .si-section-title {
        font-size: 24px;
        margin-bottom: 32px;
    }

    .si-how-grid,
    .si-why-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 500px; /* improvement: limiting width on mobile for better readability */
        margin-left: auto;
        margin-right: auto;
    }

    .si-how-card,
    .si-why-card {
        padding: 30px 20px;
    }

    .si-breadcrumb {
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .si-container {
        padding: 0 16px;
    }

    .si-page-header {
        padding: 16px 0;
    }

    .si-h1 {
        font-size: 20px;
    }

    .si-how-section,
    .si-why-section {
        padding: 40px 0;
    }
}

/* Pagination Styles */
.si-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin:20px auto;
    padding: 0 20px;
    width: 100%;
    max-width: 100%;
    text-align: center;
}

.tutor-cards-col .si-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

.si-pagination-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.si-pagination-list li {
    margin: 0;
    padding: 0;
}

.si-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.si-pagination-link:hover:not(.si-pagination-disabled):not(.si-pagination-active) {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #0066cc;
    transform: translateY(-1px);
}

.si-pagination-link.si-pagination-active {
    background: #0066cc;
    border-color: #0066cc;
    color: #ffffff;
    font-weight: 600;
    cursor: default;
}

.si-pagination-link.si-pagination-disabled {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.si-pagination-prev,
.si-pagination-next {
    min-width: auto;
    padding: 0 16px;
    font-weight: 500;
}

.si-pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    font-size: 14px;
    color: #6b7280;
    user-select: none;
}
.sticky-top-bar{
    position: absolute !important;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .si-pagination {
        margin: 20px 0;
        padding: 0 16px;
    }

    .si-pagination-list {
        gap: 6px;
    }

    .si-pagination-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }

    .si-pagination-prev,
    .si-pagination-next {
        padding: 0 12px;
        font-size: 13px;
    }

    /* Hide all page numbers and ellipsis on mobile, show only prev/next buttons and adjacent pages */
    .si-pagination-list li {
        display: none !important;
    }
    
    /* Show prev button (first child) */
    .si-pagination-list li:first-child {
        display: list-item !important;
    }
    
    /* Show previous page number */
    .si-pagination-list li.si-pagination-prev-page {
        display: list-item !important;
    }
    
    /* Show current page number (active) */
    .si-pagination-list li.si-pagination-current-item {
        display: list-item !important;
    }
    
    /* Show next page number */
    .si-pagination-list li.si-pagination-next-page {
        display: list-item !important;
    }
    
    /* Show next button (last child) */
    .si-pagination-list li:last-child {
        display: list-item !important;
    }
}

@media (max-width: 480px) {
    .si-pagination-link {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 12px;
    }

    .si-pagination-prev,
    .si-pagination-next {
        padding: 0 10px;
        font-size: 12px;
    }
    
    /* Hide all page numbers and ellipsis on mobile, show only prev/next buttons and adjacent pages */
    .si-pagination-list li {
        display: none !important;
    }
    
    /* Show prev button (first child) */
    .si-pagination-list li:first-child {
        display: list-item !important;
    }
    
    /* Show previous page number */
    .si-pagination-list li.si-pagination-prev-page {
        display: list-item !important;
    }
    
    /* Show current page number (active) */
    .si-pagination-list li.si-pagination-current-item {
        display: list-item !important;
    }
    
    /* Show next page number */
    .si-pagination-list li.si-pagination-next-page {
        display: list-item !important;
    }
    
    /* Show next button (last child) */
    .si-pagination-list li:last-child {
        display: list-item !important;
    }
}

/* Breadcrumb Bottom Styles */
.si-breadcrumb-bottom {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    text-align: left !important;
}

.tutor-cards-col .si-breadcrumb-bottom,
.col-md-12 .si-breadcrumb-bottom {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

.si-breadcrumb-list {
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    width: auto !important;
}

.si-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.si-breadcrumb-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.si-breadcrumb-link:hover {
    color: #0052a3;
    background: #f3f4f6;
    text-decoration: none;
}

.si-breadcrumb-current {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
}

.si-breadcrumb-separator {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 400;
    margin: 0 4px;
    user-select: none;
}

/* Responsive Breadcrumb */
@media (max-width: 768px) {
    .si-breadcrumb-bottom {
        margin: 24px auto 32px;
        padding: 0 16px;
    }

    .si-breadcrumb-link,
    .si-breadcrumb-current {
        font-size: 13px;
        padding: 3px 6px;
    }

    .si-breadcrumb-separator {
        font-size: 13px;
        margin: 0 3px;
    }
}

@media (max-width: 480px) {
    .si-breadcrumb-bottom {
        margin: 20px auto 24px;
        padding: 0 12px;
    }

    .si-breadcrumb-link,
    .si-breadcrumb-current {
        font-size: 12px;
        padding: 2px 4px;
    }

    .si-breadcrumb-separator {
        font-size: 12px;
        margin: 0 2px;
    }
}

/* Add spacing to content below when filter is fixed */
@media (min-width: 768px) {
    body:has(#desktop-filter-section.fixed-to-top) .tutor-cards-col {
        padding-top: 120px !important;
    }
}

/* Desktop and Mobile Filter Separation */
/* Hide desktop filters on mobile */
@media (max-width: 767px) {
    #desktop-filter-section {
        display: none !important;
    }
    
    /* Mobile filter sidebar is hidden by default, shown via JavaScript */
    #mobile-filter-sidebar {
        display: block !important;
    }
    
    /* Show mobile filter toggle button */
    #mobile-filter-toggle-btn {
        display: flex !important;
    }
}

/* Hide mobile filters on desktop, show desktop filters */
@media (min-width: 768px) {
    #desktop-filter-section {
        display: block !important;
    }
    
    #mobile-filter-sidebar,
    #mobile-filter-overlay {
        display: none !important;
    }
    
    #mobile-filter-toggle-btn {
        display: none !important;
    }
    .logo-desktop { display: inline-block !important; }
    .logo-mobile { display: none !important; }
}

/* Mobile Filter Sidebar Open State */
#mobile-filter-sidebar.mobile-filter-open {
    right: 0 !important;
}

#mobile-filter-overlay.mobile-filter-open {
    display: block !important;
    opacity: 1 !important;
}

.si-filter-clear-btn-mobile:hover {
    color: #0066cc !important;
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
}

/* ====================================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   Reduce animations and GPU-heavy effects on mobile
   ==================================================== */
@media (max-width: 767px) {
    /* Disable hover transforms on mobile */
    .si-how-card:hover,
    .si-how-card:hover .si-icon-wrapper,
    .si-how-card:hover .si-how-step {
        transform: none !important;
    }
    
    /* Simplify box-shadows for performance */
    .si-how-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }
    
    /* Disable wave animation on mobile for performance */
    .parallax > use {
        animation: none !important;
    }
    
    /* Hide waves section entirely on mobile for faster LCP */
    .si-hero-waves {
        display: none !important;
    }
    
    /* Disable gradient animation */
    .si-hero-section {
        animation: none !important;
    }
    
    /* Disable blob animation */
    .si-hero-image::before {
        animation: none !important;
    }
}

/* Respect user's reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
