/* 
    Visual Identity: Anwar Al-Hikma Institution
    Colors: Gold (#C5A02B), Dark Grey (#2A2A2A), Medium Grey (#707070), Light Grey (#F5F5F5)
    Fonts: Cairo (Headings), Tajawal (Body)
*/

:root {
    --primary-color: #C5A02B; /* Gold from the logo */
    --secondary-color: #2A2A2A; /* Dark Grey from the text/logo */
    --accent-color: #707070; /* Medium Grey from the uniform */
    --light-bg: #F9F9F9;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--secondary-color);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* --- Header --- */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 130px;
    display: flex;
    align-items: center;
}

.main-header.scrolled {
    padding: 5px 0;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 100px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scrolled .logo {
    height: 60px;
}

.brand-name h1 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin: 0;
    transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scrolled .brand-name h1 {
    font-size: 1.3rem;
}

.brand-name p {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin: 0;
    transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scrolled .brand-name p {
    font-size: 0.75rem;
}

.main-nav ul {
    display: flex;
    gap: 25px;
}

.main-nav ul li a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--secondary-color);
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* --- Hero Section --- */
.hero {
    margin-top: 130px;
    height: 80vh;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/hero-bg.jpeg');
    background-size: cover;
    background-position: top center; /* Show the top of the image */
    background-attachment: scroll; /* Changed from fixed to prevent jitter */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* --- Sections Common --- */
section {
    padding: 100px 0; /* Increased padding to ensure content is not hidden by header */
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-header.white h2 {
    color: var(--white);
}

.divider {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto 20px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* --- About Section --- */
.about {
    background-color: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: justify;
}

.about-image img {
    border-radius: 15px;
    box-shadow: 20px 20px 0 var(--primary-color);
}

/* --- Aspects Section --- */
.aspects-container {
    margin-top: 60px;
}

.aspects-title {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 40px;
    position: relative;
}

.aspects-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

.aspects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.aspect-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid #eee;
}

.aspect-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.aspect-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
}

.aspect-card h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.aspect-card p {
    color: var(--accent-color);
    font-size: 1rem;
}

/* --- Uniform Section --- */
.uniform {
    background-color: var(--light-bg);
}

.uniform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.uniform-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    margin-top: 20px;
}

.uniform-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card-image {
    padding: 20px 20px 0 20px;
}

.card-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: top; /* Show the top of the image (faces/heads) */
    border-radius: 10px;
}

.card-content {
    padding: 30px;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.card-content p {
    margin-bottom: 20px;
    color: var(--accent-color);
}

.card-content ul {
    padding-right: 20px;
}

.card-content ul li {
    position: relative;
    margin-bottom: 10px;
}

.card-content ul li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    right: -20px;
    font-weight: bold;
}

/* --- Tools Section --- */
.tools {
    background-color: var(--secondary-color);
    color: var(--white);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.tool-item {
    text-align: center;
}

.tool-item img {
    border-radius: 10px;
    margin-bottom: 20px;
    border: 3px solid var(--primary-color);
}

.tool-item h4 {
    font-size: 1.3rem;
}

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

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* --- Footer --- */
.main-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px;
}

.footer-logo img {
    height: 80px;
    margin-bottom: 15px;
}

.footer-links h4, .footer-social h4 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

.footer-social .social-icons {
    display: flex;
    gap: 15px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #888;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }
    .about-grid, .uniform-grid, .contact-grid, .footer-content, .aspects-grid {
        grid-template-columns: 1fr;
    }
    .about-image {
        order: -1;
    }
    .tools-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }
    .main-nav ul {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-content h2 {
        font-size: 2rem;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
}
