/* 
 Theme Name:   Hello Elementor Child
 Theme URI:    
 Description:  
 Author:       oussema.selmi.dev@gmail.com
 Author URI:   http://oussemaselmi.com
 Template:     hello-elementor
 Version:      1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

 /* == Add your own styles below this line ==
--------------------------------------------*/

/* ==================== Variables ==================== */
:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ==================== Dark Mode Variables ==================== */
[data-theme="dark"] {
    --primary-color: #818cf8;
    --secondary-color: #a78bfa;
    --text-dark: #f1f5f9;
    --text-light: #cbd5e1;
    --bg-light: #1e293b;
    --white: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: var(--white);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

section {
    padding: 80px 0;
}

/* ==================== Typography ==================== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.highlight {
    color: var(--primary-color);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

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

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

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

.btn-outline {
    background: var(--white);
    color: var(--text-dark);
    border: 2px solid var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .e-con-inner {
    width: 100%;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation Brand */
.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand a {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-dark);
}

/* Navigation Menu Container */
.nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

/* Elementor Nav Menu Styles */
.elementor-nav-menu--main {
    display: flex;
    align-items: center;
}

.elementor-nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.elementor-nav-menu .menu-item {
    margin: 0;
}

.elementor-nav-menu .elementor-item {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
    display: block;
}

.elementor-nav-menu .elementor-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.elementor-nav-menu .elementor-item:hover::after,
.elementor-nav-menu .menu-item.current-menu-item .elementor-item::after {
    width: 100%;
}

.elementor-nav-menu .elementor-item:hover {
    color: var(--primary-color);
}

/* Legacy nav-link support */
.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:active i {
    transform: rotate(360deg);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* ==================== Hero Section ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e7ff 100%);
    position: relative;
    transition: background 0.3s ease;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 1s ease;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    animation: fadeInRight 1s ease;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.image-placeholder i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

/* ==================== About Section ==================== */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-image .image-placeholder {
    aspect-ratio: 1;
}

.about-image .image-placeholder i {
    font-size: 6rem;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: var(--transition);
}

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

.stat-item h4 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==================== Skills Section ==================== */
.skills {
    background: var(--bg-light);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.skill-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.skill-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.skill-icon i {
    font-size: 2rem;
    color: var(--white);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.skill-card p {
    color: var(--text-light);
}

/* Technical Skills */
.tech-skills {
    text-align: center;
}

.tech-skills h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.tech-tag {
    background: var(--white);
    padding: 10px 20px;
    border-radius: 25px;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tech-tag:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: var(--white);
}

/* ==================== Portfolio Section ==================== */
.portfolio {
    background: var(--white);
}

.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.portfolio-item.hide {
    display: none;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.portfolio-image .image-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.portfolio-image .image-placeholder i {
    font-size: 4rem;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.95);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    text-align: center;
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.portfolio-tags span {
    background: var(--white);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.portfolio-links {
    display: flex;
    gap: 1rem;
}

.portfolio-link {
    width: 40px;
    height: 40px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.portfolio-link:hover {
    transform: scale(1.2);
}

/* ==================== Contact Section ==================== */
.contact {
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    width: 45px;
    height: 45px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.social-link:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    transform: translateY(-5px);
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    width: 100%;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* ==================== Project Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 1000px;
    width: 100%;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #ef4444;
    color: var(--white);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

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

.modal-image::before {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 4rem;
    color: var(--text-light);
    opacity: 0.3;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.modal-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.modal-tags span {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.modal-description p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.modal-description ul {
    list-style: none;
    padding: 0;
}

.modal-description ul li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.modal-description ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.modal-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tech span {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-client {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.modal-client h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal-client blockquote {
    margin: 0;
    font-style: italic;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ==================== Animations ==================== */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scroll {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

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

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

    .contact-content {
        grid-template-columns: 1fr;
    }

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

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        min-height: 250px;
    }

    .modal-actions .btn {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}
