/* =========================================
   NEXUS MEDIA - MAIN STYLES (Refined)
   Theme: Red/Crimson (#ff003c) | Dark Mode
   Fonts: Playfair Display (Headings), Montserrat (Body)
   ========================================= */

   :root {
    /* --- Colors --- */
    --bg-dark: #050505;       /* Deep Black */
    --bg-card: rgba(255, 255, 255, 0.03); 
    --bg-card-hover: rgba(255, 0, 60, 0.08); /* Red Tint Hover */
    
    --accent-primary: #ff003c;   /* NEON RED */
    --accent-secondary: #a60028; 
    
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    
    /* --- Typography --- */
    --font-heading: 'Playfair Display', serif; 
    --font-body: 'Montserrat', sans-serif;
    
    /* --- Spacing --- */
    --container-width: 1400px;
    --border-radius: 4px; /* Sharper edges for "organized" look */
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- Background --- */
.site-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
#particle-canvas { width: 100%; height: 100%; opacity: 0.4; }

/* --- Header --- */
.main-header {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4rem;
    position: fixed;
    top: 0; width: 100%;
    z-index: 100;
    transition: background 0.3s;
    background: rgba(5, 5, 5, 0.8); /* Slight transparancy like Growth */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.back-link:hover {
    color: white;
    background: rgba(255, 0, 60, 0.1);
    border-color: var(--accent-primary);
    transform: translateX(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 60, 0.15);
}

.header-logo {
    height: 60px; /* Kept appropriate size */
    width: auto;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-link { 
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500; /* Medium weight */
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading); /* Use Heading Font like Growth */
    transition: color 0.3s;
}

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

/* Highlight Button (Contact) */
.nav-link.highlight-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 0, 60, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 6px;
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-link.highlight-btn:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.4);
    transform: translateY(-1px);
}

/* Language Switcher */
.lang-item {
    display: flex;
    align-items: center;
    margin-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1.5rem;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-icon { width: 18px; height: 18px; }

.lang-switch:hover { color: var(--accent-primary); }

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh; /* Keep full height background */
    display: flex;
    align-items: flex-start; /* Align to top instead of center */
    padding-top: 180px; /* Header (100px) + Gap (80px) */
    position: relative;
    padding-bottom: 50px;
}
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 2rem; }
.hero-grid { 
    display: flex;
    gap: 2rem; 
    align-items: flex-start; /* Align content items to top approx */
    position: relative;
    height: 100%;
    width: 100%; /* Ensure full width */
}

/* Adjust the visual orb vertical pos if needed since we moved text up */
.hero-visual {
    flex: 1.2;
    display: flex;
    justify-content: center;
    align-items: center; /* Keep orb centered in its column or adjust? */
    position: relative;
    z-index: 1;
    margin-top: -50px; /* Pull orb up slightly to match text baseline */
}

.hero-content {
    flex: 1;
    z-index: 2;
    padding-top: 2rem; /* Small internal padding */
}

