/* General Styles */
:root {
    --primary-color: #1a4f78;
    --secondary-color: #9c1a23;
    /* --light-bg: #f4f6f9; */
    /* --dark-text: #2c3e50; */
    --white: #ffffff;
    --border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Cairo', sans-serif;
    color: black;
    line-height: 1.6;
    /* background-color: var(--light-bg); */

    direction: rtl;
    text-align: right;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


.section {
    padding: 80px 0;
    text-align: center;
    position: relative;
    z-index: 2; /* يخلي النص فوق الخلفية */
  }
  
  .section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("low-poly-abstract-design_1048-11910.jpg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0.2;        /* الشفافية على الخلفية بس */
    z-index: -1;         /* يخلي الخلفية ورا النصوص */
  }
  
.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.card {
    background-color: var(--white);
    color: black;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease-in-out;
}

.card:hover {
    transform: translateY(-10px);
}

/* Header & Navigation */
/* الأساس */
header {
    background-color: #e7e7e7;
    padding: 5px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  .logo {
    width: 120px;
  }
  
  /* القائمة */
  .main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
  }
  
  .main-nav a {
    color: var(--primary-color-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    position: relative;
  }
  
  .main-nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
    position: absolute;
    bottom: -5px;
    right: 0;
  }
  
  .main-nav a:hover::after {
    width: 100%;
  }
  
  /* زرار الموبايل */
  .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
  }
  
  /* موبايل */
  @media (max-width: 768px) {
    .main-nav {
      display: block;       /* نخليها block عشان نقدر نتحكم */
      position: absolute;
      top: 70px;
      left: 5%;
      background: white;
      width: 90%;
      box-shadow: 0 5px 15px rgba(0,0,0,0.7);
      border-radius: 8px;
  
      /* عشان الأنيميشن */
      max-height: 0;
      overflow: hidden;
      opacity: 0;
      transition: max-height 1s ease, opacity 1s ease;
    }
  
    .main-nav ul {
      flex-direction: column;
      gap: 0;
    }
  
    .main-nav li {
      border-bottom: 1px solid #eee;
    }
  
    .main-nav li:last-child {
      border-bottom: none;
    }
  
    .main-nav a {
      display: block;
      padding: 12px 15px;
    }
  
    .menu-toggle {
      display: block;
    }
  
    /* القائمة لما تتفتح */
    .main-nav.active {
      max-height: 500px; /* كفاية لكل العناصر */
      opacity: 1;
    }
  }
  

/* Hero Section */
.hero-section {
    background: url('img/rm373batch13-085.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.hero-content {
    z-index: 1;
    text-align: center;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background-color 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #7b141b;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: center;
}

.about-card {
    border-bottom: 5px solid var(--primary-color);
}

.about-card i {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Vision & Mission Section */
.primary-bg {
    background-color: #efefef;
    color: black;
    box-shadow: rgb(0 0 0 / 35%) 0px 5px 15px;
}

.primary-bg .section-title{
    color: var(--primary-color);
}
.primary-bg .card{
    background-color: var(--primary-color);
    color : var(--white)
}


/* .primary-bg .section-title {
    color: var(--white);
} */

.vision-mission-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    text-align: right;
    margin-bottom: 60px;
}

.vision-card {
    border-right: 5px solid var(--secondary-color);
}

.mission-card {
    border-right: 5px solid var(--secondary-color);
}

.vision-mission-grid h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.icon-box {
    background-color: var(--secondary-color);
    color: var(--white);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.objectives-title {
    color: var(--white);
}

.objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.objective-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 20px 10px;
    transition: background-color 0.3s;
    gap: 1rem
}

.objective-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
.objective-item img{
    width: 100%;
}
.objective-item i {
    color: var(--secondary-color);
    margin-bottom: 10px;
}


/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.value-card {
    padding: 40px 20px;
    text-align: center;
    border-top: 5px solid var(--secondary-color);
    background-color: #f7f9fc;
}

.value-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    border: 4px solid var(--secondary-color);
}

/* Programs Section */
.secondary-bg {
    background-color: #efefef;
    color: black;
    box-shadow: rgb(0 0 0 / 35%) 0px 5px 15px;
}

