/* ================================================
   RAYAN DEZH WEBSITE - STYLESHEET
   ================================================ */

/* --- Variables & Reset --- */
:root {
    --primary-color: #0f2b46;
    --accent-color: #f9a825;
    --text-dark: #333333;
    --text-light: #f4f4f4;
    --bg-light: #ffffff;
    --bg-gray: #f8f9fa;
    --font-main: 'Vazirmatn', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; }

/* --- Layout Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 32px 0;
}

.compact-section {
    padding: 22px 0;
}

.section-title {
    font-size: 1.7rem;
    color: var(--primary-color);
    margin-bottom: 14px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background: var(--accent-color);
    margin-top: 10px;
}

.section-subtitle {
    margin-bottom: 20px;
    color: #666;
    font-size: 0.92rem;
}

.text-center { text-align: center; }
.justified { text-align: justify; line-height: 1.8; }

.bg-gray { background-color: var(--bg-gray); }
.bg-light { background-color: var(--bg-light); }

.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mt-25 { margin-top: 25px; }
.mt-35 { margin-top: 35px; }
.mt-40 { margin-top: 40px; }

/* --- Header & Nav --- */
header {
    background-color: transparent;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    padding: 15px 0;
}

header.scrolled {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.header-solid {
    background-color: var(--primary-color);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i { color: var(--accent-color); }

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 400;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.hamburger-menu {
    display: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Section --- */
#hero {
    height: auto;
    flex: 1;
    min-height: 300px;
    padding: 90px 0 30px;
    background-image: url('image.avif'); /* Demo Image */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 43, 70, 0.8), rgba(15, 43, 70, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--text-light);
}

.hero-title {
    font-size: 2.1rem;
    margin-bottom: 14px;
}

.hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 24px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons --- */
.btn {
    padding: 10px 24px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    margin: 0 10px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #e6951d;
}

.btn-outline {
    border: 2px solid var(--text-light);
    color: var(--text-light);
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--primary-color);
}

