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

body {
    font-family: 'Cairo', 'Almarai', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #27374D;
    background-color: #ffffff;
}

h1, h2, h3, .logo {
    font-family: 'Cairo', 'Montserrat', sans-serif;
    font-weight: 700 !important;
}

p, .article-card p, .full-article p, .service-card p, .contact-item, .nav-links li a {
    font-family: 'Cairo', 'Lora', serif;
}

[lang="ar"] p, [dir="rtl"] p, 
[lang="ar"] .article-card p, [dir="rtl"] .article-card p,
[lang="ar"] .full-article p, [dir="rtl"] .full-article p,
[lang="ar"] .service-card p, [dir="rtl"] .service-card p,
[lang="ar"] .contact-item, [dir="rtl"] .contact-item,
[lang="ar"] .nav-links li a, [dir="rtl"] .nav-links li a {
    font-family: 'Cairo', sans-serif;
}

header {
background-color: #27374D;
color: white;
padding: 1rem 0;
z-index: 1000;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
max-width: 1200px;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 1.5rem;
}

.logo-container {
    text-decoration: none;
    color: inherit;
}

.logo {
font-size: 1.5rem;
font-weight: bold;
}

.nav-links {
display: flex;
list-style: none;
}

.nav-links li {
margin-inline-start: 1.5rem;
}

.nav-links li a {
color: white;
text-decoration: none;
font-weight: 500;
transition: color 0.3s;
}

.nav-links li a:hover {
color: #9DB2BF;
}

.hero {
background: linear-gradient(rgba(39, 55, 77, 0.7), rgba(39, 55, 77, 0.7)), url('images/utas.jpg');
background-size: cover;
background-position: center;
color: white;
padding: 8rem 1rem;
text-align: center;
}

.hero h1 {
font-size: clamp(1.8rem, 5vw, 3.5rem);
margin-bottom: 1rem;
max-width: 900px;
margin-inline: auto;
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

section {
margin-bottom: 5rem;
}

h2 {
color: #27374D;
margin-bottom: 2rem;
border-bottom: 2px solid #9DB2BF;
display: inline-block;
padding-bottom: 0.5rem;
font-size: 30px;
}

.articles-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}

.article-card {
background: #DDE6ED;
padding: 2rem;
border-radius: 8px;
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 20px;
}

.article-card h3 {
margin-bottom: 1rem;
color: #27374D;
}

.article-card p {
margin-bottom: 1.5rem;
color: #444;
}

.full-article h2 {
display: block;
margin-bottom: 1.5rem;
}

.full-article p {
margin-bottom: 1.5rem;
}

.full-article ul {
margin-bottom: 1.5rem;
padding-inline-start: 1.5rem;
}

.contact-item {
display: flex;
align-items: center;
gap: 1rem;
font-size: 1.1rem;
}

.contact-item i {
font-size: 1.5rem;
color: #526D82;
width: 30px;
text-align: center;
}

.faq-item {
background: #f9f9f9;
padding: 1.5rem;
border-inline-start: 4px solid #526D82;
margin-bottom: 1rem;
}

.faq-item h3 {
color: #526D82;
margin-bottom: 0.5rem;
}

footer {
background-color: #27374D;
color: white;
text-align: center;
padding: 2.5rem 0;
margin-top: 4rem;
}

.footer-social {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-social a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s, color 0.3s;
    text-decoration: none;
}

.footer-social a:hover {
    color: #9DB2BF;
    transform: translateY(-3px);
}

.lang-switch {
    font-weight: bold;
}

.btn {
display: inline-block;
background-color: #27374D;
color: white;
padding: 0.75rem 1.5rem;
text-decoration: none;
border-radius: 5px;
font-weight: 500;
transition: background 0.3s;
text-align: center;
}

.btn:hover {
background-color: #526D82;
}

@media (max-width: 768px) {
nav {
flex-direction: column;
gap: 1.5rem;
}
.nav-links {
flex-wrap: wrap;
justify-content: center;
}
.nav-links li {
margin: 0.5rem;
}
.container {
padding: 2rem 1rem;
}
}

@media (max-width: 480px) {
.articles-grid {
grid-template-columns: 1fr;
}
}


.services-section {
    margin-bottom: 4rem;
}

.services-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.ads-board {
    background: #f8fafc;
    border: 1px solid #DDE6ED;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.ads-board h3 {
    margin-bottom: 1rem;
    color: #27374D;
    font-size: 1.2rem;
    border-bottom: 2px solid #DDE6ED;
    padding-bottom: 0.5rem;
}

