/* Aigyptos Institute - Refactored Stylesheet
Goal: Remove Tailwind dependency and use semantic CSS variables.
*/

:root {
--egypt-sand: #e6c288;
--egypt-gold: #c59d5f;
--nile-blue: #2c5282;
--nile-blue-dark: #1e3a5f;
--stone-gray: #4a5568;
--papyrus: #fdfbf7;
--white: #ffffff;
--black-overlay: rgba(0, 0, 0, 0.6);
--gray-50: #f9fafb;
--gray-100: #f3f4f6;
--gray-200: #e5e7eb;
--gray-400: #9ca3af;
--gray-600: #4b5563;
--gray-800: #1f2937;
--gray-900: #111827;
--stone-50: #fafaf9;
--stone-100: #f5f5f4;
--stone-800: #292524;
--stone-900: #1c1917;
}

/* Base Styles */

*{
box-sizing: border-box;
margin: 0;
padding: 0;
}

html {
scroll-behavior: smooth;
}

body {
font-family: 'Inter', sans-serif;
background-color: var(--papyrus);
color: var(--gray-800);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
font-family: 'Merriweather', serif;
}

a {
text-decoration: none;
transition: 0.3s;
}

img {
max-width: 100%;
display: block;
}

.container {
max-width: 1280px;
margin: 0 auto;
padding: 0 1.5rem;
}

/* Navigation */
nav {
background: var(--white);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
position: fixed;
width: 100%;
z-index: 50;
top: 0;
}

.nav-inner {
display: flex;
justify-content: space-between;
align-items: center;
height: 5rem;
}

.logo {
display: flex;
align-items: center;
font-weight: 700;
font-size: 1.25rem;
color: var(--gray-900);
}

.logo i {
color: var(--nile-blue);
margin-right: 0.75rem;
font-size: 1.5rem;
}

.logo .light {
color: var(--nile-blue);
font-weight: 300;
}

.nav-links {
display: none;
align-items: center;
gap: 2rem;
}

@media (min-width: 768px) {
.nav-links {
display: flex;
}
}

.nav-links a {
color: var(--gray-600);
}

.nav-links a:hover {
color: var(--nile-blue);
}

.btn-support-nav {
background: var(--nile-blue);
color: var(--white) !important;
padding: 0.5rem 1.25rem;
border-radius: 0.375rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-support-nav:hover {
background: var(--nile-blue-dark);
}

.mobile-menu-btn {
display: block;
background: none;
border: none;
color: var(--gray-600);
cursor: pointer;
font-size: 1.5rem;
}

@media (min-width: 768px) {
.mobile-menu-btn {
display: none;
}
}

#mobile-menu {
background: var(--white);
border-top: 1px solid var(--gray-200);
}

#mobile-menu.hidden {
display: none;
}

#mobile-menu a {
display: block;
padding: 0.75rem 1rem;
color: var(--gray-600);
}

#mobile-menu a:hover {
background: var(--gray-50);
}

/* Hero Section */
.hero {
position: relative;
padding: 8rem 0 5rem;
text-align: center;
overflow: hidden;
background-color: var(--nile-blue);
background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e6c288' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.3));
z-index: 10;
}

.hero-img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-cover: cover;
z-index: 0;
opacity: 0.4;
}

.hero-content {
position: relative;
z-index: 20;
}

.hero h1 {
font-size: 2rem;
color: var(--white);
margin-bottom: 1.5rem;
line-height: 1.2;
max-width: 900px;
margin-left: auto;
margin-right: auto;
}

.hero p {
font-size: 1.25rem;
color: var(--gray-100);
font-weight: 300;
margin-bottom: 2.5rem;
max-width: 768px;
margin-left: auto;
margin-right: auto;
}

@media (min-width: 768px) {
.hero { padding: 12rem 0 8rem; }
.hero h1 { font-size: 3rem; }
.hero p { font-size: 1.5rem; }
}

.hero-btns {
display: flex;
flex-direction: column;
justify-content: center;
gap: 1rem;
}

@media (min-width: 640px) {
.hero-btns { flex-direction: row; }
}

