/*
Theme Name: FCPP - Formation Complémentaire Préalable à la Promotion
Description: قالب WordPress أكاديمي متميز للتكوين التكميلي بجامعة الجزائر 3.
Version: 1.0.4
*/

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
    --algerian-green: #006233;
    --algerian-white: #FFFFFF;
    --algerian-red: #D21034;
    --gold-accent: #C9A227;
    --light-green: #E8F5E9;
    --dark-green: #004D26;
    --cool-gray: #f4f6f8;
    --text-dark: #1A1A1A;
    --text-gray: #4A4A4A;
    --bg-light: #F8FAF8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    direction: rtl;
    text-align: right;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6, .hero-title, .section-title {
    font-family: 'Cairo', sans-serif; /* Keep Cairo for main titles */
    font-weight: 800;
    line-height: 1.4;
    color: var(--algerian-green);
}

h1 { font-size: 2.5rem; } h2 { font-size: 2rem; } h3 { font-size: 1.5rem; } h4 { font-size: 1.25rem; }
p { margin-bottom: 1rem; color: var(--text-gray); font-family: 'Cairo', sans-serif; font-weight: 600; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.section-padding { padding: 4rem 0; }

/* ===== Justify all paragraphs ===== */
p, .entry-content, .about-card-text, .about-item-text, .hero-description,
.footer-text, .contact-info-item p, .objectives-list li {
    text-align: justify;
}

/* ===== Header ===== */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.top-bar { background: var(--algerian-green); color: white; padding: 0.5rem 0; font-size: 0.875rem; font-weight: 600; }
.top-bar-content { display: flex; justify-content: space-between; align-items: center; }
.main-header { padding: 1rem 0; }
.header-content { display: flex; justify-content: space-between; align-items: center; }
.site-branding { display: flex; align-items: center; gap: 1rem; }
.site-logo { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; background: white; border-radius: 50%; padding: 5px; }
.site-logo img { width: 100%; height: auto; object-fit: contain; }
.site-title { font-size: 1.25rem; font-weight: 800; color: var(--algerian-green); margin: 0; }
.site-description { font-size: 0.875rem; color: var(--text-gray); margin: 0; font-weight: 700; }

.main-navigation { display: flex; gap: 2rem; }
.main-navigation ul { display: flex; list-style: none; gap: 0.5rem; }
.main-navigation a { display: block; padding: 0.75rem 1rem; color: var(--text-dark); font-weight: 700; border-radius: 0.5rem; transition: 0.3s; }
.main-navigation a:hover { color: var(--algerian-green); background: var(--light-green); }

.mobile-menu-toggle { display: none; background: var(--algerian-green); color: white; border: none; padding: 0.75rem; border-radius: 0.5rem; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.875rem 1.5rem; border-radius: 0.5rem; font-weight: 700; cursor: pointer; border: none; font-size: 1rem; font-family: 'Cairo', sans-serif; transition: 0.3s; }
.btn-primary { background: linear-gradient(135deg, var(--algerian-green) 0%, var(--dark-green) 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 98, 51, 0.4); }
.btn-gold { background: linear-gradient(135deg, var(--gold-accent) 0%, #B8941F 100%); color: white; }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4); }
.btn-outline {
    background: transparent;
    color: var(--algerian-green);
    border: 2px solid var(--algerian-green);
}
.btn-outline:hover {
    background: var(--light-green);
    color: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 98, 51, 0.2);
}


/* ===== Hero Section ===== */
.hero-section { min-height: 100vh; display: flex; align-items: center; position: relative; padding-top: 100px; background: linear-gradient(135deg, var(--algerian-green) 0%, var(--dark-green) 100%); }
.hero-content { position: relative; z-index: 10; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: center; }
.hero-text { color: white; }
.hero-title { font-size: 4rem; margin-bottom: 2rem; line-height: 1.4; color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
.hero-description.highlighted { background: rgba(0, 0, 0, 0.3); padding: 1.5rem; border-radius: 0.5rem; border-right: 5px solid var(--gold-accent); margin-bottom: 2rem; line-height: 1.8; color: var(--gold-accent); font-weight: 800; font-size: 1.6rem; }
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats-card { background: rgba(255, 255, 255, 0.95); border-radius: 1.5rem; padding: 2rem; box-shadow: 0 20px 60px rgba(0,0,0,0.2); text-align: center; max-width: 90%; margin: 0 auto; }
.hero-logo-large { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.hero-logo-large img { width: 180px; max-width: 100%; height: auto; object-fit: contain; }
.university-name { font-size: 2.2rem; font-weight: 900; color: var(--algerian-green); margin-bottom: 0.5rem; }
.university-slogan { font-size: 1.3rem; font-weight: 700; color: var(--text-gray); margin-bottom: 2rem; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat-item { background: var(--light-green); border-radius: 1rem; padding: 1rem; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--algerian-green); }
.stat-label { font-size: 1.1rem; font-weight: 700; color: var(--text-gray); }

/* ===== Training Offers Section ===== */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title { font-size: 2.5rem; }
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}
.offer-card {
    background: var(--cool-gray);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e1e4e8;
}
.offer-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--algerian-green) 0%, var(--dark-green) 100%);
    color: white;
    min-height: 160px; /* توحيد الارتفاع */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.offer-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
}
.offer-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.modules-content { display: none; margin-top: 15px; padding-top: 15px; border-top: 1px dashed #ccc; }
.offer-modules-list { list-style: none; }
.offer-modules-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0; font-weight: 600; font-size: 1.05rem; }
.offer-modules-list li::before { content: ''; width: 8px; height: 8px; background: var(--algerian-green); border-radius: 50%; }

