/* ══════════════════════════════════════════════════════════
   🦷 Dr. Portfolio - Complete CSS Stylesheet
   Modern, Responsive, Bilingual, Dark/Light Mode Support
   ══════════════════════════════════════════════════════════ */

/* ═══ ROOT VARIABLES ═══ */
:root {
    /* Colors - Light Mode */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;

    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;

    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);

    --radius: 12px;
    --radius-lg: 16px;
    --spacing: 1rem;

    --header-height: 65px;
    --footer-height: 75px;

    /* Fonts */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic: 'Tajawal', 'Inter', sans-serif;
}

/* Dark Mode Colors */
body.dark-mode {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-light: #9ca3af;

    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;

    --border: #374151;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Arabic Font */
body[data-lang="ar"] {
    font-family: var(--font-arabic);
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

/* ═══ CONTAINER ═══ */
.portfolio-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--bg-primary);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
    padding-bottom: var(--footer-height);
}

#main-content {
    padding-top: var(--header-height);
}

/* ═══ HEADER ═══ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    height: var(--header-height);
    transition: all 0.3s ease;
}

.header-content {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 100%;
}

.menu-btn {
    font-size: 1.5rem;
    color: var(--text-primary);
    padding: 0.5rem;
}

.header-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-toggle,
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.lang-toggle:hover,
.theme-toggle:hover {
    background: var(--primary);
    color: white;
}

.theme-toggle i {
    font-size: 1.1rem;
}

/*═══════════════════════════════════════
  📱 NEW MOBILE NAVIGATION (FIXED VERSION)
═══════════════════════════════════════*/
.mobile-nav {
    position: fixed;
    top: 0;
    height: 100%;
    width: 80%;
    max-width: 300px;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    overflow-y: auto;
    transition: transform 0.35s ease;
    
    /* hidden default */
    transform: translateX(-100%);
    left: 0; /* Added for stability */
}

/* RTL → menu opens from the RIGHT */
body[dir="rtl"] .mobile-nav {
    transform: translateX(100%);
    left: auto; /* Reset left */
    right: 0;   /* Align to right */
}

/* Active State */
.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav-content {
    padding: 2rem 1rem;
}

.close-btn {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 0.75rem;
}

.nav-links a {
    display: block;
    padding: 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--text-primary);
    transition: 0.2s;
}

.nav-links a:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

/* ═══ SECTIONS ═══ */
.section {
    padding: 3rem 1.5rem;
}

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

.icon-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ═══ HERO SECTION ═══ */
.hero-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.hero-content {
    text-align: center;
}

.profile-image-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary);
    box-shadow: var(--shadow-lg);
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.hero-graduation {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.hero-position {
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem auto 0;
    max-width: 400px;
}

.hero-position p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.hero-position strong {
    color: var(--primary);
    font-weight: 600;
}

/* ═══ SKILLS SECTION ═══ */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.skill-category {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.skill-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.skill-category-title i {
    font-size: 1.5rem;
}

.skill-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
    transition: all 0.2s ease;
}

body[dir="rtl"] .skill-item {
    border-left: none;
    border-right: 3px solid var(--primary);
}

.skill-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

body[dir="rtl"] .skill-item:hover {
    transform: translateX(-5px);
}

.skill-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.skill-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* ═══ EDUCATION SECTION ═══ */
.education-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.university-info {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    color: white;
    box-shadow: var(--shadow-md);
}

.university-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.graduation-year {
    font-size: 1rem;
    opacity: 0.9;
}

/* Degrees */
.degrees-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.degree-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--success);
    box-shadow: var(--shadow);
}

body[dir="rtl"] .degree-item {
    border-left: none;
    border-right: 4px solid var(--success);
}

.degree-icon {
    font-size: 2rem;
    color: var(--success);
}

.degree-info {
    flex: 1;
}

.degree-info strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.degree-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.degree-year {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
}

/* Timeline */
.timeline-container {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

body[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-light));
    border-radius: 2px;
}

body[dir="rtl"] .timeline::before {
    left: auto;
    right: 0;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item.last {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border: 4px solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--bg-secondary);
    z-index: 1;
}

body[dir="rtl"] .timeline-marker {
    left: auto;
    right: -2rem;
}

