/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom: 20px;
    word-wrap: break-word;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><path d="M0,0v30c0,30,30,60,60,60h880c30,0,60-30,60-60V0H0z"/></svg>');
    background-size: cover;
    z-index: -1;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.profile-image {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 1s ease 0.3s both;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 1);
}

.profile-image:hover {
    transform: scale(1.05);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.name {
    font-family: 'Amiri', serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    animation: fadeInUp 1s ease 0.4s both;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.contact-item span {
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    flex: 1;
}

/* Main Content Styles */
.main-content {
    padding: 3rem 2rem;
    position: relative;
    z-index: 5;
    background: transparent;
}

.section {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    position: relative;
    z-index: 1;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to left, #3498db, transparent);
}

.section-title i {
    color: #3498db;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.section-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.1);
    position: relative;
    z-index: 2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Objective Section */
.objective-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    text-align: justify;
}

/* Education Section */
.education-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.education-item:hover {
    transform: translateX(-5px);
}

.education-item:last-child {
    margin-bottom: 0;
}

.education-icon {
    font-size: 2rem;
    color: #3498db;
    background: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.education-details h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.education-details p {
    color: #666;
    line-height: 1.6;
}

/* Experience Section */
.experience-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff8e1 0%, #f3e5ab 100%);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.experience-item:hover {
    transform: translateX(-5px);
}

.experience-icon {
    font-size: 2rem;
    color: #e67e22;
    background: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.2);
}

.experience-details h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.experience-details p {
    color: #666;
    line-height: 1.6;
    text-align: justify;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #e8f8f5 0%, #d5f4e6 100%);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.skill-item:hover {
    transform: translateY(-10px);
    border-color: #27ae60;
    box-shadow: 0 15px 30px rgba(39, 174, 96, 0.2);
}

.skill-icon {
    font-size: 2.5rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.skill-item h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.skill-item p {
    color: #666;
    font-size: 0.9rem;
}

/* Additional Info Section */
.additional-grid {
    display: grid;
    gap: 1.5rem;
}

.additional-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fdf2f8 0%, #f3e8ff 100%);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.additional-item:hover {
    transform: translateX(-5px);
}

.additional-icon {
    font-size: 2rem;
    color: #9b59b6;
    background: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.2);
}

.additional-item p {
    color: #666;
    line-height: 1.6;
    flex: 1;
}

/* Audio Samples Section */
.audio-intro {
    font-size: 1.1rem;
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 10px;
    border-right: 4px solid #2196f3;
}

.audio-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.audio-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.audio-item:hover {
    transform: translateY(-5px);
    border-color: #2196f3;
    box-shadow: 0 15px 35px rgba(33, 150, 243, 0.1);
}

.audio-icon {
    font-size: 2.5rem;
    color: #2196f3;
    background: white;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.2);
    flex-shrink: 0;
}

.audio-details {
    flex: 1;
    min-width: 0;
}

.audio-details h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-weight: 600;
    font-family: 'Amiri', serif;
}

.audio-details p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.play-button {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    width: fit-content;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.play-button:active {
    transform: translateY(0);
}

.play-button.playing {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.play-button.playing:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.4);
}

.audio-player {
    display: none;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(33, 150, 243, 0.2);
}

.audio-player.active {
    display: flex;
}

.progress-container {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196f3 0%, #1976d2 100%);
    width: 0%;
    transition: width 0.1s ease;
}

