/* Styles for Contact Page */

/* General Reset and Box Sizing */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styles */
body {
  font-family: 'Cairo', sans-serif;
  line-height: 1.6;
  background-color: #f7f7f7;
  color: #333;
  direction: rtl;
  max-width: 900px;
  margin: 0 auto 40px auto;
  padding: 0 20px 20px 20px;
  display: block;
  min-height: 100vh;
  box-sizing: border-box;
  flex-grow: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Header Styles */
header {
  background: linear-gradient(135deg, #1A237E, #3949AB);
  color: #fff;
  padding: 20px 0 10px 0;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  margin-bottom: 0;
  position: relative;
  margin-top: 0;
  top: 0;
  left: 0;
  right: 0;
}

header .logo {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 5px;
  animation: fadeInDown 0.8s ease forwards;
}

header p {
  font-family: 'Tajawal', sans-serif;
  animation: fadeInDown 1s ease forwards;
}

/* Social Icons in Header and Footer */
header .social, footer .social {
  margin-bottom: 10px;
}

header .social a, footer .social a {
  margin: 0 8px;
  font-size: 1.3em;
  color: #fff;
  transition: color 0.3s ease;
  text-decoration: none;
}

header .social a:hover, footer .social a:hover {
  color: #FFEE58;
}

/* Navigation Styles */
nav {
  background-color: #3F51B5;
  margin-bottom: 30px;
  padding: 0 20px;
  border-radius: 0 0 10px 10px;
}

nav ul {
  display: flex;
  list-style: none;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  flex-wrap: wrap;
  margin: 0;
}

nav li {
  margin: 0 15px;
}

nav a {
  font-size: 1.1em;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover {
  background-color: #FF0057;
  color: #fff;
  padding: 2px 4px;
  border-radius: 4px;
}

/* External link indicator */
nav a.external::after {
  content: " ";
  display: inline-block;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  padding-right: 5px;
}

/* Main Content Styles */
main {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  max-width: 1200px;
  margin: 20px auto;
}

main h2 {
  font-family: 'Tajawal', sans-serif;
  color: #1A237E;
  font-size: 2em;
  border-bottom: 2px solid #1A237E;
  padding-bottom: 5px;
  margin-bottom: 15px;
}

main p {
  font-size: 1em;
  text-align: justify;
  margin-bottom: 15px;
}

/* Section Styles */
section {
  margin-bottom: 40px;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

section h2 {
  margin-bottom: 15px;
  font-family: 'Tajawal', sans-serif;
  color: #1A237E;
  font-size: 2em;
  border-bottom: 2px solid #1A237E;
  padding-bottom: 5px;
}

section p {
  margin-bottom: 15px;
  font-size: 1em;
  text-align: justify;
}

/* Posts Grid */
.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.post {
  background: #f0f0f0;
  padding: 15px;
  border-radius: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.post h3 {
  margin-bottom: 10px;
  font-size: 1.4em;
  color: #FF0057;
}

/* Gallery Styles */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.gallery img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* Footer Styles */
footer {
  background: linear-gradient(135deg, #1A237E, #3949AB);
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9em;
  box-shadow: 0 -4px 8px rgba(0,0,0,0.2);
  margin-top: 40px;
}

footer .footer-links {
  margin-top: 15px;
}

footer .footer-links a {
  margin: 0 10px;
  color: #00B0FF;
  font-weight: 600;
  text-decoration: none;
}

footer .footer-links a:hover {
  color: #FFEE58;
}

/* Team Section */
.team {
  margin-top: 20px;
}

.team h3 {
  font-family: 'Tajawal', sans-serif;
  color: #3949AB;
  margin-bottom: 10px;
}

.team-member {
  margin-bottom: 15px;
}

.team-member strong {
  display: block;
  font-weight: 700;
  margin-bottom: 5px;
}

/* Card Style */
.card {
  background: #f0f0f0;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

/* Form Group */
.form-group {
  margin-bottom: 20px;
  text-align: right;
}

.form-group label {
  font-weight: 700;
  font-size: 1.1em;
  margin-bottom: 12px;
  display: block;
  text-align: right;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  font-family: 'Cairo', sans-serif;
  background: #fff;
  color: #333;
  box-shadow: none;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 12px 3px #FF0057;
}

/* Buttons */
.btn {
  background-color: #3F51B5;
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 1.1em;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  user-select: none;
  display: inline-block;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.btn:hover {
  background-color: #FF0057;
  color: #fff;
}

/* Banner Image */
.banner-image {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 15px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  margin: 20px 0;
}

/* Animations */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
  }

  nav li {
    margin: 10px 0;
  }

  header .social {
    position: static;
    margin-bottom: 10px;
  }
}

/* Connect header and nav visually */
header {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;
  width: 100%;
  min-height: 100px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

nav {
  margin-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  width: 100%;
}
