:root {
    /* Tarawud Brand Colors */
    --primary-color: #2c4565;
    --secondary-color: #959496;
    --accent-color: #14b8a6;
    --bg-color: #ffffff;
    --text-color: #2c4565;
    --text-light: #959496;
    --card-bg: rgba(255, 255, 255, 0.98);
    --shadow: rgba(44, 69, 101, 0.08);
    --shadow-hover: rgba(44, 69, 101, 0.15);
    --border-color: rgba(44, 69, 101, 0.1);
}

[data-theme="dark"] {
    --bg-color: #1a1f2e;
    --text-color: #f1f5f9;
    --text-light: #cbd5e1;
    --card-bg: rgba(30, 38, 54, 0.95);
    --shadow: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.5);
    --border-color: rgba(255, 255, 255, 0.15);
    --primary-color: #69a6d1;
    --secondary-color: #cbd5e1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Inter', sans-serif;
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
    transition: background 0.4s ease, color 0.4s ease;
    position: relative;
    overflow-x: hidden;
}

body[dir="ltr"] {
    font-family: 'Inter', 'Cairo', sans-serif;
}

/* Controls */
.controls {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

body[dir="ltr"] .controls {
    right: auto;
    left: 25px;
}

.control-btn {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    color: var(--primary-color);
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px var(--shadow);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

[data-theme="dark"] .control-btn {
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border-color: #ffffff;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-hover);
    border-color: var(--primary-color);
}

[data-theme="dark"] .control-btn:hover {
    border-color: #0070c0;
    box-shadow: 0 4px 16px rgba(0, 112, 192, 0.4);
}

.theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.theme-icon-svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: block !important;
}

[data-theme="light"] .moon-icon,
:not([data-theme]) .moon-icon {
    display: block;
}

[data-theme="light"] .sun-icon,
:not([data-theme]) .sun-icon {
    display: none !important;
}

.lang-en {
    display: none;
}

body[dir="ltr"] .lang-ar {
    display: none;
}

body[dir="ltr"] .lang-en {
    display: inline;
}

/* Main Container */
.main-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Background Section */
.top-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 40vh;
    min-height: 300px;
    background-image: url('/public/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    overflow: hidden;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(44, 69, 101, 0.3) 0%, rgba(44, 69, 101, 0.1) 100%);
}

[data-theme="dark"] .background-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%);
}

[data-theme="dark"] .profile-card {
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px var(--border-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Profile Card */
.profile-card {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px var(--border-color);
    margin-top: calc(40vh - 80px);
    padding: 0;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(20px);
    animation: fadeInUp 0.8s ease;
    overflow: hidden;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Content */
.card-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo-side {
    flex-shrink: 0;
}

.profile-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: contain;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.3s ease;
}

.profile-logo:hover {
    transform: scale(1.05);
}

.info-side {
    flex: 1;
    text-align: right;
    min-width: 0;
}

body[dir="ltr"] .info-side {
    text-align: left;
}

.company-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 6px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .company-name {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    color: var(--text-color);
}

.company-role {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 400;
    line-height: 1.4;
}

.company-location {
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.8;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .action-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .primary-btn:hover {
    box-shadow: 0 6px 20px rgba(51, 99, 157, 0.4);
}

[data-theme="dark"] .secondary-btn:hover {
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a5a7a 100%);
}

[data-theme="dark"] .primary-btn {
    background: linear-gradient(135deg, #0070c0 0%, #005a9e 100%);
    box-shadow: 0 4px 16px rgba(0, 112, 192, 0.3);
}

.secondary-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0d9488 100%);
}

[data-theme="dark"] .secondary-btn {
    background: linear-gradient(135deg, #20c9b8 0%, #14b8a6 100%);
    box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
}

/* About Section */
.about-section {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    text-align: right;
}

body[dir="ltr"] .section-heading {
    text-align: left;
}

.about-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    text-align: right;
    margin: 0;
}

body[dir="ltr"] .about-text {
    text-align: left;
}

/* Social Media Section */
.social-section {
    padding: 24px;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .social-icon {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid #ffffff;
}

.social-icon svg {
    width: 22px;
    height: 22px;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .social-icon:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.social-icon.instagram {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
}

.social-icon.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
}

.social-icon.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
}

.social-icon.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.social-icon.email {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a5a7a 100%);
}