.btn-primary {
background: var(--egypt-gold);
color: var(--white);
padding: 0.75rem 2rem;
border-radius: 0.375rem;
font-weight: 600;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
background: #b38d51;
}

.btn-outline {
background: transparent;
border: 2px solid var(--white);
color: var(--white);
padding: 0.75rem 2rem;
border-radius: 0.375rem;
font-weight: 600;
}

.btn-outline:hover {
background: var(--white);
color: var(--nile-blue);
}

/* Sections */
section {
padding: 5rem 0;
}

.section-header {
text-align: center;
margin-bottom: 4rem;
}

.section-header h2 {
font-size: 2.25rem;
margin-bottom: 1rem;
color: var(--gray-900);
}

.divider {
width: 6rem;
height: 0.25rem;
background: var(--egypt-gold);
margin: 0 auto;
}

.bg-white { background-color: var(--white); }
.bg-stone-50 { background-color: var(--stone-50); }
.bg-stone-100 { background-color: var(--stone-100); }

/* Grid Layouts */
.grid-2 {
display: grid;
gap: 3rem;
align-items: start;
}

@media (min-width: 768px) {
.grid-2 { grid-template-columns: 1fr 1fr; }
}

/* Content styles */
.text-lead {
font-size: 1.125rem;
color: var(--gray-600);
margin-bottom: 1.5rem;
}

.text-blue-bold {
color: var(--nile-blue);
font-weight: 600;
}

/* Image wrappers */
.img-frame {
position: relative;
}

.img-frame::after {
content: '';
position: absolute;
top: -1rem;
left: -1rem;
width: 100%;
height: 100%;
border: 2px solid var(--egypt-gold);
border-radius: 0.5rem;
z-index: 0;
}

.img-frame img {
position: relative;
z-index: 10;
border-radius: 0.5rem;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
width: 100%;
height: 23rem;
object-fit: cover;
}

.caption-box {
position: absolute;
bottom: 1rem;
right: 1rem;
background: var(--white);
padding: 1rem;
border-radius: 0.25rem;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
z-index: 20;
max-width: 15rem;
}

.caption-box p {
font-size: 0.875rem;
font-style: italic;
color: var(--gray-400);
}

/* Feature Cards */
.feature-grid {
display: grid;
gap: 1.5rem;
}

@media (min-width: 640px) {
.feature-grid { grid-template-columns: 1fr 1fr; }
}

.feature-card {
background: var(--stone-50);
padding: 1.5rem;
border-radius: 0.5rem;
border-left: 4px solid var(--nile-blue);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.feature-card i {
font-size: 1.875rem;
color: var(--egypt-gold);
margin-bottom: 1rem;
}

.feature-card h4 {
margin-bottom: 0.5rem;
font-size: 1.25rem;
}

.feature-card p {
font-size: 0.875rem;
color: var(--gray-600);
}

/* Project Row */
.project-row {
display: flex;
flex-direction: column;
gap: 2rem;
align-items: center;
padding-bottom: 3rem;
margin-bottom: 3rem;
border-bottom: 1px solid var(--gray-200);
}

@media (min-width: 768px) {
.project-row { flex-direction: row; }
.project-row.reverse { flex-direction: row-reverse; }
}

.project-text, .project-img {
flex: 1;
}

.project-text h4 {
font-size: 1.25rem;
color: var(--nile-blue);
margin-bottom: 1rem;
}

.project-img-container {
height: 16rem;
background: var(--gray-200);
border-radius: 0.5rem;
overflow: hidden;
position: relative;
}

.project-img-container img {
width: 100%;
height: 100%;
object-fit: cover;
}

.img-label {
position: absolute;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.5);
color: var(--white);
padding: 0.25rem 0.5rem;
font-size: 0.75rem;
}

.badge {
display: inline-block;
background: var(--stone-100);
color: var(--stone-gray);
padding: 0.25rem 0.75rem;
font-size: 0.75rem;
font-weight: 700;
text-transform: uppercase;
border-radius: 9999px;
margin-right: 0.5rem;
margin-top: 1rem;
}

