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

:root {
    --primary-color: #1a1a1a;
    --accent-color: #9a8a78;
    --text-color: #333;
    --light-gray: #f8f8f8;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Header and Navigation */
.header {
    position: fixed;
    width: 100%;
    background: transparent;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    transition: var(--transition);
    height: 100px; /* Reduced height */
}

[dir="rtl"] .header {
    flex-direction: row !important;
}

.header.scrolled {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 80px; /* Even smaller height when scrolled */
}

.header.scrolled .logo img {
    height: 60px; /* Smaller logo when scrolled */
}

.logo {
    transition: var(--transition);
    line-height: 0;
    position: absolute;
    left: 2rem;
    top: 45px;
    transform: translateY(-50%);
    z-index: 1002;
}

[dir="rtl"] .logo {
    left: 2rem;
    right: auto;
}

.logo img {
    height: 120px;
    width: auto;
    display: block;
    transition: var(--transition);
}

.header.scrolled .logo {
    top: 40px; /* Adjusted position when scrolled */
}

.header.scrolled .menu-btn {
    top: 40px; /* Adjusted position when scrolled */
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: absolute;
    right: 2rem;
    top: 45px;
    transform: translateY(-50%);
    z-index: 1001;
}

[dir="rtl"] .menu-btn {
    right: 2rem;
    left: auto;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--primary-color);
    margin: 6px 0;
    transition: var(--transition);
}

.header.scrolled .menu-btn span {
    background: var(--primary-color);
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    padding: 5rem 2rem 2rem;
}

[dir="rtl"] .main-nav {
    right: -100%;
    left: auto;
}

.main-nav.active {
    right: 0;
}

[dir="rtl"] .main-nav.active {
    right: 0;
    left: auto;
}

.nav-links {
    list-style: none;
}

[dir="rtl"] .nav-links {
    text-align: right;
}

.nav-links li {
    margin-bottom: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 400;
    font-size: 1.1rem;
    transition: var(--transition);
    display: block;
}

.nav-links a:hover {
    color: var(--accent-color);
    transform: translateX(10px);
}

[dir="rtl"] .nav-links a:hover {
    transform: translateX(-10px);
}

/* Force menu to stay on the right in RTL */
[dir="rtl"] .header {
    flex-direction: row !important;
}

[dir="rtl"] .logo {
    order: 1;
}

[dir="rtl"] .menu-btn {
    order: 2;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    /* background-color: #b0b0b0; */ /* Removed grey background */
    background-image: url('images/gea/KRP_2310-Edit.jpg'); /* Set image background */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Remove Foreground Image Styles */
/*
.hero-foreground-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    width: 70%; 
    max-height: 80%; 
    object-fit: cover; 
    z-index: 0; 
    opacity: 0.9; 
     border-radius: 8px; 
}
*/

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 1; 
    position: relative; 
    transform: translateY(-25vh); /* Moved down slightly */
    /* text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4); */ /* Removed text shadow as text is black now */
}

.hero h1 {
    font-size: 1.6rem; 
    margin-bottom: 0.5rem; /* Reduced bottom margin */
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--primary-color); 
}

/* Removed .hero p rule as element is gone */

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    color: var(--primary-color); 
    text-decoration: none;
    border: 1px solid var(--primary-color); 
    transition: var(--transition);
    font-weight: 400;
    letter-spacing: 1px;
    margin-top: 0.5rem; /* Reduced top margin */
}

.cta-button:hover {
    background: var(--primary-color); /* Hover background black */
    color: var(--white); /* Hover text white */
}

