/* Same design system as main site */
:root {
    --primary: #16337d;
    --secondary: #5075aa;
    --accent: #ffcc00;
    --dark: #0f2358;
    --light: #f8f9fa;
    --white: #fff;
    --gray: #666;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Cairo", sans-serif;
    direction: rtl;
    line-height: 1.7;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========== SCROLLBAR (same as main site) ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ffcc00;
}

::-webkit-scrollbar-thumb:hover {
    background: #16337d;
}

/* ========== HEADER (same as main page) ========== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: 0.3s;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

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

.logo img {
    height: 150px;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease, height 0.3s ease;
}

#header.show-logo .logo img {
    opacity: 1;
}

#header.scrolled .logo img {
    height: 90px;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-menu a {
    color: var(--primary);
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: 0.3s;
    position: relative;
}

#header.scrolled .nav-menu a {
    color: var(--primary);
}

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

.nav-menu a::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: 0.3s;
    border-radius: 2px;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 50%;
}

.menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    padding: 10px;
}

.menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    transition: 0.3s;
}

#header.scrolled .menu-btn span {
    background: var(--primary);
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        transition: 0.4s;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    }

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

    .nav-menu a {
        font-size: 1.2rem;
    }

    .menu-btn {
        display: flex;
    }
}

/* ========== HERO (full viewport, two-column layout like reference) ========== */
#hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-image: url("uploads/Dowalia\ backgrounds\ white-1.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-inner {
        grid-template-columns: 1.2fr 1fr;
    }
}

@media (max-width: 899px) {
    #hero {
        padding-top: 9rem;
        padding-bottom: 2rem;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .hero-text {
        text-align: center;
        padding: 0 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .hero-visual {
        order: -1;
        margin-bottom: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .hero-visual-shape {
        width: 150px;
        height: auto;
        max-width: 60%;
        margin: 0 15% 0 auto;
    }

    .hero-kicker {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    .hero-title {
        font-size: clamp(1.3rem, 4.5vw, 1.7rem);
        margin-bottom: 0.6rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .hero-cta {
        margin-bottom: 1.2rem;
    }

    .hero-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .hero-branches {
        gap: 0.75rem;
        justify-content: flex-start;
    }
}

.hero-text {
    text-align: right;
    color: var(--primary);
}

.hero-kicker {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 900;
    color: var(--primary);
    text-shadow: #ffcc00 1px 1px;
    margin-bottom: 0.75rem;
}

.hero-subtitle {
    font-size: 1rem;
    color: #333;
    margin-bottom: 1.5rem;
    max-width: 34rem;
}

.hero-cta {
    margin-bottom: 1.8rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2rem;
    border-radius: 999px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.hero-btn.primary {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hero-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.2);
}

.hero-branches {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.branch-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(22, 51, 125, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06);
    min-width: 0;
    width: fit-content;
}

.branch-item i {
    font-size: 1.25rem;
    color: var(--primary);
}

.branch-item span {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

.branch-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(22, 51, 125, 0.12), 0 10px 28px rgba(0, 0, 0, 0.08);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual-shape {
    width: 380px;
    height: auto;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    overflow: hidden;
    margin: 0 16% 0 auto;
}

.hero-main-image {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.branch-item {
    cursor: pointer;
}

.branch-item i {
    color: var(--primary);
}

/* ========== BRANCH POPUP (Vision / Mission / Core Values) ========== */
.branch-popup {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.branch-popup.active {
    opacity: 1;
    visibility: visible;
}

.branch-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.branch-popup-box {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 2rem 2rem 2rem 3rem;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.branch-popup.active .branch-popup-box {
    transform: scale(1);
}

.branch-popup-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    color: var(--primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.branch-popup-close:hover {
    background: var(--accent);
    color: var(--primary);
}

.branch-popup-title {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.branch-popup-body {
    color: var(--gray);
    line-height: 1.9;
    font-size: 1.05rem;
}

/* ========== مساقات الأكاديمية (Courses) ========== */
#courses {
    background: linear-gradient(180deg, #f8f9fc 0%, #fff 50%, #f8f9fc 100%);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.course-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(22, 51, 125, 0.08);
    border: 1px solid rgba(22, 51, 125, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    position: relative;
    overflow: hidden;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--accent) 0%, transparent 70%);
    opacity: 0.15;
    border-radius: 0 20px 0 100%;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(22, 51, 125, 0.12);
}

.course-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, #1e4a9e 100%);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
}

.course-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.course-card-excerpt {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.course-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}

.course-card-btn:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateX(-4px);
}

/* Course modal */
.course-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.course-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.course-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(22, 51, 125, 0.6);
    backdrop-filter: blur(4px);
}

.course-modal-box {
    position: relative;
    background: #fff;
    border-radius: 24px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.course-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--light);
    color: var(--primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 2;
    transition: background 0.3s, color 0.3s;
}

.course-modal-close:hover {
    background: var(--accent);
    color: var(--primary);
}

.course-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    padding: 1.5rem 2rem 0.75rem;
    padding-left: 4rem;
}

.course-modal-body {
    padding: 0 2rem 2rem;
    padding-left: 4rem;
    overflow-y: auto;
    color: var(--gray);
    line-height: 1.85;
    font-size: 1rem;
}

.course-modal-body h4 {
    color: var(--primary);
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
}

.course-modal-body ul {
    margin: 0.25rem 0 1rem;
    padding-right: 1.5rem;
}

.course-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}

.course-modal-body th,
.course-modal-body td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(22, 51, 125, 0.08);
    vertical-align: top;
}

.course-modal-body th {
    color: var(--primary);
    font-weight: 700;
    white-space: nowrap;
}

.course-modal-body .course-axis {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(22, 51, 125, 0.1);
}

.course-modal-body .course-axis:last-child {
    border-bottom: none;
}

.course-modal-footer {
    padding: 1rem 2rem 1.5rem;
    padding-left: 4rem;
    border-top: 1px solid rgba(22, 51, 125, 0.1);
    flex-shrink: 0;
}

.course-modal-register-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: var(--accent);
    color: var(--primary);
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    transition: background 0.3s, transform 0.2s;
}

.course-modal-register-btn:hover {
    background: #e6b800;
    transform: translateX(-4px);
}

@media (max-width: 992px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-modal-title,
    .course-modal-body {
        padding-left: 2rem;
    }

    .course-modal-footer {
        padding-left: 2rem;
    }
}

/* ========== SECTION STYLES ========== */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--primary);
    font-weight: 800;
}

