/* Variables */
:root {
    --primary-color: #E0F2F1;
    --secondary-color: #FFFFFF;
    --accent-color: #26A69A;
    --accent-hover: #00897B;
    --accent-gradient: linear-gradient(135deg, #26A69A, #00897B);
    --text-primary: #263238;
    --text-secondary: #546E7A;
    --bg-color: #F4FBF9;
    --card-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(38, 166, 154, 0.2);
    --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    --shadow-sm: 0 4px 15px rgba(38, 166, 154, 0.08);
    --shadow-md: 0 10px 30px rgba(38, 166, 154, 0.12);
    --shadow-lg: 0 20px 50px rgba(38, 166, 154, 0.18);
}

/* Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', sans-serif;
    background: url('main-bg.png') center/cover no-repeat fixed;
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 { color: var(--text-primary); font-weight: 700; }
a { text-decoration: none; color: var(--text-primary); transition: var(--transition); }
.highlight { color: var(--accent-color); }

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

.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.5rem; margin-bottom: 15px; position: relative; display: inline-block; }
.section-title .line { width: 80px; height: 4px; background: var(--accent-gradient); margin: 0 auto; border-radius: 2px; }

.section-alt { background: rgba(224, 242, 241, 0.25); }

/* Buttons */
.btn-primary, .btn-primary-small, .btn-secondary {
    display: inline-block; border-radius: 8px; cursor: pointer;
    transition: var(--transition); text-align: center; font-weight: 600;
    font-family: inherit;
}
.btn-primary {
    padding: 15px 30px; font-size: 1.1rem; margin-top: 20px;
    background: transparent; color: var(--accent-color);
    border: 2px solid var(--accent-color);
}
.btn-primary-small {
    padding: 8px 18px; font-size: 0.9rem;
    background: transparent; color: var(--accent-color);
    border: 1.5px solid var(--accent-color);
}
.btn-primary:hover, .btn-primary-small:hover {
    background: var(--accent-gradient); color: #fff; border-color: transparent;
    transform: translateY(-3px); box-shadow: 0 10px 25px -8px rgba(38,166,154,0.5);
}
.btn-secondary {
    background: var(--accent-gradient); color: #fff;
    padding: 14px 28px; font-size: 1rem; border: none;
    box-shadow: 0 4px 15px rgba(38,166,154,0.3);
}
.btn-secondary:hover {
    background: linear-gradient(135deg, #00897B, #004D40);
    transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,137,123,0.4);
}
.btn-primary i, .btn-secondary i { margin-left: 8px; }

/* Header */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 5px 50px;
    background: rgba(255,255,255,0.9); backdrop-filter: blur(20px);
    position: fixed; width: 100%; top: 0; z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.navbar.scrolled {
    padding: 0 50px;
    background: rgba(255,255,255,0.95);
    box-shadow: var(--shadow-md);
}
.navbar .logo { display: flex; align-items: center; }
.header-logo {
    height: 100px; width: auto;
    mix-blend-mode: multiply; object-fit: contain;
    transition: var(--transition);
}
.navbar.scrolled .header-logo { height: 65px; }
.header-logo:hover { transform: scale(1.05); }

/* Hamburger */
.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 10px; z-index: 1001;
}
.hamburger span {
    width: 28px; height: 3px; background: var(--text-primary);
    border-radius: 3px; transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(6px,6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px,-6px); }

.navbar nav ul {
    list-style: none; display: flex; align-items: center; gap: 25px;
}
.navbar nav ul li a { font-size: 1rem; font-weight: 500; position: relative; }
.navbar nav ul li a:not(.btn-primary-small)::after {
    content: ''; position: absolute; bottom: -4px; right: 0;
    width: 0; height: 2px; background: var(--accent-color);
    transition: var(--transition);
}
.navbar nav ul li a:not(.btn-primary-small):hover::after { width: 100%; }
.navbar nav ul li a:hover:not(.btn-primary-small) { color: var(--accent-color); }