/* Copyright Text */
.copyright-text {
    text-align: center;
    padding: 30px 20px 20px;
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.copyright-text p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 400;
    opacity: 0.7;
}

/* Responsive Design - Tablet */
@media (min-width: 769px) and (max-width: 1023px) {
    .main-container {
        max-width: 550px;
    }
    
    .top-background {
        height: 35vh;
    }
    
    .profile-card {
        margin-top: calc(35vh - 80px);
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .controls {
        top: 15px;
        right: 15px;
        gap: 8px;
    }

    body[dir="ltr"] .controls {
        left: 15px;
    }

    .control-btn {
        padding: 8px 14px;
        font-size: 13px;
        min-width: 44px;
    }

    .main-container {
        max-width: 100%;
        padding: 0 15px 30px;
    }

    .top-background {
        height: 35vh;
        min-height: 250px;
    }

    .profile-card {
        margin-top: calc(35vh - 60px);
        border-radius: 20px;
    }

    .card-content {
        padding: 20px;
        gap: 16px;
    }

    .profile-logo {
        width: 80px;
        height: 80px;
    }

    .company-name {
        font-size: 1.5rem;
    }

    .company-role {
        font-size: 0.9rem;
    }

    .action-buttons {
        padding: 16px 20px;
        gap: 10px;
    }

    .action-btn {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .about-section,
    .social-section {
        padding: 20px;
    }

    .section-heading {
        font-size: 1rem;
    }

    .about-text {
        font-size: 0.85rem;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .social-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .controls {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    body[dir="ltr"] .controls {
        left: 10px;
    }

    .control-btn {
        padding: 7px 12px;
        font-size: 12px;
        min-width: 40px;
    }

    .main-container {
        padding: 0 12px 25px;
    }

    .top-background {
        height: 30vh;
        min-height: 200px;
    }

    .profile-card {
        margin-top: calc(30vh - 50px);
        border-radius: 18px;
    }

    .card-content {
        padding: 16px;
        gap: 12px;
        flex-direction: column;
        text-align: center;
    }

    body[dir="ltr"] .card-content {
        flex-direction: column;
    }

    .info-side {
        text-align: center;
    }

    body[dir="ltr"] .info-side {
        text-align: center;
    }

    .profile-logo {
        width: 70px;
        height: 70px;
        margin: 0 auto;
    }

    .company-name {
        font-size: 1.3rem;
    }

    .company-role {
        font-size: 0.85rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
        padding: 14px 16px;
    }

    .action-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .about-section,
    .social-section {
        padding: 16px;
    }

    .section-heading {
        font-size: 0.95rem;
        text-align: center;
    }

    body[dir="ltr"] .section-heading {
        text-align: center;
    }

    .about-text {
        font-size: 0.8rem;
        text-align: center;
    }

    body[dir="ltr"] .about-text {
        text-align: center;
    }

    .social-icons {
        gap: 10px;
    }

    .social-icon {
        width: 38px;
        height: 38px;
    }

    .social-icon svg {
        width: 18px;
        height: 18px;
    }

    .copyright-text {
        padding: 25px 15px 15px;
    }

    .copyright-text p {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .company-name {
        font-size: 1.2rem;
    }

    .profile-logo {
        width: 60px;
        height: 60px;
    }

    .action-btn {
        padding: 12px 14px;
        font-size: 0.85rem;
    }
}

/* Touch Device Optimization */
@media (hover: none) and (pointer: coarse) {
    .action-btn {
        min-height: 44px;
    }

    .control-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .social-icon {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}