.secondary-bg .section-title {
    color: var(--primary-color);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.program-card {
    border-bottom: 5px solid var(--primary-color);
    text-align: right;
    padding: 30px;
}

.program-icon {
    background-color: var(--primary-color);
    color: var(--white);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.program-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.program-card p:first-of-type {
    font-style: italic;
    color: #ccc;
    margin-bottom: 15px;
}

/* Contact Section */
.contact-section {
    background-color: var(--white);
}

.contact-info {
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.contact-info i {
    color: var(--secondary-color);
    margin-left: 10px;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        text-align: center;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        margin-top: 15px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .vision-mission-grid {
        grid-template-columns: 1fr;
    }
}


/* Carousel Section Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
    margin-top: 50px;
    padding-bottom: 40px; /* Space for dots */
}


.objective-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Hide navigation buttons */
.carousel-button {
    display: none;
}

/* Carousel Dots (Indicators) */
.carousel-dots {
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgb(120 97 97 / 50%);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--secondary-color);
    width: 15px;
    height: 15px;
}



/* value section */

/* Staggered Grid for Values Section */
.values-grid-staggered {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 0 50px; /* Add some horizontal padding for spacing */
}

.staggered-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.staggered-col.col-2 {
    margin-top: 100px; /* This creates the staggered effect */
}

.value-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease-in-out;
    height: auto; /* Revert height to fit content */
}

.value-card:hover {
    transform: translateY(-10px);
}

.value-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border: 4px solid var(--secondary-color);
}

.value-card h3 {
    font-size: 1.5rem;
    color: var(--dark-text);
    margin-bottom: 10px;
}

.value-card p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .values-grid-staggered {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .staggered-col.col-2 {
        margin-top: 0;
    }
}


/* Animation effects for each section */
/* ------------------------------------------------ */

/* Initial state (hidden) for all animated elements */
.animated-element {
    opacity: 0;
    will-change: transform, opacity;
}