/* Hero */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    justify-content: center; position: relative;
    padding: 100px 20px; overflow: hidden;
}
.hero-content {
    max-width: 800px; text-align: center; z-index: 2; margin-top: 80px;
}
.hero h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.3; }
.main-title {
    font-size: 6rem; font-weight: 800; margin-bottom: 10px;
    background: linear-gradient(to left, var(--accent-color) 50%, #000 50%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    display: inline-block;
}
.hero p { font-size: 1.4rem; color: var(--text-secondary); margin-bottom: 30px; }
.hero-buttons {
    display: flex; flex-direction: column; align-items: center;
    gap: 15px; margin-top: 20px;
}
.hero-buttons button, .hero-buttons a { min-width: 300px; }

.hero-graphics .shape {
    position: absolute; border-radius: 50%; filter: blur(80px);
    z-index: 1; opacity: 0.4; animation: floatShape 8s ease-in-out infinite;
}
.shape-1 { width: 400px; height: 400px; background: var(--accent-color); top: -100px; right: -100px; }
.shape-2 { width: 300px; height: 300px; background: #80CBC4; bottom: -50px; left: -50px; animation-delay: 2s; }
.shape-3 { width: 200px; height: 200px; background: #B2DFDB; top: 40%; left: 10%; animation-delay: 4s; }

@keyframes floatShape {
    0%,100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* About */
.about { padding: 100px 0; }
.about-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.about-card {
    background: var(--card-bg); border: 1px solid var(--glass-border);
    padding: 35px; border-radius: 16px;
    backdrop-filter: blur(10px); transition: var(--transition);
}
.about-card:hover {
    transform: translateY(-8px); border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}
.about-icon {
    width: 55px; height: 55px; border-radius: 12px;
    background: var(--accent-gradient); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 20px;
}
.about-card h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--accent-color); }
.about-card p { color: var(--text-secondary); margin-bottom: 10px; line-height: 1.8; }

/* Services */
.services { padding: 100px 0; }
.services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px;
}
.service-card {
    background: var(--card-bg); border: 1px solid var(--glass-border);
    padding: 35px 30px; border-radius: 16px; transition: var(--transition);
    text-align: right; position: relative; overflow: hidden;
    backdrop-filter: blur(10px); display: flex; flex-direction: column;
}
.service-card::before {
    content: ''; position: absolute; top: 0; right: 0;
    width: 4px; height: 100%; background: var(--accent-gradient);
    transform: scaleY(0); transition: var(--transition); transform-origin: top;
}
.service-card:hover::before { transform: scaleY(1); }
.service-card:hover {
    transform: translateY(-6px); box-shadow: var(--shadow-lg);
    border-color: rgba(38,166,154,0.3);
}
.service-card .icon {
    font-size: 2.2rem; margin-bottom: 20px; color: var(--accent-color);
    width: 60px; height: 60px; border-radius: 12px;
    background: rgba(38,166,154,0.1);
    display: flex; align-items: center; justify-content: center;
}
.service-card h3 { font-size: 1.35rem; margin-bottom: 15px; }
.service-card p { color: var(--text-secondary); line-height: 1.8; flex-grow: 1; }

.sub-services { list-style: none; color: var(--text-secondary); margin-top: 15px; flex-grow: 1; }
.sub-services li { margin-bottom: 10px; padding-right: 20px; position: relative; line-height: 1.7; }
.sub-services li::before { content: '▹'; position: absolute; right: 0; color: var(--accent-color); font-weight: bold; }

/* Quiz */
.quiz-container {
    max-width: 800px; margin: 0 auto;
    background: var(--card-bg); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 50px;
    box-shadow: var(--shadow-md); min-height: 400px;
}
.progress-bar {
    width: 100%; height: 8px; background: #e0e0e0;
    border-radius: 4px; margin-bottom: 30px; overflow: hidden;
}
.progress { height: 100%; background: var(--accent-gradient); width: 0%; transition: width 0.4s ease; border-radius: 4px; }
.question-container h3 { font-size: 1.5rem; margin-bottom: 30px; line-height: 1.5; }
.options { display: flex; flex-direction: column; gap: 12px; }
.option-btn {
    background: var(--secondary-color); color: var(--text-primary);
    border: 1px solid var(--glass-border); padding: 16px 20px;
    border-radius: 10px; text-align: right; font-size: 1rem;
    font-family: inherit; cursor: pointer; transition: var(--transition);
}
.option-btn:hover {
    background: rgba(38,166,154,0.08); border-color: var(--accent-color);
    transform: translateX(-5px); box-shadow: var(--shadow-sm);
}
.quiz-result { text-align: center; }
.quiz-result h2 { font-size: 2.5rem; margin-bottom: 30px; }
.result-card {
    background: var(--secondary-color); padding: 30px;
    border-radius: 12px; margin-bottom: 30px; text-align: right;
    box-shadow: var(--shadow-sm);
}
.result-card h3 { font-size: 2rem; margin-bottom: 15px; }
.result-card p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 20px; }
.professions {
    background: rgba(38,166,154,0.08); padding: 15px; border-radius: 8px;
    border-right: 4px solid var(--accent-color);
}
.professions strong { color: var(--accent-color); }