/* Section header on dark background (like CTA) */
.section-header.light .section-badge {
    background: var(--accent);
    color: var(--primary);
}

.section-header.light .section-title {
    color: var(--white);
}

/* ========== من نحن (About Us): image left, title + text right ========== */
#about {
    background: var(--light);
}

.about-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-wrap {
        grid-template-columns: 1fr 1.2fr;
        gap: 3rem;
    }
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(22, 51, 125, 0.15);
}

.about-image::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 3px solid var(--accent);
    border-radius: 20px;
    z-index: 1;
    pointer-events: none;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: 0.5s;
}

.about-image:hover img {
    transform: scale(1.03);
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.about-content {
    padding: 0.5rem 0;
}

.about-title {
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.about-text {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

.about-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 3rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(22, 51, 125, 0.1);
}

.about-stat {
    text-align: center;
}

.about-stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.2;
}

.about-stat-label {
    display: block;
    font-size: 1rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* ========== SERVICES: same background as "ابدأ رحلة النجاح معنا" (CTA), light content ========== */
#services {
    background-image: url("uploads/Call\ to\ Action\ -01.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
}

#services .section-header.light .section-badge {
    background: var(--accent);
    color: var(--primary);
}

#services .section-header.light .section-title {
    color: var(--white);
}

.services-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
    justify-items: center;
}

@media (min-width: 600px) {
    .services-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .services-row {
        grid-template-columns: repeat(6, 1fr);
        gap: 1.5rem;
    }
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.service-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: 0.3s;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.service-item:hover .service-circle {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    transform: scale(1.08);
}

/* Services labels light on navy background */
#services .service-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
    max-width: 120px;
    line-height: 1.3;
}

.service-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    max-width: 120px;
    line-height: 1.3;
}

