/* New Style for School Website based on Education Website Template */

/* General Styles */
:root {
    --primary-color: #0071bc;
    --secondary-color: #29abe2;
    --accent-color: #f7941d;
    --dark-color: #333333;
    --light-color: #f4f4f4;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.section-padding {
    padding: 80px 0;
}

/* Main content wrapper */
.main-content {
    flex: 1 0 auto; /* This makes the content grow and push the footer down */
}

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

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.section-title h2:after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 50px;
    height: 3px;
    background: var(--accent-color);
    transform: translateX(-50%);
}

.section-title p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: #666;
}

/* Buttons */
.btn {
    border-radius: 30px;
    padding: 10px 25px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-secondary:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-accent:hover {
    background-color: #e58315;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Header & Navigation */
.navbar {
    padding: 15px 0;
    background-color: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
}

.navbar-brand span {
    color: var(--accent-color);
}

.navbar-nav .nav-link {
    font-weight: 600;
    padding: 10px 15px !important;
    color: var(--dark-color) !important;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 5px;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover:after,
.navbar-nav .nav-link.active:after {
    transform: scaleX(1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 113, 188, 0.8), rgba(41, 171, 226, 0.8)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 150px 0;
    text-align: center;
}

/* Page-specific hero sections */
body.events-page .hero-section {
    background: linear-gradient(rgba(25, 135, 84, 0.8), rgba(40, 167, 69, 0.8)), url('../img/hero-bg.jpg') !important;
}

body.announcements-page .hero-section {
    background: linear-gradient(rgba(255, 193, 7, 0.8), rgba(255, 193, 7, 0.8)), url('../img/hero-bg.jpg') !important;
}

/* Featured Items */
.featured-event, .featured-news, .featured-announcement {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 40px;
}

.featured-event .card, .featured-news .card, .featured-announcement .card {
    display: flex !important;
    flex-direction: row !important;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.featured-event .row, .featured-news .row, .featured-announcement .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

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

.card-header {
    font-weight: 700;
    padding: 20px;
    border-bottom: none;
}

.card-body {
    padding: 25px;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Featured Content */
.featured-event, .featured-news {
    margin-bottom: 40px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.featured-event .card, .featured-news .card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex !important;
    flex-direction: row !important;
}

.featured-event .card-title, .featured-news .card-title {
    font-size: 1.5rem;
    line-height: 1.3;
}

.featured-event .row, .featured-news .row {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* News, Events, Announcements */
.news-item, .event-item, .announcement-item {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.news-item:last-child, .event-item:last-child, .announcement-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.news-item img, .event-item img, .announcement-item img {
    border-radius: 10px;
    margin-bottom: 15px;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-item h5, .event-item h5, .announcement-item h5 {
    font-weight: 700;
    margin-bottom: 10px;
}

.news-item p, .event-item p, .announcement-item p {
    color: #666;
    margin-bottom: 15px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 70px 0 0;
    flex-shrink: 0; /* Prevent the footer from shrinking */
}

footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
}

footer h5:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

footer a {
    color: #ccc;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    padding-left: 5px;
}

footer ul {
    list-style: none;
    padding-left: 0;
}

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

footer p {
    color: #ccc;
}

.footer-bottom {
    background-color: #222;
    padding: 20px 0;
    margin-top: 50px;
}

.footer-bottom p {
    margin-bottom: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    z-index: 99;
    padding: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.back-to-top i {
    line-height: 50px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }
}

/* Custom Utilities */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.rounded-custom {
    border-radius: 10px;
}

.shadow-custom {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
