body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background: #181818;
    color: #fff;
}

.hero {
    background: linear-gradient(120deg, #1a1a1a 80%, #e63946 100%);
    text-align: center;
    padding: 60px 0 40px 0;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hero p {
    font-size: 1.2em;
    color: #ccc;
}

.slider {
    max-width: 900px;
    margin: 30px auto;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.slides {
    display: flex;
    transition: transform 0.5s;
}

.slide {
    position: relative;
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s;
}

.slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(24, 24, 24, 0.85) 80%, rgba(24, 24, 24, 0.2) 100%);
    color: #fff;
    padding: 24px 24px 16px 24px;
    font-size: 1.1em;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.slide-caption h3 {
    margin: 0 0 6px 0;
    color: #e63946;
    font-size: 1.3em;
}

.slider-dots {
    text-align: center;
    position: absolute;
    bottom: 15px;
    width: 100%;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 4px;
    background: #fff8;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #e63946;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #e63946cc;
    border: none;
    color: #fff;
    font-size: 2em;
    padding: 0 15px;
    cursor: pointer;
    border-radius: 50%;
}

.slider-btn.left {
    left: 10px;
}

.slider-btn.right {
    right: 10px;
}

.news-description {
    background-color: #ffffff10;
    border-radius: 15px;
    padding: 1rem;
    text-align: justify;
    max-height: 12rem; /* حدود 5 خط با line-height 1.5em */
    overflow-y:scroll;
    line-height: 1.5em;
    scrollbar-width: none;
    font-weight:400;
}

.newsletter,
.section {
    max-width: 1000px;
    margin: 40px auto;
    background: #222;
    border-radius: 8px;
    box-shadow: 0 2px 8px #0002;
    padding: 30px;
}

.newsletter h2,
.section h2 {
    color: #e63946;
    margin-top: 0;
}

.newsletter input,
.newsletter select,
.newsletter textarea {
    margin: 5px;
    padding: 8px;
    border-radius: 4px;
    border: none;
    width: 90%;
    max-width: 350px;
}

.newsletter button {
    background: #e63946;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    font-size: 1em;
    margin-top: 10px;
    cursor: pointer;
}

.events,
.news,
.fighters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.card {
    background: #181818ad !important;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    padding: 20px;
    flex: 1 1 250px;
    min-width: 250px;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 2px 8px #0002;
    border-radius: 15px !important;
}

.card h5{
    text-align: center !important;
    padding: 2%;
}



.card img {
    max-width: 100%;
    width: 14rem;
    height: 12rem;
    border-radius: 8px;
    margin-bottom: 10px;
    border-radius: 10px;
}



.socials {
    text-align: center;
    margin: 20px 0;
}

.socials a {
    color: #e63946;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.2s;
}

.socials a:hover {
    color: #fff;
}

.footer {
    background: #111;
    color: #ccc;
    text-align: center;
    padding: 30px 0 10px 0;
    margin-top: 40px;
    font-size: 0.95em;
}

.footer a {
    color: #e63946;
    text-decoration: none;
    margin: 0 10px;
}

#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 999;
}

@media (max-width: 900px) {

    .events,
    .news,
    .fighters {
        flex-direction: column;
        align-items: center;
    }

    .slider {
        height: 200px;
    }

    .slide {
        height: 200px;
    }
}


.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.gallery-caption {
    text-align: center;
    font-size: 14px;
    margin-top: 8px;
    color: #fff;   /* 👈 از #444 به سفید تغییر کرد */
    font-weight: 500;
    opacity: 0; /* پنهان در حالت عادی */
    transition: opacity 0.3s;
}
.gallery-item:hover .gallery-caption {
    opacity: 1; /* نمایش آرام روی هاور */
}


.gallery-grid img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px #0005;
}

.gallery-item {
    position: relative;
    width: 100%;
    height: 260px; /* ارتفاع یکسان کارت */
    overflow: hidden;
    border-radius: 10px;
}


.gallery-item figure {
    width: 100%;
    height: 100%;
    margin: 0;
}


.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* کارت را کامل پر می‌کند */
}


@media (max-width: 600px) {
    .gallery-item {
        height: 200px;
    }
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 8px 10px;
    text-align: center;
    font-size: 15px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45); /* شیشه‌ای نیمه‌تیره */
    backdrop-filter: blur(2px); /* جلوه حرفه‌ای */
}

.gallery-item:hover img {
    transform: scale(1.07);
}
.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}


.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.lightbox img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 4px 32px #000a;
}

.lightbox.active {
    display: flex;
}

.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.licenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.license-card {
    background: #181818;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px #0002;
}

.license-card img {
    width: 100%;
    max-width: 160px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.contact-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 0;
}