/* Hero Section */
.hero-content {
    transform: translateY(20px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* About Section */
.about-card {
    transform: translateY(30px);
    transition: transform 0.7s ease-out, opacity 0.7s ease-out;
}

/* Vision Section */
.vision-mission-grid {
    transform: scale(0.9);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* Objectives Section */
.objective-item {
    transform: translateY(50px);
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

/* Values Section */
.value-card {
    transform: translateX(50px);
    transition: transform 0.9s ease-out, opacity 0.9s ease-out;
}

/* Programs Section */
.programs {
    transform: translateY(-80px);
    transition: transform 0.7s ease-out, opacity 0.9s ease-out;
}

/* Contact Section */
.contact-info {
    transform: translateY(20px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
    width: 50%;
    display: flex;
    text-align-last: justify;
    align-items: flex-start;
    margin: auto;
}

/* The visible state for all elements */
.is-visible {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 1;
}
/* ظظظظظظظظظظظظظظظظظظظظظظظظظظظظظظظظظظظظظ */

input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


.cardss{
  --img-w: 200px;
  --duration: 300ms;
  --img-easing: cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 90%;
  margin-inline: auto;
  display: grid;
  direction: ltr;
  counter-reset: my-counter;
}

.cardsss{
  --cards-grid-cols: auto;
  --cards-grid-rows: var(--img-w) auto;
  --cards-grid-gap: 2rem;
  --cards-footer-justify: center;
  
  grid-area: 1/1;
  display: grid;
 place-items: center; 
  grid-template-columns: var(--cards-grid-cols);
  grid-template-rows: var(--cards-grid-rows);
  gap: var(--cards-grid-gap);
  
}

@media (600px < width){
  .cardsss{
      --cards-grid-cols: var(--img-w) auto;
      --cards-grid-rows: auto;
      --cards-grid-gap: 4rem;
      --cards-footer-justify: start;
  }
}


.cards-img{
  width: 200px;
  height: 200px;
  aspect-ratio: 1 / 1 ;
  rotate: var(--angle, 0deg);
  border-radius: 10px;
  border: 3px solid #FFF;
  overflow: hidden;
  transform-origin: center;
  object-fit: cover;
  box-shadow: 0 0 5px 3px rgba(0 0 0 / .05);
}



input:nth-of-type(1):checked + .cardsss ~ .cardsss > .cards-img{
  animation: straighten-img-1 calc(var(--duration) * 2) forwards;
  animation-timing-function: var(--img-easing);
}
.cardsss:has(~input:nth-of-type(2):checked) > .cards-img,
input:nth-of-type(2):checked + .cardsss ~ .cardsss > .cards-img{
  animation: straighten-img-2 calc(var(--duration) * 2) forwards;
  animation-timing-function: var(--img-easing);
}
.cardsss:has(~input:nth-of-type(3):checked) > .cards-img,
input:nth-of-type(3):checked + .cardsss ~ .cardsss > .cards-img{
  animation: straighten-img-3 calc(var(--duration) * 2) forwards;
  animation-timing-function: var(--img-easing);
}
.cardsss:has(~input:nth-of-type(4):checked) > .cards-img,
input:nth-of-type(4):checked + .cardsss ~ .cardsss > .cards-img{
  animation: straighten-img-4 calc(var(--duration) * 2) forwards;
  animation-timing-function: var(--img-easing);
}
.cardsss:has(~input:nth-of-type(5):checked) > .cards-img,
input:nth-of-type(5):checked + .cardsss ~ .cardsss > .cards-img{
  animation: straighten-img-5 calc(var(--duration) * 2) forwards;
  animation-timing-function: var(--img-easing);
}
.cardsss:has(~input:nth-of-type(6):checked) > .cards-img,
input:nth-of-type(6):checked + .cardsss ~ .cardsss > .cards-img{
  animation: straighten-img-6 calc(var(--duration) * 2) forwards;
  animation-timing-function: var(--img-easing);
}
.cardsss:has(~input:nth-of-type(7):checked) > .cards-img,
input:nth-of-type(7):checked + .cardsss ~ .cardsss > .cards-img{
  animation: straighten-img-7 calc(var(--duration) * 2) forwards;
  animation-timing-function: var(--img-easing);
}
/* as CSS can't remove animations, we change the animation according to which checkbox is checked  - all animations are the same (would be simpler with SCSS) */
@keyframes straighten-img-1 { 50%{ --angle: 0deg;} }
@keyframes straighten-img-2 { 50%{ --angle: 0deg;} }
@keyframes straighten-img-3 { 50%{ --angle: 0deg;} }
@keyframes straighten-img-4 { 50%{ --angle: 0deg;} }
@keyframes straighten-img-5 { 50%{ --angle: 0deg;} }
@keyframes straighten-img-6 { 50%{ --angle: 0deg;} }
@keyframes straighten-img-7 { 50%{ --angle: 0deg;} }


/* stacking order - these are updated according to which card is selected */
.cardsss{
  z-index: -1;
}
input:checked + .cardsss{
  z-index:10 !important;
}
/* next card checked - place behind */
.cardsss:has(+input:checked){
  z-index:9;
}
/* next card +1 checked - place behind */
.cardsss:has(+input + .cardsss + input:checked){
  z-index:8;
}
/* next card +2 checked - place behind */
.cardsss:has(+input + .cardsss +input + .cardsss + input:checked){
  z-index:7;
}
/* next card +3 checked - place behind */
.cardsss:has(+input + .cardsss +input + .cardsss +input + .cardsss + input:checked){
  z-index:6;
}
/* next card +4 checked - place behind */
.cardsss:has(+input + .cardsss +input + .cardsss +input + .cardsss +input + .cardsss + input:checked){
  z-index:5;
}
/* next card +5 checked - place behind */
.cardsss:has(+input + .cardsss +input + .cardsss +input +input + .cardsss +input + .cardsss +input + .cardsss + input:checked){
  z-index:4;
}
/* next card +6 checked - place behind */
.cardsss:has(+input + .cardsss +input + .cardsss +input  + .cardsss +input +input + .cardsss +input + .cardsss +input + .cardsss + input:checked){
  z-index:3;
}

.cards-data{
  display: grid;
  gap: 1rem;
}
.cards-data > .cards-num{
  opacity: var(--data-opacity, 0);
  font-size: .8rem;
  color: #666;
}
.cards-data > p{
  font-size: 0.9rem;

}
.cards-data > h2,
.cards-data > p{
  transition: var(--duration) ease-in-out;
  transition-delay: var(--data-delay,0ms);
  opacity: var(--data-opacity, 0);
  translate: 0 var(--data-y, 20px);
}
.cards-data > footer{
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 10px 0;
  background-color: transparent;

}
.cards-data > footer label{
  margin-block-start: auto;
  cursor: pointer;
  pointer-events: var(--card-events, none);
  opacity: var(--data-opacity, 0);
  transition: color var(--duration) ease-in-out;
  background-color: var(--primary-color);
  color:var(--label-clr-bg,#EEE);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  aspect-ratio: 1/1;
  display: grid;
  place-content: center;
  transition: background-color 300ms ease-in-out,color  300ms ease-in-out;
}


input:checked:focus-visible + .cardsss > .cards-data > footer label,
.cards-data > footer label:hover{
  --label-clr-txt: #FFF;
  --label-clr-bg: steelblue;
}

input:checked + .cardsss{
  --data-opacity: 1;
  --data-y: 0;
  --data-delay: var(--duration);
  --card-events: auto;
  transition: z-index;
  transition-delay: 300ms;
  /*z-index: 1;*/
}

input:checked +.cardsss > .cards-img{
  animation: reveal-img calc(var(--duration) * 2) forwards;
}

@keyframes reveal-img{
  50%{
    translate: -150% 0;
    --angle: 0deg;
  }
}