.time-display {
    font-size: 0.9rem;
    color: #666;
    min-width: 80px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.audio-note {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: 10px;
    border-right: 4px solid #ff9800;
}

.audio-note i {
    color: #ff9800;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.audio-note p {
    color: #e65100;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2rem;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.quran-verse {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    opacity: 0.9;
    font-style: italic;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 5px;
        border-radius: 15px;
    }
    
    .header {
        padding: 1.5rem 1rem;
        position: relative;
        z-index: 10;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .profile-image {
        font-size: 5rem;
        width: 120px;
        height: 120px;
    }
    
    .profile-photo {
        width: 120px;
        height: 120px;
        border-width: 3px;
    }
    
    .name {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 0.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .title {
        font-size: 1.2rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .contact-item {
        padding: 0.6rem;
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-item span {
        word-break: break-word;
        overflow-wrap: break-word;
        min-width: 0;
        max-width: calc(100% - 2rem);
    }
    
    .main-content {
        padding: 1.5rem 0.8rem;
        position: relative;
        z-index: 5;
    }
    
    .section {
        margin-bottom: 2rem;
        position: relative;
        z-index: 1;
    }
    
    .section-content {
        padding: 1.2rem;
        position: relative;
        z-index: 2;
    }
    
    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
        flex-wrap: wrap;
    }
    
    .objective-text {
        font-size: 1rem;
        line-height: 1.7;
        text-align: justify;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .education-item,
    .experience-item,
    .additional-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem;
        margin-bottom: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .education-details h3,
    .experience-details h3 {
        font-size: 1.1rem;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .education-details p,
    .experience-details p,
    .additional-item p {
        font-size: 0.9rem;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .skill-item {
        padding: 1.5rem 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .skill-item h3 {
        font-size: 1.1rem;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    .skill-item p {
        font-size: 0.85rem;
        line-height: 1.4;
        word-wrap: break-word;
    }
    
    /* Audio Section Mobile */
    .audio-intro {
        font-size: 0.95rem;
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .audio-grid {
        gap: 1.5rem;
    }
    
    .audio-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .audio-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .audio-details h3 {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .audio-details p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .play-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        align-self: center;
    }
    
    .audio-player {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .progress-container {
        height: 8px;
        order: 1;
    }
    
    .time-display {
        font-size: 0.8rem;
        order: 2;
    }
    
    .audio-note {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .audio-note p {
        font-size: 0.85rem;
    }
    
    .footer {
        padding: 1.5rem 1rem;
        position: relative;
        z-index: 5;
    }
    
    .footer-content p {
        font-size: 1rem;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .quran-verse {
        font-size: 1.1rem;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 2px;
        border-radius: 10px;
    }
    
    .header {
        padding: 1rem 0.8rem;
    }
    
    .profile-image {
        font-size: 4rem;
        width: 100px;
        height: 100px;
    }
    
    .profile-photo {
        width: 100px;
        height: 100px;
        border-width: 2px;
    }
    
    .name {
        font-size: 1.8rem;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .contact-item {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .contact-item i {
        font-size: 1rem;
        min-width: 18px;
    }
    
    .main-content {
        padding: 1rem 0.6rem;
    }
    
    .section-content {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.4rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        text-align: right;
    }
    
    .section-title::after {
        display: none;
    }
    
    .objective-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .education-item,
    .experience-item,
    .additional-item {
        padding: 1rem;
    }
    
    .education-icon,
    .experience-icon,
    .additional-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .education-details h3,
    .experience-details h3 {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .education-details p,
    .experience-details p,
    .additional-item p {
        font-size: 0.85rem;
        line-height: 1.5;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .skill-item {
        padding: 1.2rem 0.8rem;
    }
    
    .skill-icon {
        font-size: 2rem;
    }
    
    .skill-item h3 {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .skill-item p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .footer {
        padding: 1rem 0.8rem;
    }
    
    .footer-content p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    .quran-verse {
        font-size: 1rem;
        line-height: 1.5;
        word-wrap: break-word;
        hyphens: auto;
    }
}

/* Additional mobile fixes */
@media (max-width: 360px) {
    .name {
        font-size: 1.6rem;
    }
    
    .title {
        font-size: 0.95rem;
    }
    
    .contact-item {
        font-size: 0.75rem;
        padding: 0.4rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .objective-text {
        font-size: 0.85rem;
    }
    
    .education-details h3,
    .experience-details h3 {
        font-size: 0.95rem;
    }
    
    .education-details p,
    .experience-details p,
    .additional-item p {
        font-size: 0.8rem;
    }
    
    .skill-item h3 {
        font-size: 0.95rem;
    }
    
    .skill-item p {
        font-size: 0.75rem;
    }
}
