/* Fonts */
body {
    font-family: 'Prata', serif;
    color: #333;
    overflow-x: hidden;
}

.serif-font {
    font-family: 'Prata', serif;
}

/* Navbar */
.main-navbar {
    background: rgba(0, 0, 0, 0.4);
    /* Transparent dark background */
    backdrop-filter: blur(10px);
    transition: background 0.3s;
    padding: 1rem 0;
}

.main-navbar.scrolled {
    background: #000;
}

.navbar-brand .brand-text {
    line-height: 1.2;
    color: #fff;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    margin: 0 10px;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff !important;
}

.small-icon {
    font-size: 0.7rem;
    vertical-align: middle;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh;
    /* Adjust height based on preference */
    overflow: hidden;
}

.carousel-item {
    height: 90vh;
}

.hero-img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
    /* Darken image for better text readability */
}

.carousel-caption {
    bottom: 20%;
    z-index: 2;
}

.main-title {
    font-family: 'Prata', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.date-badge {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Slider Controls */
.slider-controls button {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.slider-controls button:hover {
    background: #fff;
    color: #000;
}

/* Info & Stats Section */
.info-stats-section {
    background: #fff;
}

.small-text {
    font-size: 0.9rem;
    line-height: 1.6;
}

.stats-number {
    font-family: 'Prata', serif;
    color: #1a3c70;
    /* Deep blue from default bootstrap primary or custom */
}

.stats-label {
    font-size: 0.9rem;
    line-height: 1.4;
}


/* Achievements Refined */
.accordion-item {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.accordion-button {
    font-size: 1.1rem;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    color: #1a3c70;
    padding-left: 10px;
    /* Indent on active */
    background-color: transparent;
    box-shadow: none;
}

.accordion-button:hover {
    padding-left: 10px;
    color: #1a3c70;
}

.partner-logo {
    height: 35px;
    /* Slightly larger but contained */
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
    cursor: pointer;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.achievement-img-wrapper {
    overflow: hidden;
    border-radius: 20px;
    /* More rounded */
    max-height: 400px;
    /* Constraint height */
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.achievement-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.achievement-img-wrapper:hover .achievement-img {
    transform: scale(1.05);
    /* Gentle zoom */
}

/* Play button ripple refined */
.play-btn-wrapper {
    cursor: pointer;
    z-index: 10;
}

.play-btn-inner {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.play-btn-wrapper:hover .play-btn-inner {
    transform: scale(1.1);
}

.play-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* News Section */
.news-section {
    background-color: #f8f9fa;
}

.news-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #fff;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.news-img-wrapper {
    overflow: hidden;
    position: relative;
    height: 250px;
}

.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover img {
    transform: scale(1.1);
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.news-card:hover .news-overlay {
    opacity: 1;
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.news-card:hover .card-title {
    color: #1a3c70;
    /* Change title color on hover */
}

.btn-link {
    color: #333;
    transition: color 0.3s;
}

.news-card:hover .btn-link {
    color: #1a3c70;
}

/* Footer */
footer {
    background: transparent;
}

/* Colors */
.text-primary {
    color: #1a3c70 !important;
    /* Overriding bootstrap primary for text */
}

/* Events Section */
.event-card {
    height: 180px;
    cursor: pointer;
}

.event-card .card-img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    filter: brightness(0.6);
}

.event-card:hover .card-img {
    transform: scale(1.05);
    filter: brightness(0.4);
}

.btn-circle-arrow {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.event-card:hover .btn-circle-arrow {
    background: #fff;
    color: #000;
    opacity: 1;
}

/* Documents Section */
.transition-base {
    transition: all 0.5s ease-in-out;
}

.docs-slider-row {
    margin-right: -1rem;
    margin-left: -1rem;
}

.doc-card {
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: #1a3c70 !important;
}

.doc-nav-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.doc-nav-btn:hover {
    background-color: #1a3c70 !important;
    border-color: #1a3c70 !important;
    color: #fff !important;
    transform: scale(1.05);
    /* Slight scale up instead of rotation */
    box-shadow: 0 5px 15px rgba(26, 60, 112, 0.3);
}

.doc-icon {
    color: #333;
    transition: color 0.3s;
}

.doc-card:hover .doc-icon {
    color: #1a3c70;
}

/* Video Section */
.video-card {
    height: 250px;
    cursor: pointer;
}

.video-thumb {
    transition: transform 0.6s ease;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.8));
    opacity: 0.9;
    transition: opacity 0.3s;
}

.video-card:hover .video-thumb {
    transform: scale(1.1);
    /* Moving image animation */
}

.play-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.video-card:hover .play-btn {
    transform: scale(1.1);
}


/* Laws & Decrees Section Refined */
.laws-section {
    background-color: #f8f9fa;
    padding-top: 5rem;
}

.law-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    min-height: 140px;
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    /* Default light background */
    cursor: pointer;
}

/* Background Image Handling */
.law-card .law-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.4s ease;
    z-index: 0;
    filter: brightness(0.4);
    /* Darken for text readability */
}

.law-card:hover .law-bg-image {
    opacity: 1;
    /* Show on hover */
}

.law-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.law-date {
    width: 140px;
    background-color: #fff;
    flex-shrink: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.law-card:hover .law-date {
    background-color: rgba(255, 255, 255, 0.9) !important;
    /* Ensure legibility against dark BG */
    color: #000 !important;
}

.law-card:hover .law-date .text-muted {
    color: #6c757d !important;
    /* Keep muted text as is */
}

.law-content {
    background-color: transparent;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.law-content h5,
.law-content p {
    transition: color 0.3s;
}

.law-card:hover .law-content h5 {
    color: #fff;
}

.law-card:hover .law-content p {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* 3rd Card specific overrides handled in HTML via classes or nth-child if needed, 
   but specific background fit coverage */
.law-card.bg-image {
    position: relative;
}

.law-card.bg-image .law-date {
    background: rgba(255, 255, 255, 0.9);
}

.collage-row img {
    height: 280px;
    /* Reduced height as requested */
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.6s ease;
    filter: grayscale(40%) brightness(0.9);
}

.collage-item {
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.collage-item:hover img {
    transform: scale(1.1);
    filter: grayscale(0%) brightness(1);
}

.collage-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 60, 112, 0.2);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.collage-item:hover::after {
    opacity: 1;
}

/* Floating Card for Laws Section */
.floating-card-section {
    margin-top: -30px;
    /* Reduced overlap for better spacing */
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    position: relative;
    z-index: 10;
}

/* "View All" Button circle wrapper */
.btn-primary.rounded-circle {
    box-shadow: 0 10px 20px rgba(26, 60, 112, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary.rounded-circle:hover {
    transform: scale(1.1) rotate(45deg);
    /* playful rotation */
}

.collage-banner {
    margin-bottom: 0 !important;
}

.footer-group-shared-bg {
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
    /* Match section background for the top part */
}

.footer-group-shared-bg .footer-bg-image {
    top: 400px !important;
    /* Raised by ~50px from 450px */
    height: calc(100% - 400px) !important;
}

.main-footer,
.main-footer p,
.main-footer ul li,
.main-footer ul li a,
.main-footer .text-white-50 {
    color: #ffffff !important;
}

.main-footer {
    font-size: 0.9rem;
}

.footer-overlay {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
}

.footer-bg-image img {
    filter: brightness(0.8);
}

.footer-branding {
    transform: translateY(-15px);
}

.footer-sub-input::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

.social-links .btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s;
}

.social-links .btn:hover {
    background: #1a3c70;
    border-color: #1a3c70;
    transform: translateY(-3px);
}

.main-footer h5 {
    letter-spacing: 0.5px;
    font-size: 1.1rem;
}

#achievementsAccordion .accordion-item {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: #fff;
    transition: all 0.3s ease;
}

#achievementsAccordion .accordion-item:hover {
    border-color: #1a3c70 !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

#achievementsAccordion .accordion-button:not(.collapsed) {
    color: #1a3c70;
    box-shadow: none;
    background: rgba(26, 60, 112, 0.03);
}

#achievementsAccordion .accordion-button:focus {
    box-shadow: none;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
}

.historySwiper .swiper-slide {
    display: block;
    text-align: left;
}

/* Info Sections */
.info-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.info-section-title {
    font-family: 'Prata', serif;
    font-size: 1.75rem;
    margin-bottom: 0;
}

.partners-logo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.participant-logo-item {
    text-align: center;
    max-width: 120px;
}

.participant-logo-item img {
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.participant-logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.event-stars {
    color: #ffd700;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.mission-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.mission-item {
    flex: 1;
    padding-left: 2rem;
    border-left: 1px solid #eee;
}

.mission-item:first-child {
    border-left: none;
    padding-left: 0;
}

.mission-icon {
    font-size: 2rem;
    color: #1a3c70;
    margin-bottom: 1rem;
}

.history-timeline {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.timeline-item {
    flex: 1;
}

.timeline-year {
    font-family: 'Prata', serif;
    font-size: 2rem;
    color: #1a3c70;
    margin-bottom: 0.5rem;
}

.timeline-text {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

.main-footer ul li {
    margin-bottom: 0.5rem;
}

.main-footer ul li a {
    transition: color 0.2s;
}

.main-footer ul li a:hover {
    color: #fff !important;
    padding-left: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2rem;
    }

    .carousel-item {
        height: 70vh;
    }

    .hero-section {
        height: 70vh;
    }

    .slider-controls {
        display: none !important;
    }
}

/* Contact Section Refined */
.contact-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

.contact-card .text-primary {
    transition: all 0.4s ease;
    display: inline-block;
}

.contact-card:hover .text-primary {
    transform: scale(1.2) rotate(5deg);
    color: #1a3c70;
}

.contact-card h5 {
    transition: color 0.3s;
}

.contact-card:hover h5 {
    color: #1a3c70;
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1) rotate(0deg) !important;
    background: #1a3c70;
    border-color: #1a3c70;
}

.back-to-top:hover i {
    transform: rotate(0deg) !important;
}

@media (max-width: 991px) {

    .mission-row,
    .history-timeline {
        flex-direction: column;
        gap: 2rem;
    }

    .mission-item {
        border-left: none;
        padding-left: 0;
        border-bottom: 1px solid #eee;
        padding-bottom: 2rem;
    }

    .mission-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .partners-logo-grid {
        gap: 1.5rem;
        justify-content: center;
    }
}

/* Stagger Delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

.delay-400 {
    transition-delay: 0.4s;
}

.delay-500 {
    transition-delay: 0.5s;
}

/* Payment Logos Hover Effects */
.payment-logo-img {
    transition: all 0.4s ease;
    filter: grayscale(1) opacity(0.7);
    cursor: pointer;
}

.payment-logo-img:hover {
    filter: grayscale(0) opacity(1) !important;
    transform: scale(1.05);
}

.payment-logo-light {
    filter: grayscale(1) brightness(2) contrast(1.2);
}

.payment-logo-light:hover {
    filter: grayscale(0) brightness(1) contrast(1) !important;
}

/* --- Membership Page Styles --- */
.gym-hero {
    height: 400px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    padding-top: 80px;
}

.membership-section {
    padding: 80px 0;
    background: #fff;
}

.membership-card {
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    z-index: 1;
    cursor: pointer;
}

.membership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../rasm/qonunlar/law_hover.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: -1;
    filter: brightness(0.3);
    transform: scale(1.1);
}

.membership-card:hover::before {
    opacity: 1;
    transform: scale(1);
}

.membership-card:hover {
    color: #fff !important;
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.membership-card:hover .text-primary,
.membership-card:hover .text-secondary,
.membership-card:hover .text-muted,
.membership-card:hover h3 {
    color: #fff !important;
}

.membership-card:hover .price-box {
    background: rgba(255, 255, 255, 0.15);
}

.membership-card:hover .price-val {
    color: #fff !important;
}

.student-card {
    background: #f8f9fa;
    border: 1px solid #eee;
}

.teacher-card {
    background: #1a3c70;
    color: #fff;
    box-shadow: 0 20px 40px rgba(26, 60, 112, 0.2);
}

.price-box {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.teacher-card .price-box {
    background: rgba(255, 255, 255, 0.1);
}

.price-val {
    font-size: 3rem;
    font-weight: 700;
    color: #1a3c70;
    font-family: 'Prata', serif;
}

.teacher-card .price-val {
    color: #fff;
}

.price-sub {
    font-size: 1rem;
    color: #666;
}

.teacher-card .price-sub {
    color: #aaa;
}

.features-list {
    list-style: none;
    padding: 0;
}

.features-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.features-list li i {
    position: absolute;
    left: 0;
    color: #1a3c70;
    top: 2px;
}

.teacher-card .features-list li i {
    color: #fff;
}

.btn-membership {
    padding: 15px 30px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.btn-student {
    background: #2d2d2d;
    color: #fff;
    border: none;
}

.btn-teacher {
    background: #fff;
    color: #1a3c70;
    border: none;
}

.btn-membership:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

.hover-float {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.hover-float:hover {
    transform: translateY(-15px) scale(1.02) !important;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2) !important;
}


.section-tag {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #1a3c70;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.section-tag::before,
.section-tag::after {
    content: '';
    width: 40px;
    height: 1px;
    background: #1a3c70;
    opacity: 0.3;
}