/* ========== PROJECTS: cards + modal (same as main site) ========== */
#projects {
    background: var(--light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.project-card.hidden {
    display: none;
}

.project-img {
    height: 180px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-img i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.project-cat {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: var(--accent);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: 0.3s;
}

.project-card:hover .project-cat {
    opacity: 1;
}

.project-info {
    padding: 1.5rem;
}

.project-info h4 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.project-btn {
    background: var(--light);
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.project-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* ========== PROJECT MODAL WITH IMAGE GALLERY ========== */
#modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

#modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--white);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 20px;
    transform: scale(0.9);
    transition: 0.3s;
}

#modal.active .modal-box {
    transform: scale(1);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.modal-cat {
    background: var(--accent);
    color: var(--primary);
    padding: 0.3rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.8rem;
}

.modal-body {
    padding: 2rem;
}

.modal-gallery {
    margin-bottom: 2rem;
}

.modal-gallery h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.modal-gallery h4::before {
    content: "";
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
}

.gallery-main {
    width: 100%;
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--light);
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.gallery-main img:hover {
    transform: scale(1.02);
}

.gallery-thumbs {
    display: flex;
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.gallery-thumbs::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 3px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 3px;
}

.thumb-item {
    width: 80px;
    height: 60px;
    min-width: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: 0.3s;
    opacity: 0.6;
}

.thumb-item:hover {
    opacity: 0.9;
}

.thumb-item.active {
    border-color: var(--accent);
    opacity: 1;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: rgba(255, 255, 255, 0.3);
}

.gallery-placeholder i {
    font-size: 4rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h4 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section h4::before {
    content: "";
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: 2px;
}

.modal-section p {
    color: var(--gray);
    line-height: 1.8;
}

.modal-section ul {
    padding-right: 1rem;
}

.modal-section li {
    color: var(--gray);
    margin-bottom: 0.5rem;
    position: relative;
    padding-right: 1.5rem;
}

.modal-section li::before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--accent);
    font-weight: 700;
}

.modal-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--light);
}

.modal-stat {
    text-align: center;
}

.modal-stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.modal-stat-label {
    color: var(--gray);
}

@media (max-width: 768px) {
    .gallery-main {
        height: 250px;
    }
    .modal-stats {
        flex-direction: column;
        gap: 1rem;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== CONTACT: form only (Dowalia backgrounds white 3) ========== */
#contact {
    background-image: url("uploads/Dowalia\ backgrounds\ white\ \(3\).jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.contact-form {
    max-width: 560px;
    margin: 0 auto;
    background: var(--light);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(22, 51, 125, 0.3);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
    color: #333;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(22, 51, 125, 0.3);
}

/* ========== REGISTRATION PAGE ========== */
.reg-page {
    padding: 2.5rem 0 4rem;
}

.reg-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
}

.reg-header-logo-link {
    display: inline-block;
    margin-bottom: 1rem;
    transition: opacity 0.3s;
}

.reg-header-logo-link:hover {
    opacity: 0.85;
}

.reg-header-logo {
    height: 140px;
    width: auto;
    object-fit: contain;
}

.reg-form-wrap .section-header {
    margin-bottom: 1.5rem;
}

.reg-form-wrap {
    max-width: 620px;
    margin: 0 auto;
    background: var(--light);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(22, 51, 125, 0.1);
}

.reg-form-wrap .contact-form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
}

.reg-form-wrap .section-header {
    margin-bottom: 1.5rem;
}

.form-group select {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(22, 51, 125, 0.3);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row-phone {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.form-row-phone .country-code {
    width: 120px;
    flex-shrink: 0;
}

.form-row-phone .phone-input {
    flex: 1;
    min-width: 0;
}

@media (max-width: 576px) {
    .form-row-phone {
        flex-direction: column;
    }

    .form-row-phone .country-code {
        width: 100%;
    }
}

/* ========== FOOTER ========== */
#footer {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    height: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.footer-about {
    opacity: 0.95;
    max-width: 400px;
}

.footer-copy {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ========== WHATSAPP CHAT WIDGET (bottom-right like main site) ========== */
.wa-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    left: auto;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.wa-tooltip {
    background: #fff;
    color: #333;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 20px 20px 4px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wa-widget:hover .wa-tooltip {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wa-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5), 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: wa-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.wa-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6), 0 3px 10px rgba(0, 0, 0, 0.2);
}

.wa-btn:active {
    transform: scale(0.96);
}

.wa-btn::before,
.wa-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    opacity: 0.5;
    animation: wa-ripple 2.4s ease-out infinite;
}

.wa-btn::after {
    animation-delay: 1.2s;
}

.wa-btn svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.wa-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 13px;
    height: 13px;
    background: #ff3b30;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 2;
    animation: wa-dot-pulse 1.8s ease-in-out infinite;
}

@keyframes wa-pop-in {
    from { opacity: 0; transform: scale(0) rotate(-30deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes wa-ripple {
    0% { transform: scale(1); opacity: 0.5; }
    80% { transform: scale(2); opacity: 0; }
    100% { transform: scale(2); opacity: 0; }
}

@keyframes wa-dot-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}
