/* Customized for Dvir Engineering & Construction */

@import url(fontawesome-all.min.css);
@import url("https://fonts.googleapis.com/css?family=Heebo:300,400,700,900");

/* Reset */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
body {
	-webkit-text-size-adjust: none;
}
mark {
	background-color: transparent;
	color: inherit;
}
input::-moz-focus-inner {
	border: 0;
	padding: 0;
}
input, select, textarea {
	-moz-appearance: none;
	-webkit-appearance: none;
	-ms-appearance: none;
	appearance: none;
}

/* Basic */
html {
	box-sizing: border-box;
}
*, *:before, *:after {
	box-sizing: inherit;
}

body {
    background: #ffffff;
    font-family: "Heebo", sans-serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    direction: rtl;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#root {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

body.is-preload *, body.is-preload *:before, body.is-preload *:after {
	animation: none !important;
	transition: none !important;
}

/* Type */
h1, h2, h3, h4, h5, h6 {
	font-weight: 700;
	line-height: 1.5;
	margin: 0 0 1rem 0;
	color: #005f5f;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.5rem 0; }
a {
	transition: color 0.2s ease-in-out;
	color: #008080;
	text-decoration: none;
	border-bottom: none;
}
a:hover {
	color: #18bfef;
}

/* Navigation Bar */
#nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    background-color: #006d6d;
    color: #ffffff;
    height: 70px; /* Increased height */
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#nav .nav-left, #nav .nav-center, #nav .nav-right {
    display: flex;
    align-items: center;
}
#nav .nav-right { flex: 1; justify-content: flex-start; }
#nav .nav-center { flex: 2; justify-content: center; }
#nav .nav-left { flex: 1; justify-content: flex-end; }

#nav .logo img {
    height: 60px; /* Increased logo height */
    vertical-align: middle;
}
#nav ul.links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}
#nav ul.links li { padding: 0 1.5rem; }
#nav ul.links a { color: #ffffff; }
#nav ul.links a:hover, #nav ul.links li.active a { color: #18bfef; }

#nav .nav-left ul { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
#nav .nav-left li { margin-left: 1rem; }
#nav .nav-left li:last-child { margin-left: 0; }

.email-box {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    font-weight: 700;
    font-size: 0.9rem;
}
.email-box:hover { background-color: rgba(255, 255, 255, 0.2); }
.email-box .icon { margin-left: 8px; color: #18bfef; }

.call-button, .social-icon-button {
    background-color: #18bfef;
    color: white !important;
    padding: 0 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    line-height: 40px;
	font-weight: 700;
	font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
	white-space: nowrap;
    border: 2px solid #18bfef;
}
.call-button:hover { background-color: #16a8d4; border-color: #16a8d4; color: white !important; }
.call-button .icon { margin-right: 10px; }

.phone-display {
    background-color: transparent;
    border: 2px solid #18bfef;
    color: white !important;
    font-weight: 700;
}

.social-icon-button {
    width: 40px;
    height: 40px;
    padding: 0;
}
.social-icon-button img {
    height: 20px;
    width: 20px;
}

/* Main Content */
#main {
    background-color: #ffffff;
    flex-grow: 1;
}
#main > .post { padding: 4rem; text-align: right; }

/* Posts section */
#main > .posts { display: flex; flex-wrap: wrap; padding: 1rem; }
#main > .posts > article { text-align: right; padding: 1rem; width: 50%; margin-bottom: 1rem; }
#main > .posts > article header p { font-size: 0.9rem; color: #666; margin-top: 0.5rem; }

/* Footer */
#footer {
	background-color: #f7f7f7;
	color: #333;
	padding: 4rem;
    width: 100%;
}
#footer .footer-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch; /* Makes columns same height */
}
#footer .footer-form, #footer .footer-map {
    width: 50%;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
}
#footer h3 { color: #005f5f; }
#footer .footer-map-container {
    border: 2px solid black;
    padding: 4px;
    height: 100%;
}
#footer .footer-map iframe {
    width: 100%;
    height: 100%;
    min-height: 350px;
    border: 0;
}
#footer a { color: #008080; }

/* Copyright */
#copyright {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	text-align: center;
	padding: 1rem 0;
	background-color: #005f5f;
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.8rem;
    width: 100%;
    z-index: 1000;
}
#copyright ul { list-style: none; padding-left: 0; margin: 0; }
#copyright ul li { display: inline; }

