* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* شعار الشركة في الأعلى */
.company-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 25px 20px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 100;
    animation: slideDown 0.6s ease-out;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.header-logo {
    height: 90px;
    width: auto;
    max-width: 90%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-tagline {
    color: #667eea;
    font-size: 0.95em;
    font-style: italic;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-align: center;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.container {
    text-align: center;
    background: white;
    padding: 30px 20px 40px;
    margin: 20px auto 30px;
    max-width: 1200px;
    width: calc(100% - 40px);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

.title-section {
    position: relative;
    margin-bottom: 30px;
}

.main-title {
    color: #333;
    font-size: 2.2em;
    margin: 0;
    padding: 10px 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: fadeInDown 0.8s ease-out 0.2s both;
}

.divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, #764ba2, transparent);
    margin: 30px 0;
    border-radius: 2px;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 2em;
    font-weight: 700;
}

p {
    color: #666;
    margin-bottom: 20px;
    font-size: 1.1em;
}

/* شبكة البرامج */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin: 0 auto;
    max-width: 100%;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.program-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    padding: 30px 20px;
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    animation: scaleIn 0.8s ease-out 0.7s both;
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.program-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.program-card h2 {
    color: #333;
    font-size: 1.6em;
    margin-bottom: 12px;
    font-weight: 700;
}

.program-card p {
    color: #888;
    font-size: 1em;
    margin-bottom: 25px;
}

.logo-link {
    display: inline-block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.logo-link:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.logo {
    max-width: 160px;
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    border-radius: 15px;
    background: #f0f0f0;
    min-height: 120px;
    max-height: 160px;
    object-fit: contain;
    margin: 0 auto;
}

.logo-placeholder {
    display: none;
    max-width: 160px;
    width: 100%;
    min-height: 120px;
    max-height: 160px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    margin: 0 auto;
}

.placeholder-content {
    text-align: center;
    padding: 20px;
}

.placeholder-content svg {
    margin-bottom: 10px;
    opacity: 0.8;
}

.placeholder-content p {
    color: white;
    margin: 0;
    font-size: 0.9em;
}

.logo-link:active {
    transform: scale(1.05);
}

/* قسم الاتصال بنا */
.contact-section {
    margin-top: 40px;
    animation: fadeInUp 0.8s ease-out 1s both;
}

.contact-section h2 {
    color: #333;
    font-size: 2em;
    margin-bottom: 15px;
    font-weight: 700;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-top: 30px;
    max-width: 100%;
}

.contact-card {
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
    animation: fadeInScale 0.6s ease-out both;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }
.contact-card:nth-child(5) { animation-delay: 0.5s; }

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0ff 100%);
}

.contact-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.contact-card h3 {
    color: #333;
    font-size: 1.3em;
    margin-bottom: 12px;
    font-weight: 700;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.95em;
    padding: 10px 15px;
    background: #f0f0ff;
    border-radius: 8px;
    transition: all 0.3s ease;
    direction: ltr;
    margin-top: 5px;
}

.email-link:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.email-icon {
    font-size: 1.2em;
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* تصميم الأجهزة المختلفة */
@media (max-width: 1024px) {
    .programs-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 25px;
    }
    
    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .company-header {
        padding: 20px 15px;
    }
    
    .header-logo {
        height: 75px;
        max-width: 85%;
    }
    
    .header-tagline {
        font-size: 0.9em;
    }
    
    .container {
        padding: 25px 15px 35px;
        margin: 15px auto;
        width: calc(100% - 30px);
        border-radius: 15px;
    }
    
    .main-title {
        font-size: 1.9em;
        padding: 8px 15px;
    }
    
    .programs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .program-card {
        padding: 25px 20px;
    }
    
    .program-card h2 {
        font-size: 1.5em;
    }
    
    .program-card p {
        font-size: 0.95em;
    }
    
    .divider {
        margin: 25px 0;
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .contact-card {
        padding: 25px 15px;
    }
    
    .contact-icon {
        width: 65px;
        height: 65px;
    }
    
    .contact-icon svg {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 600px) {
    .company-header {
        padding: 18px 12px;
    }
    
    .header-logo {
        height: 70px;
    }
    
    .header-tagline {
        font-size: 0.85em;
    }
    
    .container {
        padding: 20px 12px 30px;
        margin: 12px auto;
        width: calc(100% - 24px);
    }
    
    .main-title {
        font-size: 1.7em;
    }
    
    .programs-grid {
        gap: 18px;
    }
    
    .program-card {
        padding: 22px 18px;
    }
    
    .program-card h2 {
        font-size: 1.4em;
    }
    
    .logo {
        max-width: 140px;
        min-height: 110px;
        max-height: 140px;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-card {
        padding: 22px 15px;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
    }
    
    .contact-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .contact-card h3 {
        font-size: 1.2em;
    }
    
    .email-link {
        font-size: 0.88em;
        padding: 9px 12px;
    }
}

@media (max-width: 480px) {
    .company-header {
        padding: 15px 10px;
    }
    
    .header-logo {
        height: 65px;
    }
    
    .header-tagline {
        font-size: 0.8em;
    }
    
    .container {
        padding: 18px 10px 25px;
        margin: 10px auto;
        width: calc(100% - 20px);
        border-radius: 12px;
    }
    
    .main-title {
        font-size: 1.5em;
        padding: 6px 12px;
    }
    
    .programs-grid {
        gap: 15px;
    }
    
    .program-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .program-card h2 {
        font-size: 1.3em;
        margin-bottom: 10px;
    }
    
    .program-card p {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    
    .logo {
        max-width: 130px;
        min-height: 100px;
        max-height: 130px;
    }
    
    .divider {
        margin: 20px 0;
    }
    
    .contact-section h2 {
        font-size: 1.6em;
    }
    
    .contact-card {
        padding: 20px 12px;
    }
    
    .contact-icon {
        width: 55px;
        height: 55px;
    }
    
    .contact-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .contact-card h3 {
        font-size: 1.15em;
    }
    
    .email-link {
        font-size: 0.82em;
        padding: 8px 10px;
    }
}
