/*====================================================================
  Global Theme Variables :root
====================================================================*/
:root{
    /* Core Palette */
    --primary            : #006D77;
    --primary-dark       : #00525a;
    --accent             : #FFB703;
    --accent-dark        : #E0A200;
    --neutral            : #F5F8FA;
    --surface            : #E0E3EB;
    --surface-dark       : #C8CBD3;
    --text-dark          : #222222;
    --text-light         : #FFFFFF;
    --gradient-overlay   : linear-gradient(rgba(0,0,0,0.55),rgba(0,0,0,0.55));

    /* Shadows (Neumorphism) */
    --shadow-light       : 8px 8px 16px rgba(0,0,0,0.10);
    --shadow-dark        : -8px -8px 16px rgba(255,255,255,0.65);

    /* Radii & Spacing */
    --radius             : 18px;
    --gap                : 2rem;

    /* Transition */
    --speed              : 0.4s;
}
/*====================================================================
  Base Resets & Typography
====================================================================*/
*,
*::before,
*::after{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Source Sans Pro', 'Cairo', sans-serif;
    font-size:1rem;
    line-height:1.7;
    background:var(--neutral);
    color:var(--text-dark);
    overflow-x:hidden;
}

/* Headings */
h1,h2,h3,h4,h5,h6{
    font-family:'Playfair Display','Tajawal',serif;
    font-weight:700;
    color:var(--text-dark);
    text-align:center;
    margin-bottom:1rem;
    line-height:1.3;
    text-shadow:1px 1px 3px rgba(0,0,0,0.15);
}

/* Paragraphs & Lists */
p{margin-bottom:1rem;}
ul{list-style:none;}

/*====================================================================
  Utility & Layout Helpers
====================================================================*/
.container{
    width:90%;
    max-width:1200px;
    margin-inline:auto;
}
.is-two-thirds{
    width:100%;
}
.section{
    padding:4rem 0;
}
.parallax{
    background-attachment:fixed;
    background-size:cover;
    background-repeat:no-repeat;
    position:relative;
    color:var(--text-light);
}
.parallax::before{
    content:'';
    position:absolute;
    inset:0;
    background:var(--gradient-overlay);
    z-index:0;
}
.parallax > .container,
.parallax h2,
.parallax p{
    position:relative;
    z-index:1;
}

/*====================================================================
  Navigation
====================================================================*/
.main-header{
    background:var(--neutral);
    box-shadow:var(--shadow-light);
    position:sticky;
    top:0;
    z-index:500;
}
.main-header .container{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:1rem 0;
}
.logo a{
    font-family:'Playfair Display',serif;
    font-size:1.5rem;
    color:var(--primary);
    text-decoration:none;
    font-weight:700;
}
.nav-desktop ul{
    display:flex;
    gap:1.5rem;
}
.nav-desktop a,
.nav-mobile a{
    color:var(--text-dark);
    text-decoration:none;
    font-weight:600;
    transition:color var(--speed);
}
.nav-desktop a:hover,
.nav-mobile a:hover{
    color:var(--accent);
}

/* Burger */
.burger{
    width:2rem;
    cursor:pointer;
    display:none;
    flex-direction:column;
    gap:6px;
}
.burger span{
    display:block;
    height:3px;
    background:var(--primary);
    border-radius:3px;
    transition:transform var(--speed);
}
/* Mobile Menu */
.nav-mobile{
    position:fixed;
    inset:0 0 0 40%;
    background:var(--surface);
    transform:translateX(100%);
    transition:transform var(--speed);
    padding-top:5rem;
}
.nav-mobile.open{transform:translateX(0);}
.nav-mobile ul{display:flex;flex-direction:column;gap:1.5rem;padding:0 1.5rem;}

/* Breakpoints */
@media(max-width:992px){
    .nav-desktop{display:none;}
    .burger{display:flex;}
}

/*====================================================================
  Buttons & Interactive Elements
====================================================================*/
.btn,
button,
input[type='submit']{
    background:var(--accent);
    color:var(--text-dark);
    padding:0.75rem 2rem;
    border:none;
    border-radius:var(--radius);
    font-weight:700;
    cursor:pointer;
    transition:background var(--speed), transform var(--speed);
    box-shadow:var(--shadow-light),var(--shadow-dark);
}
.btn:hover,
button:hover,
input[type='submit']:hover{
    background:var(--accent-dark);
    transform:translateY(-2px);
}

/* Toggle Switch */
.switch{
    position:relative;
    width:50px;
    height:26px;
    display:inline-block;
}
.switch input{display:none;}
.slider{
    position:absolute;
    inset:0;
    background:var(--surface-dark);
    border-radius:34px;
    cursor:pointer;
    transition:background var(--speed);
    box-shadow:var(--shadow-light),var(--shadow-dark);
}
.slider::before{
    content:'';
    position:absolute;
    height:20px;
    width:20px;
    left:4px;
    top:3px;
    background:var(--neutral);
    border-radius:50%;
    transition:transform var(--speed);
}
input:checked + .slider{
    background:var(--primary);
}
input:checked + .slider::before{
    transform:translateX(24px);
}

/*====================================================================
  Hero Section
====================================================================*/
.hero-section{
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    background-size:cover;
    background-repeat:no-repeat;
    position:relative;
    padding:6rem 0;
}
.hero-section .hero-title{
    font-size:2.5rem;
    color:var(--text-light);
}
.hero-section .hero-subtitle{
    color:var(--text-light);
    max-width:700px;
    margin:0.5rem auto 2rem;
}