.timeline-content {
    background: var(--bg-primary);
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.timeline-year {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.timeline-event {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Certificates */
.certificates-container {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.certificates-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.certificate-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.certificate-card:hover {
    transform: scale(1.03);
}

.certificate-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.certificate-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1rem;
    color: white;
}

.certificate-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ═══ CLINICAL CASES SECTION ═══ */
.cases-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.case-category {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
}

.case-category-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.cases-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.case-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.case-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.case-image-wrapper {
    position: relative;
    height: 200px;
    padding: 0.5rem;
    background: var(--bg-primary);
}

.case-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000; /* يمكنك تغييرها */
}

.case-label {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body[dir="rtl"] .case-label {
    left: auto;
    right: 0.75rem;
}

.case-image-wrapper.before .case-label {
    background: rgba(239, 68, 68, 0.9);
}

.case-image-wrapper.after .case-label {
    background: rgba(16, 185, 129, 0.9);
}

.case-description {
    padding: 1.25rem;
}

.case-description p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ═══ BLOG SECTION ═══ */
.blog-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.blog-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    margin-bottom: 0.75rem;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.blog-date i {
    margin-right: 0.25rem;
}

body[dir="rtl"] .blog-date i {
    margin-right: 0;
    margin-left: 0.25rem;
}

.blog-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.blog-title a:hover {
    color: var(--primary);
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.blog-read-more:hover {
    gap: 0.75rem;
}

.blog-read-more i {
    font-size: 0.85rem;
}

/* Blog Single Page */
.blog-single-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.blog-single-header {
    text-align: center;
    margin-bottom: 2rem;
}

.blog-single-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-single-meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

.blog-single-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.blog-single-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-single-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.blog-single-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.blog-single-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.blog-single-content p {
    margin-bottom: 1.25rem;
}

.blog-single-content ul,
.blog-single-content ol {
    margin: 1rem 0 1.5rem 2rem;
}

body[dir="rtl"] .blog-single-content ul,
body[dir="rtl"] .blog-single-content ol {
    margin-left: 0;
    margin-right: 2rem;
}

.blog-single-content li {
    margin-bottom: 0.5rem;
}

.blog-single-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

/* ═══ CONTACT SECTION ═══ */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.contact-method:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

body[dir="rtl"] .contact-method:hover {
    transform: translateX(-5px);
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.contact-icon.phone {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.contact-icon.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.contact-icon.email {
    background: linear-gradient(135deg, #ea4335, #fbbc04);
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Social Media */
.social-media {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.social-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: scale(1.1) rotate(5deg);
}

.social-link.instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.social-link.facebook {
    background: #1877f2;
}

.social-link.linkedin {
    background: #0077b5;
}

/* Location */
.location-container {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.location-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-align: center;
}

.location-address {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1.5rem;
}

.map-container {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.map-container iframe {
    display: block;
}

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.btn i {
    font-size: 1rem;
}

/* ═══ FOOTER ═══ */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    z-index: 999;
}

.footer-content {
    max-width: 480px;
    margin: 0 auto;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0.5rem;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    transition: all 0.2s ease;
    padding: 0.25rem;
}

.nav-item i {
    font-size: 1.3rem;
}

.nav-item.active,
.nav-item:hover {
    color: var(--primary);
}

.footer-info {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ═══ FLOATING BUTTONS ═══ */
.download-cv-btn,
.scroll-top-btn {
    position: fixed;
    right: 1.5rem;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 998;
    transition: all 0.3s ease;
}

.download-cv-btn {
    bottom: 100px;
}

.scroll-top-btn {
    bottom: 170px;
    opacity: 0;
    visibility: hidden;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.download-cv-btn:hover,
.scroll-top-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.download-cv-btn i,
.scroll-top-btn i {
    font-size: 1.3rem;
}

.download-text {
    font-size: 0.6rem;
    margin-top: 0.25rem;
    font-weight: 600;
}

body[dir="rtl"] .download-cv-btn,
body[dir="rtl"] .scroll-top-btn {
    right: auto;
    left: 1.5rem;
}

/* ═══ RESPONSIVE - LARGER SCREENS ═══ */
@media (min-width: 481px) {
    .portfolio-container {
        border-radius: var(--radius-lg);
        margin: 2rem auto;
    }

    .header {
        left: 50%;
        transform: translateX(-50%);
        max-width: 480px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .footer {
        left: 50%;
        transform: translateX(-50%);
        max-width: 480px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
}

@media (max-width: 480px) {
    .section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .hero-name {
        font-size: 1.6rem;
    }

    .certificates-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section {
    animation: fadeIn 0.6s ease;
}

/* ═══ UTILITIES ═══ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* ═══ PRINT STYLES ═══ */
@media print {
    .header,
    .footer,
    .download-cv-btn,
    .scroll-top-btn,
    .mobile-nav {
        display: none !important;
    }

    .section {
        page-break-inside: avoid;
    }
}
.download-cv-btn[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.download-cv-btn .spinner {
  display: inline-flex;
  vertical-align: middle;
}
