/* ========== المتغيرات العامة ========== */
:root {
    --primary-color: #0b3d84;
    --secondary-color: #1d8db2;
    --white: #FFFFFF;
    --light-gray: #f4f7f6;
    --dark-gray: #333333;
    --text-color: #555555;
    --shadow: 0 10px 30px rgba(11, 61, 132, 0.1);
    --shadow-hover: 0 15px 40px rgba(29, 141, 178, 0.2);
    --shadow-strong: 0 20px 60px rgba(11, 61, 132, 0.15);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== إعدادات عامة ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== شريط التنقل ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 60px;
    width: auto;
    transition: var(--transition);
    filter: drop-shadow(0 2px 8px rgba(11, 61, 132, 0.2));
}

.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(29, 141, 178, 0.3));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--secondary-color);
}

/* أزرار */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0a3470;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #187a9c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* قائمة الهامبرجر للموبايل */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 5px;
    transition: var(--transition);
}

/* ========== القسم الرئيسي (Hero) ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    padding: 100px 20px 50px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(29, 141, 178, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(11, 61, 132, 0.15) 0%, transparent 50%);
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(11, 61, 132, 0.7) 0%, rgba(29, 141, 178, 0.6) 50%, rgba(0, 0, 0, 0.5) 100%);
    backdrop-filter: blur(2px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease, titleFloat 3s ease-in-out infinite;
    background: linear-gradient(135deg, #ffffff 0%, #e0f4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes titleFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    animation: fadeInUp 1.2s ease;
}

.hero-slogan {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 40px;
    line-height: 1.8;
    font-style: italic;
    animation: fadeInUp 1.4s ease;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.6s ease;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll a {
    color: var(--white);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

/* ========== قسم عن الدكتور ========== */
.about {
    padding: 100px 20px;
    background-color: var(--light-gray);
    position: relative;
    z-index: 10;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-image .image-placeholder {
    width: 100%;
    max-width: 350px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-strong);
    margin: 0 auto;
    position: relative;
    animation: floatUpDown 4s ease-in-out infinite;
    overflow: hidden;
    border: 5px solid var(--secondary-color);
}

.about-image .image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.about-image .image-placeholder::before {
    content: '';
    position: absolute;
    width: 110%;
    height: 110%;
    border-radius: 50%;
    border: 3px dashed var(--secondary-color);
    opacity: 0.3;
    animation: rotate360 20s linear infinite;
    z-index: 1;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.about-image .image-placeholder i {
    font-size: 9rem;
    color: var(--white);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition-slow);
}

.section-title:hover::after {
    width: 100%;
}

.section-title.light {
    color: var(--white);
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin-bottom: 30px;
}

.title-underline.center {
    margin-left: auto;
    margin-right: auto;
}

.title-underline.light {
    background-color: var(--white);
}

.about-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 30px;
    color: var(--text-color);
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
}

.feature-item i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

/* ========== قسم الخدمات ========== */
.services {
    padding: 100px 20px;
    background: linear-gradient(135deg, #f8fbff 0%, #ffffff 50%, #f8fbff 100%);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(29, 141, 178, 0.05), transparent);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.services::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(11, 61, 132, 0.05), transparent);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.services .container {
    position: relative;
    z-index: 1;
}

.services .section-title {
    text-align: center;
}

.service-category {
    margin-top: 60px;
}

.category-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, rgba(11, 61, 132, 0.05), rgba(29, 141, 178, 0.05));
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.category-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 60%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: translateY(-50%);
    border-radius: 0 5px 5px 0;
}

.category-title i {
    color: var(--secondary-color);
    font-size: 2.2rem;
    animation: iconRotate 3s ease-in-out infinite;
}

@keyframes iconRotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.service-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(29, 141, 178, 0.1), transparent);
    transition: var(--transition-slow);
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-strong);
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #ffffff 0%, #e8f6fa 100%);
}

.service-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: var(--transition-slow);
    box-shadow: 0 8px 20px rgba(29, 141, 178, 0.3);
    position: relative;
}

.service-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: rotateY(360deg) scale(1.1);
    box-shadow: 0 12px 30px rgba(29, 141, 178, 0.5);
}

.service-card:hover .service-icon::after {
    opacity: 1;
}

.service-icon i {
    font-size: 2.5rem;
    color: var(--white);
    position: relative;
    z-index: 2;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.service-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.7;
    transition: var(--transition);
}

.service-card:hover .service-title {
    color: var(--primary-color);
    transform: scale(1.05);
}

/* ========== قسم الفروع ========== */
.branches {
    padding: 100px 20px;
    background: linear-gradient(135deg, #f4f7f6 0%, #ffffff 100%);
    position: relative;
}

.branches::before {
    content: '🏥';
    position: absolute;
    top: 10%;
    right: 5%;
    font-size: 150px;
    opacity: 0.03;
    animation: rotate360 30s linear infinite;
}

.branches .section-title {
    text-align: center;
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.branch-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 18px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.branch-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(29, 141, 178, 0.1), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.branch-card:hover::before {
    width: 300px;
    height: 300px;
}

.branch-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-strong);
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.branch-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.branch-card:hover i {
    color: var(--white);
    transform: scale(1.2) rotate(10deg);
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1.2) rotate(10deg) translateY(0); }
    50% { transform: scale(1.2) rotate(10deg) translateY(-10px); }
}

.branch-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-gray);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.branch-card:hover h4 {
    color: var(--white);
    transform: scale(1.05);
}

/* ========== قسم التواصل والفوتر ========== */
.contact {
    padding: 80px 20px 40px;
    background-color: var(--primary-color);
    color: var(--white);
}

.contact .section-title {
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.contact-item {
    text-align: center;
}

.contact-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition-slow);
    box-shadow: 0 8px 25px rgba(29, 141, 178, 0.4);
    position: relative;
}

.contact-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--white);
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
}

.contact-item:hover .contact-icon {
    transform: scale(1.15) rotate(360deg);
    box-shadow: 0 12px 35px rgba(29, 141, 178, 0.6);
}

.contact-item:hover .contact-icon::after {
    opacity: 0.5;
    transform: scale(1.2);
}

.contact-icon i {
    font-size: 2.2rem;
    color: var(--white);
}

.contact-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    margin: 0;
    font-size: 1rem;
}

.footer-bottom a {
    color: var(--white) !important;
    text-decoration: none;
    transition: var(--transition);
}

.footer-bottom a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-bottom font {
    color: var(--white) !important;
}

/* ========== الأنيميشن ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-15px) translateX(-50%);
    }
    60% {
        transform: translateY(-10px) translateX(-50%);
    }
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(100px, -100px) scale(1.5);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50px, -200px) scale(1);
        opacity: 0.3;
    }
    75% {
        transform: translate(-150px, -100px) scale(1.2);
        opacity: 0.5;
    }
}

.particle {
    pointer-events: none;
    z-index: 1;
}

.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* تأثيرات إضافية للعناصر */
.service-category {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.service-category.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== التجاوب مع الشاشات ========== */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 20px;
        box-shadow: var(--shadow);
        transition: var(--transition);
        gap: 20px;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-slogan {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-slogan {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .branches-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 45px;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .branches-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .category-title {
        font-size: 1.5rem;
        padding: 15px;
    }
}