.ads-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-inline-end: 0.5rem;
}

.ad-message {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-inline-start: 4px solid #526D82;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    position: relative;
}

.delete-btn {
    position: absolute;
    top: 5px;
    background: transparent;
    color: #ff4d4d;
    border: none;
    border-radius: 4px;
    padding: 5px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.delete-btn:hover {
    background: transparent;
    transform: scale(1.1);
}

[dir="rtl"] .delete-btn {
    left: 5px;
}

[dir="ltr"] .delete-btn {
    right: 5px;
}

.ad-message .author {
    font-weight: bold;
    color: #27374D;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.ad-message .content {
    font-size: 0.95rem;
    color: #526D82;
}

.ad-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.ad-form input,
.ad-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #DDE6ED;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}

.ad-form button {
    background: #27374D;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.ad-form button:hover {
    background: #526D82;
}

@media (max-width: 900px) {
    .services-layout {
        display: flex;
        flex-direction: column;
    }
    
    .ads-board {
        height: 450px;
        width: 100%;
        margin-top: 1rem;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: #ffffff;
    border: 1px solid #DDE6ED;
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.service-card h3 {
    color: #27374D;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.service-card p {
    margin-bottom: 0.8rem;
    color: #526D82;
    font-size: 0.95rem;
}

.service-card i {
    color: #27374D;
    margin-inline-end: 0.5rem;
}

.service-card a {
    color: #27374D;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.service-card a.btn {
    background: linear-gradient(135deg, #27374D 0%, #526D82 100%);
    color: white;
    border-radius: 12px;
    padding: 0.9rem 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(39, 55, 77, 0.15);
    border: none;
    display: inline-block;
    text-align: center;
}

.service-card a.btn:hover {
    background: linear-gradient(135deg, #526D82 0%, #27374D 100%);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 20px rgba(39, 55, 77, 0.25);
    text-decoration: none;
}

.tips-section {
    background: #f8fafc;
    padding: 3rem;
    border-radius: 20px;
    margin-top: 4rem;
    border: 1px solid #e2e8f0;
}

.tip-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.tip-card h3 {
    color: #27374D;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #DDE6ED;
    padding-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.tip-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.tip-card li {
    margin-bottom: 1rem;
    padding-inline-start: 0.5rem;
}

.tip-card .lightbulb {
    background: #eff6ff;
    padding: 1.2rem;
    border-inline-start: 4px solid #27374D;
    border-radius: 8px;
    margin-top: 1.5rem;
    color: #1e40af;
    font-weight: 500;
}


.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.about-image {
    flex-shrink: 0;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 6px solid #DDE6ED;
    transition: transform 0.3s ease;
}

.about-image:hover {
    transform: scale(1.05) rotate(2deg);
}

.about-text {
    flex: 1;
}

@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-image {
        width: 200px;
        height: 200px;
        margin-bottom: 1rem;
    }
}


.services-hub-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gradient-text {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #27374D 0%, #526D82 50%, #27374D 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.subtitle-text {
    font-size: 1.25rem;
    color: #526D82;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 500;
    opacity: 0.9;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin: 2rem 0;
}

.hub-card {
    background: white;
    border-radius: 25px;
    padding: 3.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(221, 230, 237, 0.5);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hub-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(39, 55, 77, 0.12);
    border-color: #27374D;
}

.hub-icon-wrapper {
    width: 100px;
    height: 100px;
    background: #f8fafc;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

.hub-card:hover .hub-icon-wrapper {
    background: #27374D;
    transform: rotate(10deg);
}

.hub-icon-wrapper i {
    font-size: 3rem;
    color: #27374D;
    transition: color 0.4s;
}

.hub-card:hover .hub-icon-wrapper i {
    color: white;
}

.hub-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #27374D;
}

.hub-card p {
    font-size: 1.05rem;
    color: #526D82;
    line-height: 1.6;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: #27374D;
    color: white;
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    text-decoration: none;
    margin-bottom: 3rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
}

.back-btn:hover {
    background: #526D82;
    transform: translateX(8px);
    box-shadow: 0 5px 15px rgba(39, 55, 77, 0.2);
}

.hub-view {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-page-1 {
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('images/registration_bg.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.article-page-2 {
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('images/academic_bg.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.article-page-3 {
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('images/time_bg.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.full-article {
    background: rgba(255, 255, 255, 0.8);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
}

.about-box {
    background-color: #f0f7ff; /* light navy/blue tint */
    border: 1px solid #DDE6ED;
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.about-box h2 {
    border-bottom-color: #27374D;
}

.article-main-img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: block;
}