.contact-info {
    background: #181818;
    border-radius: 10px;
    padding: 24px 32px;
    min-width: 260px;
    flex: 1 1 300px;
    max-width: 370px;
    box-shadow: 0 2px 8px #0002;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-item {
    margin-bottom: 18px;
    font-size: 1.1em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item i {
    color: #e63946;
    font-size: 1.2em;
}

.contact-form {
    background: #181818;
    border-radius: 10px;
    padding: 32px 24px 24px 24px;
    min-width: 280px;
    flex: 1 1 340px;
    max-width: 420px;
    box-shadow: 0 2px 8px #0002;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-group {
    position: relative;
    margin-bottom: 28px;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 12px 14px 38px;
    border: none;
    border-radius: 6px;
    background: #222;
    color: #fff;
    font-size: 1em;
    outline: none;
    transition: background 0.2s, box-shadow 0.2s, border 0.2s;
    box-shadow: 0 0 0 0 #e6394600;
}

.contact-form input:focus,
.contact-form textarea:focus {
    background: #232323;
    box-shadow: 0 0 0 2px #e63946cc;
    border: 1px solid #e63946;
}

.contact-form label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 0.98em;
    pointer-events: none;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 7px;
    background: transparent;
}

.contact-form input:focus+label,
.contact-form input:not(:placeholder-shown)+label,
.contact-form textarea:focus+label,
.contact-form textarea:not(:placeholder-shown)+label {
    top: -12px;
    left: 6px;
    background: #181818;
    padding: 0 6px;
    color: #e63946;
    font-size: 0.92em;
}

.contact-form button {
    width: 100%;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.contact-form button:hover {
    background: #c92c3a;
}

.spinner {
    border: 3px solid #fff;
    border-top: 3px solid #e63946;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.contact-success {
    display: none;
    color: #fff;
    background: #27ae60;
    border-radius: 6px;
    padding: 14px 10px;
    margin-top: 18px;
    text-align: center;
    font-weight: bold;
    font-size: 1.08em;
    box-shadow: 0 2px 8px #0002;
}

.contact-success i {
    color: #fff;
    margin-right: 8px;
    font-size: 1.2em;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .contact-flex {
        flex-direction: column;
        align-items: stretch;
        font-size: x-small;
    }

    .contact-info,
    .contact-form {
        min-width: unset;
        max-width: 100%;
    }
}

.contact-map-card {
    background: #181818;
    border-radius: 10px;
    margin: 0;
    max-width: 420px;
    flex: 1 1 340px;
    box-shadow: 0 2px 8px #0002;
    padding: 20px 20px 16px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
}

.map-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}

@media (max-width: 1100px) {
    .contact-flex {
        flex-direction: column;
        gap: 24px;
    }

    .contact-info,
    .contact-form,
    .contact-map-card {
        max-width: 100%;
        min-width: unset;
    }
}

@media (max-width: 700px) {
    .contact-map-card {
        padding: 10px 2vw 8px 2vw;
    }
}

.section-readmore {
    text-align: left;
    margin-top: 18px;
    margin-left: 0;
}

.readmore-btn {
    display: inline-block;
    background: #e63946;
    color: #fff;
    padding: 5px 18px;
    border-radius: 5px;
    font-size: 0.98em;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 1px 4px #0001;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}

.readmore-btn:hover {
    background: #c92c3a;
    color: #fff;
    box-shadow: 0 2px 8px #e6394633;
}

.news .card {
    background: linear-gradient(135deg, #232526 60%, #e63946 120%);
    border-radius: 18px;
    box-shadow: 0 6px 24px #e6394622, 0 2px 12px #0002;
    padding: 32px 24px;
    flex: 1 1 320px;
    /* min-width: 260px; */
    max-width: 370px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.news .card:hover {
    transform: translateY(-10px) scale(1.04);
    box-shadow: 0 12px 36px #e6394644, 0 2px 12px #0004;
}

.news .card h5 {
    color: #fff;
    font-size: 1.4em;
    margin-bottom: 14px;
    text-align: center;
    letter-spacing: 1px;
    font-weight: bold;
    text-shadow: 0 2px 8px #e6394622;
}

.news-description {
    color: #f1f1f1;
    font-size: 1em;
    line-height: 1.7em;
    text-align: justify;
    background: #ffffff18;
    border-radius: 10px;
    padding: 1rem;
    max-height: 8em;
    overflow-y: auto;
    margin-bottom: 14px;
    scrollbar-width: none;
    box-shadow: 0 2px 8px #0001;
}

.news .card-text {
    color: #e63946;
    font-size: 0.98em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-weight: 500;
}

.news .card-text i {
    color: #fff;
    background: #e63946;
    border-radius: 50%;
    padding: 4px;
    font-size: 1em;
}

.news .card div {
    color: #e63946;
    font-size: 0.98em;
    margin-bottom: 8px;
    text-align: left;
    font-weight: 500;
}

@media (max-width: 900px) {
    .news {
        flex-direction: column;
        /* align-items: center; */
        gap: 24px;
    }
    .news .card {
        max-width: 100%;
    }
}