/*====================================================================
  Cards Layout (Services, Projects, Resources, etc.)
====================================================================*/
.cards-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:var(--gap);
    margin-top:2rem;
}
.card{
    display:flex;
    flex-direction:column;
    align-items:center;
    background:var(--surface);
    border-radius:var(--radius);
    padding:1.5rem;
    text-align:center;
    box-shadow:var(--shadow-light),var(--shadow-dark);
    transition:transform var(--speed);
}
.card:hover{transform:translateY(-6px);}
.card-image{
    width:100%;
    height:220px;
    overflow:hidden;
    border-radius:var(--radius);
    margin-bottom:1rem;
    display:flex;
    align-items:center;
    justify-content:center;
}
.card-image img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.card-content h3{
    margin-bottom:0.5rem;
    font-size:1.25rem;
}

/*====================================================================
  Timeline
====================================================================*/
.timeline{
    position:relative;
    margin-top:2rem;
}
.timeline::before{
    content:'';
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    width:4px;
    height:100%;
    background:var(--primary);
}
.timeline-item{
    position:relative;
    width:50%;
    padding:1rem 2rem;
}
.timeline-item:nth-child(odd){
    left:0;
    text-align:left;
}
.timeline-item:nth-child(even){
    left:50%;
    text-align:right;
}
.timeline-date{
    background:var(--primary);
    color:var(--text-light);
    padding:0.25rem 0.75rem;
    border-radius:var(--radius);
    font-weight:700;
}
.timeline-content{
    margin-top:0.5rem;
}

/*====================================================================
  FAQ
====================================================================*/
details{
    background:var(--surface);
    border-radius:var(--radius);
    padding:1rem 1.5rem;
    margin-bottom:1rem;
    box-shadow:var(--shadow-light),var(--shadow-dark);
    cursor:pointer;
}
summary{
    font-weight:600;
    margin-bottom:0.5rem;
}

/*====================================================================
  Forms
====================================================================*/
form{
    display:flex;
    flex-direction:column;
    gap:1rem;
    background:var(--surface);
    padding:2rem;
    border-radius:var(--radius);
    box-shadow:var(--shadow-light),var(--shadow-dark);
}
.form-group{
    display:flex;
    flex-direction:column;
    gap:0.5rem;
}
input[type='text'],
input[type='email'],
textarea{
    padding:0.75rem 1rem;
    border-radius:var(--radius);
    border:none;
    background:var(--neutral);
    resize:vertical;
    box-shadow:inset var(--shadow-light), inset var(--shadow-dark);
}

/*====================================================================
  Progress Indicators
====================================================================*/
.progress-wrapper{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:1rem;
    margin-top:1.5rem;
}
progress{
    width:100%;
    height:10px;
    border:none;
    border-radius:5px;
    background:var(--surface-dark);
}
progress::-webkit-progress-bar{
    background:var(--surface-dark);
    border-radius:5px;
}
progress::-webkit-progress-value{
    background:var(--primary);
    border-radius:5px;
}

/*====================================================================
  Footer
====================================================================*/
.main-footer{
    background:var(--primary);
    color:var(--text-light);
    padding:2rem 0;
    text-align:center;
}
.footer-nav ul{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:1rem;
    margin-bottom:1rem;
}
.footer-nav a{
    color:var(--text-light);
    text-decoration:none;
    font-weight:600;
    transition:color var(--speed);
}
.footer-nav a:hover{
    color:var(--accent);
}
.social-links a{
    color:var(--accent);
    font-weight:700;
    text-decoration:none;
    margin:0 0.5rem;
    transition:color var(--speed);
}
.social-links a:hover{color:var(--text-light);}

/*====================================================================
  Links - Read More
====================================================================*/
a.read-more{
    display:inline-block;
    margin-top:0.5rem;
    color:var(--primary);
    font-weight:700;
    position:relative;
    transition:color var(--speed);
}
a.read-more::after{
    content:'';
    position:absolute;
    left:0;
    bottom:-2px;
    width:100%;
    height:2px;
    background:var(--accent);
    transform:scaleX(0);
    transform-origin:left;
    transition:transform var(--speed);
}
a.read-more:hover{
    color:var(--primary-dark);
}
a.read-more:hover::after{
    transform:scaleX(1);
}

/*====================================================================
  Cookie Popup (override inline for consistency)
====================================================================*/
#cookiePopup{
    font-size:0.9rem;
}
#cookiePopup button:hover{
    background:var(--accent-dark);
}

/*====================================================================
  Success Page
====================================================================*/
.success-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    text-align:center;
    background:var(--neutral);
}

/*====================================================================
  Terms & Privacy Pages
====================================================================*/
.legal-page{
    padding-top:100px;
}

/*====================================================================
  Animations (Morphing)
====================================================================*/
@keyframes morph{
    0%{border-radius:60% 40% 30% 70%/60% 30% 70% 40%;}
    50%{border-radius:30% 60% 70% 40%/50% 60% 30% 60%;}
    100%{border-radius:60% 40% 30% 70%/60% 30% 70% 40%;}
}
.morph{
    animation:morph 10s ease-in-out infinite;
}

/*====================================================================
  Accessibility & Misc
====================================================================*/
.visually-hidden{
    position:absolute!important;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}
/* Make sure images never overflow */
img{max-width:100%;height:auto;display:block;margin:0 auto;}