/* Card Horizon */
.card-horizon {
max-width: 56rem;
margin: 0 auto;
background: var(--white);
border-radius: 0.5rem;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
overflow: hidden;
display: flex;
flex-direction: column;
}

@media (min-width: 768px) {
.card-horizon { flex-direction: row; }
}

.card-horizon-img {
flex: 1;
min-height: 18rem;
}

.card-horizon-img img {
width: 100%;
height: 100%;
object-fit: cover;
}

.card-horizon-body {
flex: 2;
padding: 2rem;
}

/* Gallery */
.gallery-grid {
display: grid;
gap: 1.5rem;
grid-template-columns: 1fr;
}

@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-item {
height: 16rem;
border-radius: 0.5rem;
overflow: hidden;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.3s;
}

.gallery-item:hover img {
transform: scale(1.05);
}

/* Leadership */
.team-section {
background: var(--nile-blue);
color: var(--white);
}

.team-section h2 { color: var(--white); }

.team-grid {
display: grid;
gap: 3rem;
max-width: 56rem;
margin: 0 auto;
}

@media (min-width: 768px) {
.team-grid { grid-template-columns: 1fr 1fr; }
}

.member {
text-align: center;
}

.avatar {
width: 8rem;
height: 8rem;
margin: 0 auto 1.5rem;
background: var(--white);
border-radius: 50%;
border: 4px solid var(--egypt-gold);
overflow: hidden;
}

.avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}

.member h3 a {
color: var(--white);
}

.member h3 a:hover {
color: var(--egypt-gold);
}

.member-title {
color: var(--egypt-gold);
font-weight: 500;
margin-bottom: 1rem;
}

.member-bio {
color: var(--gray-400);
font-size: 0.875rem;
}

/* Support Section */
.support-section {
background: var(--stone-900);
color: var(--white);
text-align: center;
}

.icon-big {
font-size: 3rem;
color: var(--egypt-gold);
margin-bottom: 1.5rem;
}

.support-cards {
display: grid;
gap: 2rem;
max-width: 56rem;
margin: 3rem auto 0;
}

@media (min-width: 768px) {
.support-cards { grid-template-columns: 1fr 1fr; }
}

.support-card {
background: var(--stone-800);
padding: 2rem;
border-radius: 0.5rem;
border: 1px solid var(--stone-700);
display: flex;
flex-direction: column;
justify-content: space-between;
transition: border 0.3s;
}

.support-card:hover {
border-color: var(--egypt-gold);
}

.card-icons {
color: var(--egypt-gold);
font-size: 1.875rem;
margin-bottom: 1rem;
display: flex;
justify-content: center;
gap: 0.5rem;
}

.btn-donate {
display: block;
width: 100%;
background: var(--egypt-gold);
color: var(--white);
font-weight: 700;
padding: 0.75rem;
border-radius: 0.25rem;
margin-top: 1.5rem;
}

.btn-donate:hover {
background: #b38d51;
}

.btn-contact {
display: block;
width: 100%;
background: var(--stone-600);
color: var(--white);
font-weight: 700;
padding: 0.75rem;
border-radius: 0.25rem;
margin-top: 1.5rem;
}

.btn-contact:hover {
background: var(--gray-600);
}

/* Footer */
footer {
margin-top: 5rem;
padding-top: 2rem;
border-top: 1px solid var(--stone-800);
color: var(--gray-600);
font-size: 0.875rem;
}

/* Utilities */
.text-gold { color: var(--egypt-gold); }
.text-blue { color: var(--nile-blue); }
.font-bold { font-weight: 700; }
.italic { font-style: italic; }
.hidden { display: none; }

/* Custom: Zoom in Temple Ruins image to hide internal borders */
#mission .img-frame img {
    transform: scale(1.1);
    /* Clip the zoomed edges back to the original container size */
    clip-path: inset(4.55% round 0.45rem);
    /* Standard box-shadow gets clipped, so use drop-shadow filter */
    box-shadow: none;
    filter: drop-shadow(0 20px 20px rgba(0, 0, 0, 0.1));
}

/* Custom: Tall Baboon Image */
#projects .img-frame img {
    height: 38rem;
    object-fit: cover;
    object-position: center 50%;
}