/* ============================================
   شركة الحفناوي للاستثمار - التصميم الاحترافي
   تصميم وبرمجة إيجي كونكت للبرمجيات
   ============================================ */

:root {
    --primary: #6b3f2a;
    --primary-dark: #4a2c1a;
    --primary-light: #8b5a3c;
    --secondary: #c9a87c;
    --secondary-dark: #b8956a;
    --accent: #e8c99e;
    --dark: #2c1a12;
    --light: #faf0e6;
    --white: #ffffff;
    --gray: #8d7b6c;
    --beige: #f5e6d3;
    --success: #5a8f4c;
    --error: #c44f4f;
    --warning: #e6a345;
    --info: #4a9ea8;
    --gradient: linear-gradient(135deg, var(--primary), var(--primary-dark));
    --gradient-light: linear-gradient(135deg, var(--primary-light), var(--secondary));
    --shadow-sm: 0 2px 8px rgba(44, 26, 18, 0.08);
    --shadow-md: 0 5px 20px rgba(44, 26, 18, 0.12);
    --shadow-lg: 0 15px 40px rgba(44, 26, 18, 0.15);
    --shadow-xl: 0 25px 50px rgba(44, 26, 18, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    background: var(--beige);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--beige);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========== Header ========== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(44, 26, 18, 0.95);
    backdrop-filter: blur(12px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header.scrolled {
    background: var(--primary-dark);
    padding: 5px 0;
    box-shadow: var(--shadow-lg);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    position: relative;
    overflow: hidden;
}

.logo a {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo span {
    color: var(--secondary);
    position: relative;
}

.logo span::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

.logo:hover span::before {
    transform: scaleX(1);
}

/* Navigation */
.main-nav ul {
    display: flex;
    gap: 35px;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: right;
}

.main-nav a:hover::before,
.main-nav a.active::before {
    transform: scaleX(1);
}

.main-nav a:hover {
    color: var(--secondary);
    transform: translateY(-2px);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--white);
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    color: var(--secondary);
    transform: scale(1.05);
}

/* ========== Hero Section ========== */
.hero-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    overflow: hidden;
}

.hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-bg-animation .circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 20s infinite;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 500px;
    height: 500px;
    bottom: -200px;
    left: -150px;
    animation-delay: 5s;
}

.circle-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 20%;
    animation-delay: 10s;
}

.circle-4 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    right: 60%;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 14px;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero-title .highlight {
    color: var(--secondary);
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(201, 168, 124, 0.3);
    z-index: -1;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* ========== Buttons ========== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(107, 63, 42, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    background: transparent;
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    border: 2px solid var(--white);
    transition: var(--transition);
    cursor: pointer;
}

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

/* ========== Section Styles ========== */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(107, 63, 42, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    transition: var(--transition);
}

.section-tag:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.section-title span {
    color: var(--primary);
    position: relative;
}

.section-title span::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    border-radius: 4px;
    transform: scaleX(0.7);
    transition: var(--transition);
}

.section-title:hover span::after {
    transform: scaleX(1);
}

.section-desc {
    max-width: 700px;
    margin: 0 auto;
    color: var(--gray);
}

/* ========== Cards Grid ========== */
.sectors-grid,
.blog-grid,
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Sector Card */
.sector-card,
.blog-card,
.media-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.sector-card::before,
.blog-card::before,
.media-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.sector-card:hover::before,
.blog-card:hover::before,
.media-card:hover::before {
    transform: scaleX(1);
}

.sector-card:hover,
.blog-card:hover,
.media-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.sector-icon {
    width: 80px;
    height: 80px;
    margin: 30px auto 20px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    color: var(--white);
    transition: var(--transition);
}

.sector-card:hover .sector-icon {
    transform: scale(1.1) rotate(10deg);
}

.sector-card h3,
.blog-card h3,
.media-card h3 {
    padding: 0 25px;
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.sector-card p,
.blog-card p,
.media-card p {
    padding: 0 25px 20px;
    color: var(--gray);
    line-height: 1.7;
}

.sector-link,
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 25px 25px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.sector-link:hover,
.read-more:hover {
    gap: 15px;
    color: var(--primary-dark);
}

/* ========== About Section ========== */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content .section-title {
    text-align: right;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 20px 0;
    color: var(--gray);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat {
    text-align: center;
    padding: 25px;
    background: var(--beige);
    border-radius: 15px;
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 800;
}

.stat p {
    color: var(--gray);
    margin-top: 5px;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    height: auto;
    transition: var(--transition-slow);
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(107, 63, 42, 0.3), transparent);
    z-index: 1;
}

/* ========== CTA Section ========== */
.cta-section {
    background: var(--gradient);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-content .btn-primary {
    background: var(--white);
    color: var(--primary);
    font-size: 1.1rem;
}

.cta-content .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ========== Footer ========== */
.main-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 70px 0 30px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
}

.footer-section p {
    color: #d4c5b5;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #d4c5b5;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a:hover {
    color: var(--secondary);
    transform: translateX(-5px);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--white);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px) rotate(360deg);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.egyconnect {
    margin-top: 10px;
    font-size: 0.9rem;
}

.egyconnect a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: bold;
    transition: var(--transition);
}

.egyconnect a:hover {
    color: var(--white);
    text-decoration: underline;
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .sectors-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .sectors-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .btn-primary,
    .btn-outline {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .stat h3 {
        font-size: 2rem;
    }
}
