/* Global Variables & Base Config */
:root {
    --bg-color: #f5f7fb;
    --card-bg: #ffffff;
    --text-color: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-family: 'Tajawal', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Navbar */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 1.6rem;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background-color: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-color);
}

.nav-link.admin-btn {
    border: 1px dashed var(--primary-color);
    color: var(--primary-color);
}

.nav-link.admin-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Hero Section */
.hero-section {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(var(--primary-rgb), 0.7) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-family);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.6);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

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

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

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

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--text-color);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: #25d366;
    color: var(--white);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Grids */
.grid {
    display: grid;
    gap: 30px;
    margin-top: 40px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Why Us Section */
.why-us-section {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    font-size: 2.25rem;
    color: var(--text-color);
    position: relative;
    margin-bottom: 15px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.feat-card {
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.feat-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feat-card h3 {
    margin-bottom: 12px;
}

.feat-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Projects Section */
.projects-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.project-grid {
    margin-top: 50px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

.project-img-wrapper {
    position: relative;
    padding-top: 65%; /* 16:10 Aspect Ratio */
    overflow: hidden;
}

.project-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-img {
    transform: scale(1.08);
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-color);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-projects {
    padding: 60px;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-top: 40px;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 100%);
    color: var(--white);
    padding: 80px 0;
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 35px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background-color: #1a202c;
    color: var(--white);
    padding: 30px 0;
    border-top: 4px solid var(--primary-color);
    font-size: 0.95rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-contacts {
    display: flex;
    gap: 25px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.contact-item:hover {
    color: var(--primary-color);
}

.contact-item.whatsapp-link {
    background-color: #25d366;
    color: var(--white);
    padding: 6px 16px;
    border-radius: 30px;
}

.contact-item.whatsapp-link:hover {
    background-color: #20ba5a;
    transform: translateY(-2px);
}

/* Flash Messages */
.flash-container {
    margin-top: 20px;
    margin-bottom: -10px;
}

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: var(--shadow-md);
    color: var(--white);
    position: relative;
}

.alert-success {
    background-color: var(--success-color);
}

.alert-danger {
    background-color: var(--danger-color);
}

.alert-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    font-weight: 700;
    opacity: 0.8;
}

.alert-close:hover {
    opacity: 1;
}

/* Admin Dashboard Layout */
.admin-container {
    padding: 50px 20px;
}

.admin-header {
    margin-bottom: 40px;
}

.admin-header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.admin-sidebar {
    height: fit-content;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-item label {
    font-weight: 600;
    font-size: 0.95rem;
}

.form-item input[type="text"],
.form-item input[type="url"],
.form-item textarea {
    font-family: var(--font-family);
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background-color: #fafbfd;
    transition: var(--transition);
}

.form-item input:focus,
.form-item textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.color-picker-wrapper {
    display: flex;
    gap: 10px;
}

.color-picker-wrapper input[type="color"] {
    width: 50px;
    height: 46px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0;
    cursor: pointer;
    background: none;
}

.color-picker-wrapper input[type="text"] {
    flex-grow: 1;
}

.add-project-card {
    margin-bottom: 30px;
}

/* Admin Projects List */
.admin-projects-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-project-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #fafbfd;
}

@media (max-width: 768px) {
    .admin-project-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .admin-project-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

.admin-project-thumb {
    width: 100px;
    height: 70px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.admin-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-project-details {
    flex-grow: 1;
}

.admin-project-details h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.admin-project-details p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.admin-project-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    overflow: auto;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 8% auto;
    padding: 35px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-premium);
    position: relative;
}

.modal-close {
    position: absolute;
    left: 25px;
    top: 25px;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-content h2 {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

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

.slide-in {
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down-modal {
    animation: slideDownModal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDownModal {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Page Specific Styling */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px); /* accounting for header & footer */
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
    border-radius: var(--radius-lg);
}

.login-header {
    margin-bottom: 30px;
}

.login-avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(var(--primary-rgb), 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.login-avatar {
    font-size: 2.2rem;
    color: var(--primary-color);
}

.login-header h2 {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-icon-wrapper input {
    padding-right: 42px !important;
}

.login-footer {
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.back-home-link {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.back-home-link:hover {
    color: var(--primary-color);
}

/* Social Media Footer Buttons */
.contact-item.tiktok-link {
    background-color: #010101;
    color: var(--white);
    padding: 6px 16px;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
}

.contact-item.tiktok-link:hover {
    background-color: #25f4ee;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 244, 238, 0.4);
}

.contact-item.snapchat-link {
    background-color: #FFFC00;
    color: #000000;
    padding: 6px 16px;
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
}

.contact-item.snapchat-link:hover {
    background-color: #e6e300;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 252, 0, 0.4);
}

