/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Mode Colors */
    --bg-primary: #FAF9F6;
    --bg-secondary: #ffffff;
    --bg-accent: #F9C74F;
    --bg-green: #90BE6D;
    --bg-orange: #F3722C;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #555555;
    --border-color: #e0e0e0;
    --shadow: rgba(0,0,0,0.1);
    --shadow-hover: rgba(0,0,0,0.15);
}

[data-theme="dark"] {
    /* Dark Mode Colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-accent: #f4b942;
    --bg-green: #7ba05b;
    --bg-orange: #e85d1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-light: #aaaaaa;
    --border-color: #404040;
    --shadow: rgba(0,0,0,0.3);
    --shadow-hover: rgba(0,0,0,0.4);
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navigation */
.navbar {
    background-color: var(--bg-primary);
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

/* Hamburger Menu Styles */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-toggle:hover .hamburger-line {
    background-color: var(--bg-orange);
}

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

.nav-logo h2 {
    color: var(--bg-orange);
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav-menu a:hover {
    color: var(--bg-orange);
}

.nav-cta {
    background-color: var(--bg-orange) !important;
    color: white !important;
    font-weight: 600;
}

.nav-cta:hover {
    background-color: #e85d1a !important;
    color: white !important;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: 2px solid var(--text-primary);
    color: var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background-color: var(--bg-orange);
    border-color: var(--bg-orange);
    color: white;
    transform: scale(1.1);
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px var(--shadow);
}

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

.hero-cta {
    background-color: var(--bg-orange);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 4px 15px rgba(243, 114, 44, 0.3);
}

.hero-cta:hover {
    background-color: #e85d1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(243, 114, 44, 0.4);
}

/* Haidi Portrait */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.haidi-portrait {
    position: relative;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.chips-bag {
    width: 300px;
    height: 400px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    border-radius: 30px 30px 15px 15px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chips-bag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
    border-radius: 30px 30px 0 0;
}

.bag-face {
    margin-bottom: 2rem;
}

.eyes {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.eye {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    position: relative;
}

.eye::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #333333;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.smile {
    width: 80px;
    height: 40px;
    border: 6px solid white;
    border-top: none;
    border-radius: 0 0 80px 80px;
}

.bag-text {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: var(--bg-orange);
    border-radius: 2px;
}

/* Story Timeline Section */
.story-section {
    padding: 5rem 0;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--bg-green);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
    text-align: left;
}

.timeline-item:nth-child(even) {
    text-align: right;
}

.timeline-icon {
    width: 80px;
    height: 80px;
    background-color: var(--bg-secondary);
    border: 4px solid var(--bg-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    z-index: 2;
    box-shadow: 0 4px 15px var(--shadow);
    transition: background-color 0.3s ease;
}

.timeline-content {
    width: 45%;
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: 0 5px 20px var(--shadow);
    margin: 0 2rem;
    transition: background-color 0.3s ease;
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bg-orange);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Gallery Section */
.gallery-section {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

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

.gallery-item {
    background-color: var(--bg-primary);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 15px var(--shadow);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-hover);
}

.gallery-item img {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 15px;
    object-fit: cover;
    display: block;
    box-shadow: 0 3px 10px var(--shadow);
}

.play-button, .photo-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.play-button {
    background-color: var(--bg-orange);
}

.photo-placeholder {
    background-color: var(--bg-green);
}

.gallery-item p {
    font-weight: 600;
    color: var(--text-primary);
}

/* Values Section */
.values-section {
    padding: 5rem 0;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

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

.value-card {
    background-color: var(--bg-secondary);
    padding: 3rem 2rem;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 5px 20px var(--shadow);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-hover);
}

.value-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.value-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--bg-orange);
    margin-bottom: 1rem;
}

.value-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Messages Section */
.messages-section {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

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

.message-card {
    text-align: center;
}

.message-bubble {
    background-color: var(--bg-accent);
    padding: 2rem;
    border-radius: 25px;
    margin-bottom: 1rem;
    position: relative;
    box-shadow: 0 5px 15px var(--shadow);
    transition: background-color 0.3s ease;
}

.message-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid var(--bg-accent);
}

.message-bubble p {
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.6;
}

.message-author {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Join Section */
.join-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--bg-green) 0%, #7ba05b 100%);
    text-align: center;
    transition: background 0.3s ease;
}

.join-content h2 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.join-content p {
    font-size: 1.3rem;
    color: white;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.join-cta {
    background-color: var(--bg-orange);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 5px 20px rgba(243, 114, 44, 0.3);
}

.join-cta:hover {
    background-color: #e85d1a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(243, 114, 44, 0.4);
}

/* Footer */
.footer {
    background-color: var(--bg-primary);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.footer-content {
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--bg-orange);
}

.footer-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */

/* Tablet Styles */
@media (max-width: 1024px) {
    .hero-container {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .chips-bag {
        width: 280px;
        height: 360px;
    }
    
    .timeline-content {
        width: 42%;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .messages-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-toggle {
        display: flex !important;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--bg-primary);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        box-shadow: -5px 0 20px var(--shadow);
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 1000;
        justify-content: flex-start;
        align-items: stretch;
        overflow-y: auto;
    }
    
    .nav-menu-active {
        right: 0 !important;
    }
    
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: -100vw;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }
    
    .nav-menu-active::before {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 0;
        width: 100%;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
        font-weight: 500;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background-color: var(--bg-orange);
        color: white !important;
        transform: translateX(-5px);
    }
    
    .nav-cta {
        background-color: var(--bg-orange) !important;
        color: white !important;
        border-radius: 25px !important;
        margin: 1rem 0 !important;
        border: none !important;
    }
    
    .nav-cta:hover {
        background-color: #e85d1a !important;
        transform: translateX(-5px) scale(1.05) !important;
    }
    
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin: 1rem auto;
        border-radius: 50%;
    }
    
    .theme-toggle:hover {
        transform: scale(1.1);
    }
    
    /* Hero Section */
    .hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-cta {
        padding: 0.9rem 2rem;
        font-size: 1.1rem;
    }
    
    .chips-bag {
        width: 220px;
        height: 300px;
    }
    
    /* Sections */
    .story-section,
    .gallery-section,
    .values-section,
    .messages-section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 2rem;
    }
    
    /* Timeline */
    .timeline::before {
        right: 25px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        text-align: right !important;
        margin-bottom: 2rem;
    }
    
    .timeline-icon {
        right: 25px;
        transform: translateX(50%);
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .timeline-content {
        width: calc(100% - 100px);
        margin-right: 85px;
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .timeline-content h3 {
        font-size: 1.3rem;
    }
    
    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .gallery-item {
        padding: 1.5rem;
    }
    
    .gallery-item img {
        width: 80px;
        height: 80px;
    }
    
    /* Values */
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .value-card {
        padding: 2rem 1.5rem;
    }
    
    .value-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .value-card h3 {
        font-size: 1.5rem;
    }
    
    /* Messages */
    .messages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .message-bubble {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-logo h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
    }
    
    .chips-bag {
        width: 180px;
        height: 250px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-right: 70px;
        padding: 1.2rem;
    }
    
    .timeline-content h3 {
        font-size: 1.2rem;
    }
    
    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        right: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        padding: 1.2rem;
    }
    
    .gallery-item img {
        width: 70px;
        height: 70px;
    }
    
    .value-card {
        padding: 1.5rem 1rem;
    }
    
    .value-icon {
        font-size: 2.5rem;
    }
    
    .value-card h3 {
        font-size: 1.3rem;
    }
    
    .message-bubble {
        padding: 1.2rem;
    }
    
    .nav-menu {
        padding: 1.5rem 1rem;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.9rem;
    }
    
    .chips-bag {
        width: 160px;
        height: 220px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .timeline-content {
        width: calc(100% - 70px);
        margin-right: 60px;
        padding: 1rem;
    }
    
    .gallery-item img {
        width: 60px;
        height: 60px;
    }
}
