:root {
    --primary: #1a73e8;
    --secondary: #0d47a1;
    --accent: #f57c00;
    --light: #f5f5f5;
    --dark: #333;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f8f9fa;
    color: var(--dark);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}
    
    /* Full background image */
body {
  background-image: url("https://avogadro.pro/assets/images/site%20avogadro%20background.png"); /* path to your image */
  background-size: cover;       /* makes image cover the whole page */
  background-position: center;  /* centers the image */
  background-repeat: no-repeat; /* prevents tiling */
  background-attachment: fixed; /* keeps it fixed while scrolling */
  font-family: Arial, sans-serif;
 
}


body.rtl {
    direction: rtl;
    text-align: right;
}

body.ltr {
    direction: ltr;
    text-align: left;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.school-logo {
    height: 50px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    margin-right: 15px;
}

.logo-container {
    display: flex;
    align-items: center;
}

[dir="rtl"] .school-logo {
    margin-right: 0;
    margin-left: 15px;
}

.school-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.lang-switcher {
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lang-btn.active {
    background: white;
    color: var(--primary);
}

/* Slider Styles */
.slider-container {
    margin: 30px 0;
    position: relative;
    height: 800px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 30px;
}

.slide-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.slide-desc {
    font-size: 1.2rem;
    max-width: 800px;
}

.slider-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: white;
}

.slider .slide { pointer-events: none; }
.slider .slide.active { pointer-events: auto; }

.slide-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 16px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.slide-cta:hover { background: rgba(0, 0, 0, 0.75); }

.slide-cta.left {
    position: absolute;
    left: 24px;
    bottom: 24px;
}

.slider-arrows {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
}

.slider-arrow:hover { background: rgba(0, 0, 0, 0.55); }
.slider-arrow.prev { left: 12px; }
.slider-arrow.next { right: 12px; }
.slider-arrow i { font-size: 18px; }

/* Big Icons Section */
.big-icons-section {
    padding: 50px 0;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    margin: 30px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.big-icons-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.big-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 250px;
    padding: 30px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-align: center;
    cursor: pointer;
}

.big-icon:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.icon-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;

    overflow: hidden; /* مهم حتى لا تخرج الصورة خارج الدائرة */
}

.icon-circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* أو cover حسب ما تريد */
    display: block;
}

.icon-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

/* Blog Section */
.blog-section {
    padding: 50px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* auto-fill all available space, max 4 per row */
    gap: 30px;
}

.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--secondary);
}

.blog-excerpt {
    color: #666;
    margin-bottom: 20px;
}

.read-more {
    display: inline-block;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Responsive Blog Grid */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fit, 1fr); /* auto-fill all available space, max 4 per row */
    }
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr; /* 1 per row on small mobile */
    }
}

/* Map Section */
.map-section {
    padding: 50px 0;
    background: white;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    margin: 30px 0;
    position: relative;
}

.map-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Responsive iframe container */
.map-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--border-radius);
}

/* Placeholder style */
.map-placeholder {
    width: 100%;
    height: 400px;
    background: #f0f0f0;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #666;
    box-shadow: var(--box-shadow);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-placeholder, .map-responsive {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .map-placeholder, .map-responsive {
        height: 250px;
    }
}


/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary), #0a3a8a);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 992px) {
    .slider-container {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .slider-container {
        height: 350px;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slide-desc {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .big-icon {
        width: 100%;
        max-width: 300px;
    }
    
    .big-icons-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .slider-container {
        height: 300px;
    }
    
    .slide-content {
        padding: 15px;
    }
    
    .slide-title {
        font-size: 1.3rem;
    }
    
    .slide-desc {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr; /* 1 per row on very small screens */
    }
}

/* Admin Panel Styles */
.admin-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin: 50px auto;
}

.admin-header {
    text-align: center;
    margin-bottom: 30px;
}

.admin-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-nav-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.admin-nav-btn:hover {
    background: var(--secondary);
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background: var(--secondary);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-success {
    background: var(--success);
}

.btn-danger {
    background: var(--danger);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background: #f5f5f5;
    font-weight: 700;
}

.table tr:hover {
    background: #f9f9f9;
}

.action-btn {
    padding: 6px 12px;
    margin: 0 3px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.lang-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.lang-tab {
    padding: 8px 15px;
    background: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.lang-tab.active {
    background: var(--primary);
    color: white;
}

.lang-content {
    display: none;
}

.lang-content.active {
    display: block;
}

/* Base Alert Styling */
.alerts-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

.alert {
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-icon {
    font-size: 1.2em;
}

.alert-close {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0;
    margin-right: -5px;
}

.alert-close:hover {
    opacity: 1;
}

/* Alert Types */
.alert-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-error,
.alert-danger {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .alerts-container {
        max-width: 90%;
        left: 5%;
        right: 5%;
        top: 10px;
    }
}

/* إزالة الخط السفلي للروابط في Slider, Big Icons, Header و Footer */
.slider a,
.big-icons-container a,
header a,
footer a {
    text-decoration: none !important;
}