/* Footer */
.footer {
    background: rgba(38,50,56,0.95); backdrop-filter: blur(10px);
    padding: 60px 0 20px; color: #B0BEC5;
}
.footer h2, .footer h3 { color: #fff; }
.footer p { color: #B0BEC5; }
.footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px; margin-bottom: 40px;
}
.footer-logo {
    height: 80px; width: auto; mix-blend-mode: screen;
    margin-bottom: 15px; filter: brightness(1.5);
}
.footer-info h2 { color: var(--accent-color); margin-bottom: 15px; }
.footer-contact h3 { margin-bottom: 15px; }
.footer-contact a { color: var(--accent-color); display: block; margin-top: 10px; }
.footer-contact a:hover { color: #80CBC4; }
.footer-barcodes { display: flex; gap: 20px; }
.barcode { text-align: center; }
.qr-image {
    width: 100px; height: 100px; object-fit: cover;
    border-radius: 10px; margin-bottom: 10px; border: 2px solid var(--accent-color);
}
.footer-bottom {
    text-align: center; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1); color: #78909C;
}

/* Back to Top */
.back-to-top {
    position: fixed; bottom: 30px; left: 30px; z-index: 999;
    width: 50px; height: 50px; border-radius: 50%;
    background: var(--accent-gradient); color: #fff; border: none;
    font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(38,166,154,0.4);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(38,166,154,0.5); }

/* Scroll Reveal */
.reveal {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* CV Builder */
.cv-container {
    max-width: 800px; margin: 0 auto;
    background: var(--card-bg); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 40px;
    box-shadow: var(--shadow-md); backdrop-filter: blur(10px);
}
.form-section { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--glass-border); }
.form-section h3 { color: var(--accent-color); margin-bottom: 20px; font-size: 1.4rem; }
.input-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.input-group { margin-bottom: 15px; display: flex; flex-direction: column; }
.input-group label { margin-bottom: 8px; color: var(--text-primary); font-weight: 500; }
.input-group input, .input-group textarea {
    padding: 14px; border: 1.5px solid var(--glass-border);
    border-radius: 10px; background: rgba(255,255,255,0.6);
    color: var(--text-primary); font-family: inherit;
    font-size: 1rem; transition: var(--transition);
}
.input-group input:focus, .input-group textarea:focus {
    outline: none; border-color: var(--accent-color);
    background: #fff; box-shadow: 0 0 0 3px rgba(38,166,154,0.1);
}
.dynamic-item {
    background: rgba(255,255,255,0.4); padding: 20px;
    border-radius: 10px; margin-bottom: 15px;
    border: 1.5px dashed var(--accent-color); position: relative;
}
.remove-btn {
    position: absolute; top: 10px; left: 10px;
    background: #ff4d4f; color: #fff; border: none;
    border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 2000;
    align-items: center; justify-content: center;
}
.modal.active { display: flex; }
.modal-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(8px); z-index: 2001;
}
.modal-content {
    position: relative; z-index: 2002;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
    width: 90%; max-width: 800px; max-height: 90vh;
    overflow-y: auto; border-radius: 20px; padding: 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    border: 1px solid var(--glass-border);
    animation: modalFadeIn 0.4s ease forwards;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.close-btn {
    position: absolute; top: 15px; left: 15px;
    background: rgba(255,77,79,0.1); color: #ff4d4f;
    border: none; font-size: 1.5rem;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--transition); z-index: 10;
}
.close-btn:hover { background: #ff4d4f; color: #fff; transform: rotate(90deg); }

/* Print Styles */
@media print {
    body * { visibility: hidden; }
    #cv-print-template, #cv-print-template * { visibility: visible; }
    #cv-print-template {
        position: absolute; left: 0; top: 0; width: 100%;
        color: #000; font-family: 'Arial','Calibri',sans-serif !important;
        line-height: 1.5; direction: ltr; text-align: left;
    }
    .cv-header { text-align: center; margin-bottom: 20px; border-bottom: 2px solid #000; padding-bottom: 10px; }
    .cv-header h1 { font-size: 24pt; margin: 0; text-transform: uppercase; color: #000; }
    .cv-header h2 { font-size: 16pt; margin: 5px 0; font-weight: normal; color: #333; }
    .cv-contact { font-size: 11pt; margin: 5px 0; }
    .cv-body-section { margin-bottom: 20px; }
    .cv-heading { font-size: 14pt; text-transform: uppercase; border-bottom: 1px solid #000; padding-bottom: 5px; margin-bottom: 10px; color: #000; }
    .cv-item { margin-bottom: 15px; }
    .cv-item-header { display: flex; justify-content: space-between; font-weight: bold; font-size: 12pt; }
    .cv-item-sub { font-style: italic; margin-bottom: 5px; font-size: 11pt; }
    #cv-print-template p, #cv-print-template li { font-size: 11pt; margin: 0 0 5px 0; }
}

/* Responsive */
@media (max-width: 992px) {
    .navbar { padding: 5px 20px; }
    .hamburger { display: flex; }
    .navbar nav {
        position: fixed; top: 0; left: -100%; width: 75%; height: 100vh;
        background: rgba(255,255,255,0.98); backdrop-filter: blur(20px);
        flex-direction: column; padding: 100px 30px 30px;
        transition: left 0.4s ease; z-index: 999;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    }
    .navbar nav.active { left: 0; }
    .navbar nav ul { flex-direction: column; gap: 20px; align-items: flex-start; width: 100%; }
    .navbar nav ul li { width: 100%; }
    .navbar nav ul li a { font-size: 1.1rem; display: block; padding: 10px 0; }
    .navbar nav ul li a.btn-primary-small { text-align: center; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .main-title { font-size: 4rem; }
    .hero-content { margin-top: 60px; }
    .hero p { font-size: 1.1rem; }
    .hero-buttons button, .hero-buttons a { min-width: 250px; }
    .section-title h2 { font-size: 2rem; }
    .modal-content { padding: 25px 15px; width: 95%; }
    .quiz-container { padding: 25px 15px; }
    .about-grid, .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-barcodes { justify-content: center; }
    .back-to-top { bottom: 20px; left: 20px; width: 45px; height: 45px; }
}