/* ===== About Section (موحد الخطوط والأحجام) ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 4rem; align-items: stretch; }
.about-visual { display: flex; }
.about-card { background: linear-gradient(135deg, var(--algerian-green) 0%, var(--dark-green) 100%); border-radius: 1.5rem; padding: 4rem 3rem; color: white; width: 100%; display: flex; flex-direction: column; justify-content: center; }
.about-card-title { font-size: 2.5rem; font-weight: 900; color: var(--gold-accent); margin-bottom: 1.5rem; line-height: 1.2; }
.about-card-text { font-size: 1.3rem; font-weight: 600; line-height: 1.8; color: white; }
.about-content { display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; }
.about-item-title { font-size: 2rem; font-weight: 800; color: var(--algerian-green); margin-bottom: 0.5rem; }
.about-item-text { font-size: 1.2rem; font-weight: 600; color: var(--text-gray); line-height: 1.8; }
.about-objectives-title { font-size: 1.8rem; font-weight: 800; color: var(--algerian-green); margin-bottom: 1rem; }

/* تحسين شكل النقاط في الأهداف */
.objectives-list {
    list-style: none;
    padding: 0;
}
.objectives-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.8;
}
.objectives-list li::before {
    content: "✓";
    color: var(--algerian-green);
    font-weight: 900;
    font-size: 1.3rem;
    display: inline-block;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

/* ===== Contact Section ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 3fr; gap: 3rem; align-items: start; }
.contact-info-list { display: flex; flex-direction: column; gap: 1.5rem; }
.contact-info-item, .contact-map-card { background: var(--bg-light); padding: 2rem; border-radius: 1rem; text-align: center; border: 1px solid #e1e4e8; }
.contact-info-title { color: var(--algerian-green); font-size: 1.3rem; margin-bottom: 0.5rem; }
.contact-form-card { background: white; border-radius: 1rem; padding: 3rem; box-shadow: 0 4px 30px rgba(0,0,0,0.05); border: 1px solid #eee; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group.full-width { grid-column: span 2; }
.form-group label { font-weight: 700; color: var(--algerian-green); font-size: 1.1rem; }
.form-group input, .form-group select, .form-group textarea { padding: 1rem; border: 1px solid #ccc; border-radius: 0.5rem; font-family: 'Cairo', sans-serif; font-size: 1.1rem; }
.form-submit { width: 100%; justify-content: center; padding: 1rem; font-size: 1.3rem; }

/* ===== Footer Styles ===== */
.site-footer {
    background: linear-gradient(135deg, var(--algerian-green) 0%, var(--dark-green) 100%);
    color: white;
}

.footer-main {
    padding: 5rem 0 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.footer-title, .footer-heading {
    font-family: 'Cairo', sans-serif;
    color: white; /* Default white, gold accent for main title */
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-about .footer-title {
    color: var(--gold-accent);
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 10px;
}
.footer-subtitle {
    font-size: 1.4rem;
    color: white;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.footer-text, .footer-links a, .footer-contact-list li {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.8;
    color: rgba(255,255,255,0.9);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li a:hover {
    color: var(--gold-accent);
    text-decoration: underline;
}

.footer-contact-list {
    list-style: none;
    padding: 0;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact-list li svg {
    flex-shrink: 0;
    color: var(--gold-accent);
    width: 20px;
    height: 20px;
    margin-top: 3px;
}

.footer-flag-strip {
    display: flex;
    height: 10px;
}

.footer-flag-strip .green { background-color: var(--algerian-green); flex: 1; }
.footer-flag-strip .white { background-color: var(--algerian-white); flex: 1; }
.footer-flag-strip .red { background-color: var(--algerian-red); flex: 1; }

.footer-bottom {
    padding: 2rem 0;
    text-align: center;
}

.footer-copyright {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

/* Page Specific Styles for single.php and page.php */
.page-title {
    font-family: 'Tajawal', sans-serif;
    font-weight: 900;
    font-size: 3rem;
    color: white;
    margin: 0;
    line-height: 1.3;
}

.single .entry-header .entry-meta,
.page .entry-content {
    font-family: 'Tajawal', sans-serif;
}

.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 {
    font-family: 'Tajawal', sans-serif;
    color: var(--algerian-green);
    font-weight: 800;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.entry-content p, .entry-content ul, .entry-content ol {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.entry-content ul, .entry-content ol {
    padding-right: 20px;
    list-style-position: inside;
}

.entry-content ul li::before {
    content: "•";
    color: var(--gold-accent);
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Comments Section Styling */
#comments {
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.comments-title {
    font-family: 'Cairo', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--algerian-green);
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--gold-accent);
    padding-bottom: 0.5rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.comment-body {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.comment-author .fn {
    font-weight: 700;
    color: var(--algerian-green);
    font-size: 1.1rem;
}

.comment-metadata a {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.comment-content p {
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-dark);
    margin-top: 1rem;
    margin-bottom: 0;
}

.reply {
    margin-top: 1rem;
    text-align: left;
}

.reply a {
    color: var(--gold-accent);
    font-weight: 700;
    font-size: 0.95rem;
}

.comment-form-comment label {
    font-weight: 700;
    color: var(--algerian-green);
    margin-bottom: 0.5rem;
    display: block;
}

.comment-form-comment textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    min-height: 120px;
}

.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-url {
    margin-bottom: 1rem;
}

.comment-form label {
    font-weight: 700;
    color: var(--algerian-green);
    margin-bottom: 0.5rem;
    display: block;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
}

.form-submit {
    background: linear-gradient(135deg, var(--algerian-green) 0%, var(--dark-green) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 98, 51, 0.4);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content, .about-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .offers-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats-card { max-width: 100%; }
    .footer-main { text-align: center; }
    .footer-links-column, .footer-contact { text-align: center; }
    .footer-contact-list li { justify-content: center; }
}
@media (max-width: 768px) {
    .mobile-menu-toggle { display: block; }
    .main-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; background: white; padding: 1rem; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
    .main-navigation.active { display: block; }
    .main-navigation ul { flex-direction: column; }
    .hero-title { font-size: 2.8rem; }
    .hero-description.highlighted { font-size: 1.3rem; }
    .offers-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: span 1; }
    .page-title, .single .page-title { font-size: 2.2rem; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .university-name { font-size: 1.8rem; }
    .university-slogan { font-size: 1.1rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item { padding: 0.75rem; }
    .stat-value { font-size: 1.8rem; }
    .stat-label { font-size: 1rem; }
    .about-card-title { font-size: 2rem; }
    .about-card-text { font-size: 1.1rem; }
    .about-item-title { font-size: 1.6rem; }
    .about-item-text { font-size: 1rem; }
    .objectives-list li { font-size: 1rem; }
    .top-bar-content { flex-direction: column; text-align: center; }
    .top-bar-left, .top-bar-right { margin-bottom: 0.5rem; }
    .site-branding-text { text-align: center; }
    .site-title { font-size: 1.1rem; }
    .site-description { font-size: 0.75rem; }
    .footer-grid { grid-template-columns: 1fr; }
}