/* About Section */
.about {
    padding: 2rem 2rem; /* Reduced from 4rem to 2rem */
    background: var(--white);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-image {
    flex: 0 0 auto;
}

.about-image img {
    width: auto;
    height: 550px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-content {
    flex: 1;
    text-align: left;
}

.about p {
    font-family: 'Open Sans', sans-serif;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-color);
    font-weight: 400;
}

.about p:last-child {
    margin-bottom: 0;
}

/* Press Features Section */
.press-features {
    padding: 4rem 2rem; /* Reduced padding compared to about */
    background: var(--white); /* Same background as about */
}

.press-features-content {
    max-width: 1000px; 
    margin: 0 auto;
    text-align: center;
}

.press-items {
    display: grid; /* Use grid for better alignment */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    gap: 2.5rem; /* Increased gap */
    /* Removed flexbox properties */
}

.press-item {
    display: block; 
    /* Removed text-decoration (was on <a>) */
    color: var(--text-color);
    padding: 1.5rem; 
    border: 1px solid #eee; 
    border-radius: 4px;
    transition: var(--transition);
    max-width: 400px; /* Adjusted max-width */
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    text-align: right;
    /* Removed hover effect - link is separate now */
}

.press-item-source {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600; /* Bold Source */
    font-size: 1.2rem; /* Larger Source */
    color: var(--primary-color); /* Darker Source */
    /* Removed text-transform/letter-spacing */
    margin: 0 0 0.3rem 0; /* Adjusted margin */
}

.press-item-date {
    display: block;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.85rem;
    color: #888; /* Grey date */
    margin-bottom: 1rem;
}

.press-item-snippet {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1.2rem;
}

.press-item-readmore {
    display: inline-block; /* Keep inline-block */
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.press-item-readmore:hover {
    color: var(--primary-color);
}

.press-item-source.ynet-style {
    display: block;
    width: 80px;
    height: 26px;
    margin-bottom: 0.5rem;
    background-image: url('images/press/ynet_logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
}

.press-item-source.walls-style {
    display: block;
    width: 120px;
    height: 40px;
    margin-bottom: 0.5rem;
    background-image: url('images/press/walls_logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
}

.press-item-source.pnim-style {
    display: block;
    width: 120px;
    height: 40px;
    margin-bottom: 0.5rem;
    background-image: url('images/press/pnim_logo.jpeg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
}

.press-item-source.mako-style {
    display: block;
    width: 100px;
    height: 40px;
    margin-bottom: 0.5rem;
    background-image: url('images/press/mako_logo.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
}

/* Removed specific ynet-style rules */

/* Portfolio Section - General */
.portfolio {
    padding: 6rem 2rem; /* Adjusted padding */
    background: var(--white); /* Changed background */
}

.portfolio h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 4rem;
    font-weight: 400;
    color: var(--text-color); /* Ensure heading color */
}

/* Portfolio Grid - Project Style (for portfolio.html) */
.portfolio-grid.project-style-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column */
    gap: 5rem; /* Increased gap for side-by-side layout */
    max-width: 1100px; /* Allow more width for side-by-side */
    margin: 0 auto;
    padding: 0 2rem; /* Add padding */
}

/* Portfolio Item - Project Style */
.portfolio-item.project-style-item {
    display: flex; /* Back to Flexbox */
    align-items: center; /* Center items vertically */
    gap: 0.75rem; /* Reduced gap */
    /* Remove Grid properties if any exist */
    /* grid-template-columns: ...; */
    /* column-gap: ...; */
}

.portfolio-item.project-style-item img {
    flex: 3 1 auto; /* Image takes more space, shrinks/grows */
    width: 60%; /* Provide fallback width */
    height: auto; 
    object-fit: cover;
    display: block; 
    transition: opacity 0.3s ease; 
    /* Remove Grid assignment */
    /* grid-column: ...; */
}

/* Remove Grid assignment if exists */
/* .portfolio-item.project-style-item:nth-child(even) img { ... } */

.portfolio-item.project-style-item:hover img {
     opacity: 0.9; 
}

/* Project Details Styling (Side-by-side - Flex) */
.project-details {
    flex: 1 1 auto; /* Text takes less space, shrinks/grows */
    text-align: left; /* Default alignment */
    /* Remove Grid assignment */
    /* grid-column: ...; */
    /* Remove padding used for grid spacing */
     /* padding-right: ...; */
    /* padding-left: ...; */
}

/* Alternating Layout using flex order */
.portfolio-item.project-style-item:nth-child(odd) .project-details {
    order: -1; /* Text comes first on odd items */
}

/* Align text right for even items */
.portfolio-item.project-style-item:nth-child(even) .project-details {
     text-align: right; /* Align text to the right for even items */
}

/* Project Number Style - REMOVED */
/*
.project-number {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 1rem; 
    color: #999; 
}
*/

.project-details h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem; 
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 0.1rem; /* Set margin to 0.1rem */
    letter-spacing: 0.5px;
}

.project-details p {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem; 
    color: #666;
    margin-bottom: 0.1rem; /* Set margin to 0.1rem */
}

.project-details .view-project-link {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem; 
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.project-details .view-project-link:hover {
    color: var(--primary-color);
}

/* --- Remove Old/Unused Overlay Styles --- */
.portfolio-overlay {
   display: none; 
}
.project-info-overlay {
    display: none; /* Ensure any remnants are hidden */
}
/* --- End Remove --- */

/* Contact Section REMOVED - styles can be deleted if not needed */

/* Footer */
.footer {
    background: var(--light-gray); 
    color: var(--text-color); 
    padding: 3rem 2rem; 
    direction: ltr !important;
}

.footer-content {
    display: flex; 
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center; 
    gap: 2rem; 
    max-width: 1200px;
    margin: 0 auto;
}

.footer-contact-info {
    margin-bottom: 0; 
    text-align: left !important;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-contact-info p {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555; 
    margin: 0;
    text-align: left !important;
}

.social-links {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-links a {
    color: var(--primary-color); 
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.5rem; 
    margin: 0;
}

.social-links a:hover {
    color: var(--accent-color); 
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

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

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile-specific footer styles */
    .footer {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column !important;
        align-items: center;
        gap: 1.5rem;
    }
    
    .footer-contact-info {
        flex-direction: column;
        text-align: center !important;
        gap: 1rem;
    }
    
    .contact-details {
        align-items: center;
    }
    
    .social-links {
        margin-top: 1rem;
    }
    
    /* Mobile-specific portfolio styles */
    .portfolio-item.project-style-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .portfolio-item.project-style-item img {
        width: 100%;
    }
    
    .project-details {
        width: 100%;
    }
    
    .project-details h3 {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .portfolio-item.project-style-item:nth-child(odd) .project-details,
    .portfolio-item.project-style-item:nth-child(even) .project-details {
        order: 0;
        text-align: left;
    }
}

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

    .hero p {
        font-size: 1rem;
    }

    .about h2,
    .portfolio h2,
    .contact h2 {
        font-size: 1.8rem;
    }
    
    /* Additional mobile-specific footer styles for smaller screens */
    .footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-contact-info p {
        font-size: 0.85rem;
    }
    
    .social-links a {
        font-size: 1.3rem;
    }
    
    /* Additional mobile-specific portfolio styles for smaller screens */
    .portfolio-item.project-style-item {
        gap: 1rem;
    }
    
    .project-details h3 {
        font-size: 1.2rem;
    }
    
    .project-details p {
        font-size: 0.9rem;
    }
    
    .project-details .view-project-link {
        font-size: 0.85rem;
    }
}

/* Remove any RTL-specific footer styles */
[dir="rtl"] .footer,
[dir="rtl"] .footer-content,
[dir="rtl"] .footer-contact-info,
[dir="rtl"] .social-links {
    direction: ltr !important;
    text-align: left !important;
}

/* Ensure header on portfolio page always has scrolled appearance */
.portfolio-page .header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.portfolio-page .header .logo {
    /* Logo color is handled by the image now */
}

.portfolio-page .header .menu-btn span {
     background: var(--primary-color);
}

/* --- Individual Project Page Styles --- */

.project-main-content {
    padding: 10rem 2rem 4rem; /* Adjust top padding to clear fixed header */
    max-width: 1200px;
    margin: 0 auto;
}

.project-header, .project-footer {
    text-align: center; /* Center back links */
    margin-bottom: 3rem;
}

.project-footer {
    margin-top: 4rem;
    margin-bottom: 0;
}

.back-link {
    font-family: 'Open Sans', sans-serif;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

.project-image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

.project-image-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* Ensure images appear in order */
.project-image-grid img:nth-child(1) { order: 1; }
.project-image-grid img:nth-child(2) { order: 2; }
.project-image-grid img:nth-child(3) { order: 3; }
.project-image-grid img:nth-child(4) { order: 4; }
.project-image-grid img:nth-child(5) { order: 5; }
.project-image-grid img:nth-child(6) { order: 6; }
.project-image-grid img:nth-child(7) { order: 7; }
.project-image-grid img:nth-child(8) { order: 8; }
.project-image-grid img:nth-child(9) { order: 9; }
.project-image-grid img:nth-child(10) { order: 10; }
.project-image-grid img:nth-child(11) { order: 11; }
.project-image-grid img:nth-child(12) { order: 12; }
.project-image-grid img:nth-child(13) { order: 13; }
.project-image-grid img:nth-child(14) { order: 14; }
.project-image-grid img:nth-child(15) { order: 15; }
.project-image-grid img:nth-child(16) { order: 16; }
.project-image-grid img:nth-child(17) { order: 17; }
.project-image-grid img:nth-child(18) { order: 18; }
.project-image-grid img:nth-child(19) { order: 19; }
.project-image-grid img:nth-child(20) { order: 20; }
.project-image-grid img:nth-child(21) { order: 21; }
.project-image-grid img:nth-child(22) { order: 22; }
.project-image-grid img:nth-child(23) { order: 23; }
.project-image-grid img:nth-child(24) { order: 24; }
.project-image-grid img:nth-child(25) { order: 25; }
.project-image-grid img:nth-child(26) { order: 26; }
.project-image-grid img:nth-child(27) { order: 27; }
.project-image-grid img:nth-child(28) { order: 28; }
.project-image-grid img:nth-child(29) { order: 29; }
.project-image-grid img:nth-child(30) { order: 30; }
.project-image-grid img:nth-child(31) { order: 31; }
.project-image-grid img:nth-child(32) { order: 32; }
.project-image-grid img:nth-child(33) { order: 33; }
.project-image-grid img:nth-child(34) { order: 34; }
.project-image-grid img:nth-child(35) { order: 35; }
.project-image-grid img:nth-child(36) { order: 36; }
.project-image-grid img:nth-child(37) { order: 37; }
.project-image-grid img:nth-child(38) { order: 38; }
.project-image-grid img:nth-child(39) { order: 39; }
.project-image-grid img:nth-child(40) { order: 40; }
.project-image-grid img:nth-child(41) { order: 41; }
.project-image-grid img:nth-child(42) { order: 42; }
.project-image-grid img:nth-child(43) { order: 43; }
.project-image-grid img:nth-child(44) { order: 44; }
.project-image-grid img:nth-child(45) { order: 45; }
.project-image-grid img:nth-child(46) { order: 46; }
.project-image-grid img:nth-child(47) { order: 47; }
.project-image-grid img:nth-child(48) { order: 48; }

/* Responsive adjustments for project page */
@media (max-width: 768px) {
    .project-image-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile-specific footer styles for project pages */
    .project-page .footer {
        padding: 2rem 1.5rem;
    }
    
    .project-page .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
    }
    
    .project-page .footer-contact-info {
        text-align: center;
    }
    
    .project-page .social-links {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .project-page .footer {
        padding: 1.5rem 1rem;
    }
    
    .project-page .footer-contact-info p {
        font-size: 0.85rem;
    }
    
    .project-page .social-links a {
        font-size: 1.3rem;
        margin: 0 0.5rem;
    }
}

/* Responsive Design */ 

.about-section {
    padding: 80px 20px;
    background-color: #fff;
}

.about-container {
    display: flex;
    align-items: center;
    gap: 20px; /* Reduced gap between image and text */
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.about-image {
    flex: 0 0 auto;
    max-width: 550px;
    overflow: hidden;
}

.about-image img {
    width: auto;
    height: 550px;
    object-fit: cover;
    border-radius: 8px;
    max-width: 100%;
    display: block;
}

.about-content {
    flex: 1;
    padding: 0 20px;
}

.about-content h2 {
    margin-bottom: 20px;
    font-size: 2.5em;
    color: #333;
}

.about-content p {
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.about-content p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        margin-bottom: 30px;
    }
} 