:root {
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --accent-color: #e94560;
    --text-color: #eaeaea;
    --secondary-text: #b0b0b0;
    --transition-speed: 0.3s;
}

.light-mode {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --accent-color: #2563eb;
    --text-color: #333333;
    --secondary-text: #666666;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.container {
    width: 100%;
    max-width: 800px;
    background-color: rgba(22, 33, 62, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

.light-mode .container {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.controls {
    position: absolute;
    top: -20px;
    left: -20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: color var(--transition-speed);
}

.icon-btn:hover {
    color: var(--accent-color);
    transform: rotate(15deg);
}

.lang-switcher {
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: none;
    border: 1px solid var(--secondary-text);
    color: var(--secondary-text);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition-speed);
}

.lang-btn.active,
.lang-btn:hover {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.profile-pic {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-color);
    box-shadow: 0 0 20px rgba(var(--accent-color), 0.5);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-pic:hover img {
    transform: scale(1.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.subtitle {
    color: var(--secondary-text);
    font-size: 1.1rem;
}

/* Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.light-mode .tabs {
    background: rgba(0, 0, 0, 0.05);
}

.tab-btn {
    background: none;
    border: none;
    color: var(--secondary-text);
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn:hover {
    color: var(--text-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

/* Content */
.content {
    position: relative;
    min-height: 300px;
    overflow: hidden;
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: slideUpFade 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

h2 {
    margin-bottom: 20px;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    font-size: 1.8rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card[data-service] {
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(var(--accent-color), 0.2);
}

.service-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.service-card h3 {
    margin-bottom: 12px;
    color: var(--text-color);
    font-size: 1.2rem;
}

.service-card p {
    color: var(--secondary-text);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Map */
.map-placeholder {
    width: 100%;
    height: 350px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.map-placeholder iframe {
    width: 100%;
    height: 100%;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-info p {
    margin: 0;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.contact-info a:hover {
    background-color: rgba(var(--accent-color), 0.1);
    transform: translateX(5px);
}

.contact-info i {
    font-size: 1.2rem;
}

/* WhatsApp Button */
.whatsapp-container {
    text-align: center;
    margin-top: 20px;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn i {
    font-size: 1.5rem;
    animation: shake 1s infinite;
}

@keyframes shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-15deg);
    }

    75% {
        transform: rotate(15deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 25px;
    }

    h1 {
        font-size: 2rem;
    }

    .tabs {
        flex-wrap: wrap;
        padding: 8px;
        gap: 8px;
    }

    .tab-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .profile-pic {
        width: 100px;
        height: 100px;
    }

    .controls {
        left: 0;
        top: -15px;
        gap: 5px;
    }

    .map-placeholder {
        height: 250px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .service-card i {
        font-size: 2.5rem;
    }

    .whatsapp-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

/* Gallery Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.1);
    background-color: #ff4757;
}

.gallery-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-title {
    text-align: center;
    color: var(--accent-color);
    margin: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

.gallery-viewer {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 400px;
}

.gallery-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    display: none;
}

.gallery-image-container img.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.gallery-image-container video {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    display: none;
}

.gallery-image-container video.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--accent-color);
    display: none;
}

.gallery-loading.active {
    display: block;
}

.gallery-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--secondary-text);
    display: none;
}

.gallery-empty.active {
    display: block;
}

.gallery-empty i {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.gallery-nav {
    background-color: var(--accent-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gallery-nav:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(var(--accent-color), 0.4);
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-counter {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 600;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    max-height: 120px;
    overflow-y: auto;
    padding: 10px 0;
}

.gallery-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
    overflow: hidden;
    position: relative;
}

.gallery-thumbnail img,
.gallery-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumbnail:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumbnail.active {
    border-color: var(--accent-color);
    opacity: 1;
}

/* Responsive Design for Gallery */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }

    .gallery-viewer {
        flex-direction: column;
        min-height: 300px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .gallery-nav.prev,
    .gallery-nav.next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
    }

    .gallery-nav.prev {
        left: 10px;
    }

    .gallery-nav.next {
        right: 10px;
    }

    .gallery-image-container {
        min-height: 300px;
        width: 100%;
    }

    .gallery-image-container img,
    .gallery-image-container video {
        max-height: 350px;
    }

    .gallery-thumbnails {
        max-height: 100px;
    }

    .gallery-thumbnail {
        width: 60px;
        height: 60px;
    }

    .close-modal {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .modal-container {
        padding: 15px;
    }

    .gallery-title {
        font-size: 1.3rem;
    }

    .gallery-image-container {
        min-height: 250px;
    }

    .gallery-image-container img,
    .gallery-image-container video {
        max-height: 280px;
    }

    .gallery-counter {
        font-size: 1rem;
    }
}