.modern-orb {
    position: relative;
    width: 100vh; /* Massive sizing */
    height: 100vh;
    background: radial-gradient(circle, rgba(255, 0, 60, 0.08) 0%, transparent 70%); /* Red Glow */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.core-img {
    width: 140%; /* Oversized */
    max-width: 1600px;
    filter: drop-shadow(0 20px 50px rgba(255, 0, 60, 0.4)); /* Stronger Red Shadow */
    animation: float 6s ease-in-out infinite;
    transform: scale(1.15);
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 6rem;
    line-height: 1.3;
    margin-bottom: 2rem;
}
.highlight { 
    color: transparent;
    -webkit-text-stroke: 1px var(--accent-primary); /* Thinner stroke for Cairo */
    background: linear-gradient(to bottom, transparent 40%, rgba(255, 0, 60, 0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 8px rgba(255, 0, 60, 0.5));
    font-style: normal; /* Cairo doesn't always have italic */
    display: inline-block;
}
.hero-desc {
    font-size: 1.1rem; color: var(--text-muted); max-width: 500px; margin-bottom: 3rem;
    padding-left: 2rem; border-left: 1px solid var(--accent-primary);
}
.btn-primary {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--accent-primary);
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}
.btn-primary:hover { background: var(--accent-secondary); }

/* --- Scrolling Gallery (The "Long Cards") --- */
.scroll-section-container {
    min-height: 100vh; /* Centering Fix: Occupy full screen */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically in the middle */
    overflow: hidden;
    position: relative;
    background: linear-gradient(to bottom, #050505, #0a0a0a, #050505);
}

.section-header { 
    margin-bottom: 4rem; 
    padding-left: 5vw; /* Align with track start */
}
.section-tag { color: var(--accent-primary); letter-spacing: 4px; font-size: 0.8rem; display: block; margin-bottom: 1rem; }
.section-title { font-family: var(--font-heading); font-size: 3rem; }

.scroll-track {
    display: flex;
    gap: 3rem; /* Increase gap for cleaner look */
    padding: 0 5vw; /* Buffer on sides so it's not "eaten" immediately */
    width: max-content;
}

.portfolio-card {
    min-width: 500px; /* Wider/Longer cards */
    height: 70vh; /* Responsive height */
    max-height: 700px;
    position: relative;
    overflow: hidden;
    background: #111;
    transition: 0.4s;
    border: 1px solid rgba(255,255,255,0.05);
}
.portfolio-card:hover { 
    transform: translateY(-10px) scale(1.02); 
    border-color: var(--accent-primary);
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.portfolio-img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.6; transition: 0.5s;
}
.portfolio-card:hover .portfolio-img { opacity: 0.4; scale: 1.1; }

.portfolio-info {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 2.5rem;
    background: linear-gradient(to top, #000 0%, transparent 100%);
}
.p-cat { color: var(--accent-primary); font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; }
.p-title { font-family: var(--font-heading); font-size: 2.5rem; color: white; margin: 0.5rem 0; line-height: 1.1; }

/* --- 3-Card Grid (Standardized) --- */
.section-padding { padding: 8rem 0; }
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns */
    gap: 2rem;
}

.tech-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 3rem;
    border-radius: var(--border-radius);
    transition: 0.4s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
    height: 100%; /* Equal height */
}

.tech-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.card-icon {
    font-size: 1.5rem; color: var(--accent-primary); border: 1px solid var(--accent-primary);
    border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 2rem; font-family: var(--font-body);
}

.tech-card h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-style: italic;
    color: var(--text-main);
}

.tech-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* --- Contact Section --- */
.contact-section {
    background: black; /* Solid black to distinguish functionality */
    padding: 6rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.contact-container {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 6rem 4rem;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.glow-corner {
    position: absolute;
    width: 250px; height: 250px;
    background: var(--accent-primary);
    filter: blur(100px);
    opacity: 0.2;
}
.gc-1 { top: -80px; left: -80px; }
.gc-2 { bottom: -80px; right: -80px; }

/* --- Footer --- */
.main-footer { padding: 5rem 0 2rem; background: #020202; border-top: 1px solid rgba(255,255,255,0.05); }

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Default left alignment */
}

/* Center Brand Section on Desktop if requested, or just apply text-align center if that is the specific request. 
   User said "Logo in middle of text". 
   Let's changing align-items to center and text-align to center for this block only. 
*/

.footer-brand {
    align-items: center;
    text-align: center;
}

.footer-logo { width: 150px; margin-bottom: 1.5rem; }
.footer-desc { 
    color: var(--text-muted); 
    max-width: 300px; 
    font-size: 0.95rem; 
    line-height: 1.6;
    margin: 0 auto; /* Center the text block itself if it has max-width */
}

.footer-social h4, .footer-contact h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

/* Social Icons */
.social-icons { display: flex; gap: 1rem; }
.social-link {
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; transition: 0.3s;
}
.social-link:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}
.social-svg { width: 20px; height: 20px; }

/* Contact Items */
.contact-item {
    display: block;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    transition: 0.3s;
}
a.contact-item:hover { color: var(--accent-primary); padding-left: 5px; }

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #555;
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 1024px) {
    .portfolio-card { min-width: 400px; height: 60vh; }
    .hero-title { font-size: 4rem; }
    .solutions-grid { grid-template-columns: 1fr; } 
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
    .hero-grid { grid-template-columns: 1fr; gap: 4rem; }
    .hero-title { font-size: 3.5rem; }
    .main-header { padding: 0 1.5rem; }
    .portfolio-card { min-width: 300px; height: 50vh; }
    .scroll-section-container { height: auto; min-height: auto; padding: 4rem 0; display: block; }
    .scroll-track { overflow-x: scroll; padding-bottom: 2rem; gap: 1rem; width: auto; } /* Native scroll on mobile */
}