/* Contact Page Styles */
.contact-grid { display: flex; flex-wrap: wrap; gap: 3rem; }
.contact-form-section { flex: 2; min-width: 300px; }
.contact-details-section { flex: 1; min-width: 280px; }
.contact-item { display: flex; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-item .icon { font-size: 1.5rem; color: #006d6d; margin-left: 1rem; width: 25px; text-align: center; }
.contact-item h3 { margin: 0 0 0.25rem 0; font-size: 1.1rem; }
.contact-item p, .contact-item a { margin: 0; color: #333; }

/* Button & Form Styles */
input, select, textarea {
    border: 1px solid #ccc; padding: 0.75rem; border-radius: 4px;
    width: 100%; font-family: 'Heebo', sans-serif;
    direction: rtl; text-align: right;
}
input[type="tel"] { text-align: right; }
input:focus, select:focus, textarea:focus { border-color: #008080; outline: none; }

.button {
	transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
	border-radius: 5px; border: 0; cursor: pointer; display: inline-block;
	font-weight: 700; height: 3rem; line-height: 3rem; padding: 0 2rem;
	text-align: center; text-decoration: none; white-space: nowrap;
	background-color: #006d6d; color: #ffffff !important;
}
.button:hover { background-color: #008080; }
.button.primary { background-color: #18bfef; }
.button.primary:hover { background-color: #16a8d4; }
.actions { padding-right: 0; }

/* Image Styles */
.image.fit { display: block; margin: 0 0 1.5rem 0; width: 100%; }
.image.fit img { width: 100%; border-radius: 5px; }
.image.main img { width: 100%; }
.project-gallery .image.fit { height: 250px; overflow: hidden; }
.project-gallery .image.fit img { width: 100%; height: 100%; object-fit: cover; }

/* Responsive Adjustments */
@media screen and (max-width: 980px) {
    #nav { flex-direction: column; height: auto; padding: 0.5rem; }
    #nav .nav-center, #nav .nav-left, #nav .nav-right {
        flex-direction: column; width: 100%; flex: auto; padding: 0.5rem 0;
    }
    #nav .nav-right { order: 1; }
    #nav .nav-center { order: 2; padding: 0.5rem 0; }
    #nav .nav-left { order: 3; }
	#main > .posts > article { width: 50%; }
}

@media screen and (max-width: 768px) {
    body { font-size: 0.9rem; }
	h1 { font-size: 2rem; }
	h2 { font-size: 1.5rem; }
	#main > .post { padding: 2rem 1rem; }
	#main > .posts > article { width: 100%; padding: 1rem 0; }
	#footer { padding: 2rem 1rem; }
    #footer .footer-container { flex-direction: column; }
    #footer .footer-form, #footer .footer-map { width: 100%; padding: 0; }
    #footer .footer-form { margin-bottom: 2rem; }

    #nav .nav-left ul { flex-wrap: wrap; justify-content: center; }
    #nav .nav-left li { margin: 0.25rem; }
    #nav ul.links li { padding: 0 0.5rem; }
	#nav ul.links a { font-size: 0.8rem; }

    .row { flex-direction: column; margin: 0; }
    .row > * { width: 100% !important; padding: 0; margin-bottom: 1rem; }
    .contact-grid { flex-direction: column-reverse; } /* Form first on mobile */
}
/* Added styles for Navbar social icons */
.social-buttons-container {
    display: flex;
    gap: 0.5rem; /* Creates space between the buttons */
}

.social-icon-button img {
    width: 30px;
    height: 30px;
    object-fit: contain; /* Ensures the image fits well */
}

/* New styles for the contact view page */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-card {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1.5rem;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.contact-card h4 {
    margin-bottom: 0.5rem;
    color: #005f5f;
}
.contact-card p {
    margin-bottom: 0.5rem;
}
.contact-card small {
    color: #666;
}

/* === CORRECTED NAVBAR SOCIAL BUTTONS === */

/* 1. Style the container that holds the buttons */
.social-buttons-container {
    display: flex;      /* Aligns items (the buttons) in a row */
    align-items: center;
    gap: 0.5rem;        /* Creates space BETWEEN the buttons */
}

/* 2. Style EACH individual button */
.social-icon-button {
    background-color: #18bfef; /* The background color goes here */
    color: white !important;
    border-radius: 5px;        /* Or use 50% to make them circles */
    text-decoration: none;
    
    /* Use flexbox to perfectly center the image inside */
    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* Set a fixed size for a square button */
    width: 40px;
    height: 40px;
    
    /* IMPORTANT: Remove the padding inherited from other button styles */
    padding: 0;

    transition: all 0.2s ease-in-out;
}

/* Add a hover effect */
.social-icon-button:hover {
    background-color: #16a8d4;
}

/* 3. Style the image inside the button */
.social-icon-button img {
    height: 22px; /* A good size for a 40px button */
    width: 22px;
}
.contact-card {
  position: relative;
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 5px;
}

.delete-btn {
  position: absolute;
  top: 10px;
  left: 10px; /* שינוי מ-right ל-left כדי להתאים לעברית */
  background: #ff6347; /* צבע אדום-עגבנייה */
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  line-height: 25px;
  text-align: center;
  padding: 0;
}

.delete-btn:hover {
  background: #e0553d;
}

.project-description p {
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 1.1rem;
  color: #333;
}

.project-description ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  list-style-type: disc;
}

.project-description li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

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

.gallery img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.gallery img:hover {
  transform: scale(1.03);
}
/* === שיפורי גלריית תמונות === */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery img {
  width: 100%;
  height: 250px; /* גובה אחיד לכל התמונות */
  object-fit: cover; /* חותך את התמונה במקום למעוך אותה */
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease-in-out;
}

.gallery img:hover {
  transform: scale(1.05);
}
/* הוסף את הכללים האלה בתוך media query קיים של 980px */

#nav .nav-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0;
}
#nav .nav-right, #nav .nav-center, #nav .nav-left {
    width: auto;
    padding: 0;
}
#nav .nav-left {
    width: 100%;
    padding: 0.5rem 0;
}
#nav .nav-left ul {
    justify-content: center;
}