.btn-outline-dark {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-sm {
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* --- Home: About + Services Combo --- */
.about-services-combo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.service-card-horizontal {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 14px;
    border-right: 4px solid var(--accent-color);
    transition: var(--transition);
}

.service-card-horizontal:hover {
    transform: translateX(-10px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-right-color: var(--primary-color);
}

.service-card-horizontal i {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.service-card-horizontal h3 {
    margin-bottom: 6px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.service-card-horizontal p {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.65;
    margin: 0;
    text-align: justify;
}

.service-card-horizontal:last-child {
    margin-bottom: 0;
}

/* --- Home: Single-Screen Layout --- */
.home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.home-projects__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.home-projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* --- Sub-Page Header (Mini Hero) --- */
.page-header {
    background-image: linear-gradient(rgba(15, 43, 70, 0.9), rgba(15, 43, 70, 0.8)), url('image2.jfif');
    background-size: cover;
    background-position: center;
    height: auto;
    min-height: 190px;
    padding: 90px 20px 40px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
}

.page-header h1 {
    font-size: 1.8rem;
    line-height: 1.5;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-color);
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 15px;
}

.about-image {
    background-size: cover;
    background-position: center;
    height: 100%;
    min-height: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.lead-text {
    font-weight: 700;
    margin-bottom: 12px;
    color: #555;
}

.feature-list { margin-top: 14px; }

.feature-list li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-list i { color: var(--accent-color); }

.img-placeholder {
    width: 100%;
    height: 400px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 1.2rem;
    border-radius: 10px;
}

/* --- Vision & Mission Boxes --- */
.info-boxes {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.info-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-right: 5px solid var(--primary-color);
}

.info-box--accent {
    border-right-color: var(--accent-color);
}

.info-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-box h3 i {
    margin-left: 10px;
}

.info-box p {
    text-align: justify;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.8;
    margin: 0;
}

/* --- Team / Staff Section --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.team-card {
    background: var(--bg-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.team-img-container {
    width: 140px;
    height: 140px;
    margin: 26px auto 12px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.team-member-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.team-img-placeholder {
    font-size: 5rem;
    color: #94a3b8;
}

.team-info {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.team-info h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 5px;
}

.team-role {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: block;
}

.team-bio {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 20px;
    text-align: justify;
    flex-grow: 1;
}

.team-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 15px;
}

.team-socials a {
    color: var(--primary-color);
    font-size: 1.15rem;
    transition: var(--transition);
}

.team-socials a:hover {
    color: var(--accent-color);
}

/* --- Services Page --- */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-10px);
    border-top-color: var(--accent-color);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* --- Projects Page --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 200px;
}

.project-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
    color: white;
    padding: 20px;
    box-sizing: border-box;
    text-align: right;
}

.project-item:hover .project-overlay { bottom: 0; }
.project-item:hover img { transform: scale(1.1); }

/* --- Project Detail & Gallery --- */
.project-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    align-items: start;
}

.project-specs {
    background-color: var(--bg-gray);
    padding: 30px;
    border-radius: 10px;
    border-right: 4px solid var(--accent-color);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.specs-table td {
    padding: 9px 5px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.92rem;
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table td strong {
    color: var(--primary-color);
}

.project-description p {
    margin-bottom: 15px;
    text-align: justify;
}

.action-list li {
    align-items: flex-start;
    margin-bottom: 10px;
}

.action-list i {
    margin-top: 5px;
}

.action-list strong {
    white-space: nowrap;
    color: var(--primary-color);
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.gallery-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.gallery-card img:hover {
    filter: brightness(0.85);
}

.gallery-caption {
    padding: 15px;
    font-weight: bold;
    text-align: center;
    background-color: var(--bg-gray);
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* --- Lightbox Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-image-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 75vh;
    border-radius: 4px;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
}

.modal-close-btn:hover {
    color: var(--accent-color);
}

#modal-caption {
    margin: 15px auto;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    font-size: 1.1rem;
}

.modal-left-btn,
.modal-right-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 45px;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
    user-select: none;
    padding: 10px 20px;
    z-index: 2100;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.modal-left-btn { left: 20px; }
.modal-right-btn { right: 20px; }

.modal-left-btn:hover,
.modal-right-btn:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* --- Contact Page --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-box {
    background: var(--bg-gray);
    padding: 30px;
    border-radius: 10px;
}

.contact-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.contact-icon {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-main);
}

/* --- Laws Page --- */
.law-section {
    min-height: 50vh;
}

.law-intro {
    margin-bottom: 50px;
    color: #666;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    font-size: 1.1rem;
}

.law-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.law-card {
    padding: 30px;
    border-top-color: var(--accent-color);
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.law-card__icon {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.law-card__title {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.law-card p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

.law-card__link {
    margin-top: 25px;
    text-align: left;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 3px;
}

.law-card__link i {
    font-size: 0.8rem;
    margin-right: 5px;
}

/* --- Footer --- */
footer {
    background-color: #051626;
    color: #ccc;
    padding-top: 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a:hover { color: var(--accent-color); }

.footer-col ul li a i {
    font-size: 0.85rem;
    margin-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* --- Services Tabs --- */
.services-tabs {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.services-tabs__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}

.services-tabs__btn {
    padding: 10px 22px;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    background: transparent;
    color: var(--primary-color);
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.services-tabs__btn:hover {
    background: rgba(249, 168, 37, 0.15);
}

.services-tabs__btn.is-active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.services-tabs__body {
    width: 100%;
    max-width: 820px;
}

.services-tabs__panel {
    display: none;
    background: var(--bg-gray);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    border-top: 4px solid var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.services-tabs__panel.is-active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.services-tabs__icon {
    font-size: 2.6rem;
    color: var(--primary-color);
    margin-bottom: 14px;
}

.services-tabs__panel h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.services-tabs__panel > p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 18px;
}

.services-tabs__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
    text-align: right;
}

.services-tabs__list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-dark);
}

.services-tabs__list li i {
    color: var(--accent-color);
    margin-top: 4px;
}

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

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--accent-color);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.back-to-top:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* --- Scroll Animations --- */
.animate-on-scroll {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, visibility, transform;
}

.slide-up { transform: translateY(50px); }
.slide-in-right { transform: translateX(50px); }
.slide-in-left { transform: translateX(-50px); }
.zoom-in { transform: scale(0.9); }

.animate-on-scroll.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) translateX(0) scale(1);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

/* --- Responsiveness --- */
@media (max-width: 992px) {
    .about-services-combo { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hamburger-menu { display: block; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active { right: 0; }

    .about-grid { grid-template-columns: 1fr; }
    .contact-wrapper { grid-template-columns: 1fr; }
    .project-detail-grid { grid-template-columns: 1fr; }
    .home-projects__head { flex-direction: column; text-align: center; }
    .home-projects__grid { grid-template-columns: 1fr; }

    .hero-content h1 { font-size: 2rem; }

    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .modal-left-btn,
    .modal-right-btn {
        font-size: 30px;
        padding: 8px 12px;
    }

    .modal-left-btn { left: 5px; }
    .modal-right-btn { right: 5px; }
}
