/* 
 * Components CSS for Wardiah Contracting Company
 * Contains styles for specific components and sections
 */

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--header-bg);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition-fast);
}

header.scrolled {
  box-shadow: var(--shadow-md);
}

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

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.5rem;
}

.logo-highlight {
  color: var(--secondary-color);
  margin-left: 5px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-wardiah {
  color: var(--primary-color);
  font-weight: 700;
}

.logo-contracts {
  font-size: 0.8em;
  color: var(--light-text);
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
}

.nav-link {
  padding: 10px 15px;
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: var(--transition-fast);
  transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background-color: rgba(0, 0, 0, 0.02);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(248, 161, 0, 0.1), rgba(0, 0, 0, 0.05));
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-title span {
  color: var(--secondary-color);
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--light-text);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  color: var(--secondary-color);
  animation: bounce 2s infinite;
  cursor: pointer;
  z-index: 1;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

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

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

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

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

.about-text p {
  margin-bottom: 15px;
  text-align: center !important;
}

/* Team Section - UPDATED */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.team-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 300px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
  text-align: center;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
}

.team-img-container {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-card:hover .team-img {
  transform: scale(1.1);
}

.team-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.team-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.team-position {
  color: var(--secondary-color);
  font-weight: 500;
  margin-bottom: 15px;
}

.team-bio {
  color: var(--light-text);
  margin-bottom: 15px;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.team-social a {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-bg);
  border-radius: 50%;
  color: var(--primary-color);
  transition: var(--transition-fast);
}

.team-social a:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-3px);
}

/* Projects Section */

/* Added container for horizontal scrolling on small screens */
.projects-table-container {
  overflow-x: auto;
  font-size: 1rem;
  max-width: 100%;
}

.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 20px;
  background-color: var(--light-bg);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--secondary-color);
  color: white;
}

.projects-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.projects-table th,
.projects-table td {
  padding: 15px;
  text-align: right;
  border-bottom: 1px solid var(--border-color);
  word-wrap: break-word;
  overflow: hidden;
  white-space: normal;
  direction: rtl;
}

.projects-table th {
  background-color: var(--light-bg);
  font-weight: 600;
  white-space: nowrap;
}

.projects-table td:first-child {
  width: 10%;
}

.projects-table td:nth-child(2) {
  width: 65%;
}

.projects-table td:last-child {
  width: 25%;
}

.projects-table tr:last-child td {
  border-bottom: none;
}

.projects-table tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Mobile adjustments with improved layout */
@media screen and (max-width: 768px) {
  .projects-table thead {
    display: none;
  }
  
  .projects-table,
  .projects-table tbody, 
  .projects-table tr, 
  .projects-table td {
    display: block;
    width: 100%;
  }
  
  .projects-table tr {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 0.85rem;
  }
  
  .projects-table td {
    text-align: right;
    padding: 8px 10px;
    position: relative;
    padding-left: 50%;
    min-height: 30px;
    word-break: break-word;
  }
  
  .projects-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    font-weight: 600;
    text-align: left;
    padding-right: 10px;
    font-size: 0.85rem;
  }
  
  .projects-table td:first-child,
  .projects-table td:nth-child(2),
  .projects-table td:last-child {
    width: auto;
  }
  
  .projects-table td:nth-child(2) {
    font-size: 0.85rem;
    line-height: 1.4;
  }
}

/* Activities Section - UPDATED */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.activity-card {
  display: flex;
  align-items: flex-start;
  background-color: var(--card-bg);
  padding: 25px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.activity-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-left: 20px;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: right;
}

.activity-description {
  color: var(--light-text);
  font-size: 0.95rem;
  text-align: right;
}

/* Contact Section */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-form {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  transition: var(--transition-fast);
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(248, 161, 0, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-fast);
  display: inline-block;
  text-align: center;
}

.form-submit:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.contact-card-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  margin-left: 15px;
  flex-shrink: 0;
}

.contact-card-content {
  flex: 1;
}

.contact-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.contact-card-text {
  color: var(--light-text);
}

.map-container {
  background-color: var(--light-bg);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--light-text);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 60px 0 30px;
  position: relative;
  overflow: hidden;
}

.footer-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  position: relative;
  z-index: 1;
}

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

.footer-col h3::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: 1.5px;
}

.footer-col p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  line-height: 1.6;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-right: 5px;
}

.footer-bottom {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

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

.footer-social a:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Form Notification Styles */
.form-notification {
  position: relative;
  margin-top: 20px;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: notification-slide-in 0.3s ease-out forwards;
  overflow: hidden;
}

.notification-icon {
  margin-left: 15px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-message {
  flex: 1;
  font-size: 15px;
}

.notification-close {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 5px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.notification-close:hover {
  opacity: 1;
}

.success-notification {
  background-color: #e8f5e9;
  color: #2e7d32;
  border-right: 4px solid #2e7d32;
}

.error-notification {
  background-color: #fdecea;
  color: #d32f2f;
  border-right: 4px solid #d32f2f;
}

.notification-hide {
  animation: notification-slide-out 0.3s ease-in forwards;
}

@keyframes notification-slide-in {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes notification-slide-out {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(-20px);
    opacity: 0;
  }
}

/* Responsive Media Queries for Components */
@media screen and (max-width: 992px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
}

@media screen and (max-width: 768px) {
  .nav-list {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background-color: var(--card-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 30px 30px;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
  }
  
  .nav-list.active {
    right: 0;
  }
  
  .nav-list li {
    width: 100%;
    margin-bottom: 15px;
  }
  
  .nav-link {
    display: block;
    padding: 10px 0;
  }
  
  .nav-link::after {
    bottom: 5px;
  }
  
  .mobile-menu-btn {
    display: block;
    z-index: 1001;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  /* Team Section Adjustments */
  .team-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .team-card {
    min-height: 300px !important;
    height: 300px !important;
    max-height: 300px !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box !important;
  }
  
  .team-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    box-sizing: border-box !important;
  }
  
  .team-bio {
    margin-bottom: 0 !important;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  /* Activities Section Adjustments */
  .activity-card {
    flex-direction: column; /* Stack icon and content vertically */
    align-items: center;
    text-align: center;
  }
  
  .activity-icon {
    margin: 0 0 15px 0 !important; /* Center icon above text */
  }
  
  .activity-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .activity-title,
  .activity-description {
    text-align: center !important; /* Ensure text is centered */
    width: 100%;
  }
}

@media screen and (max-width: 576px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .nav-list {
    width: 85%;
  }
  
  /* Activity Cards for Very Small Screens */
  .activity-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
  }
  
  .activity-icon {
    margin: 0 0 10px 0 !important;
  }
  
  .activity-title,
  .activity-description {
    text-align: center;
  }
}