/* Modern styles for City Technical Institute Marot */

/* Variables */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --accent-color: #f72585;
    --success-color: #4cc9f0;
    --warning-color: #f9c74f;
    --danger-color: #f94144;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* General styles */
body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--dark-color);
    background-color: #f0f2f5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

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

a:hover {
    color: var(--primary-dark);
}

.btn {
    border-radius: var(--border-radius);
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* Header styles */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.6rem;
    color: white !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus,
.navbar-dark .navbar-nav .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.7), rgba(114, 9, 183, 0.7));
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease;
}

.hero .btn {
    animation: fadeIn 1.5s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Card styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    margin-bottom: 25px;
    overflow: hidden;
}

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

.card-header {
    border-bottom: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Form styles */
.form-container {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.form-control {
    border-radius: var(--border-radius);
    padding: 0.6rem 1rem;
    border: 1px solid #dee2e6;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.input-group-text {
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
}

/* Dashboard styles */
.dashboard-stats .card {
    border-radius: var(--border-radius);
    border: none;
    overflow: hidden;
}

.dashboard-stats .card-body {
    padding: 1.5rem;
    position: relative;
}

.dashboard-stats .card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-color);
}

.dashboard-stats .card-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.dashboard-stats .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

/* Sidebar styles */
.sidebar {
    background: linear-gradient(180deg, var(--dark-color), #2c3e50);
    color: white;
    min-height: 100vh;
    transition: var(--transition);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.8rem 1rem;
    margin: 0.3rem 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.sidebar .nav-link i {
    margin-right: 0.8rem;
    font-size: 1.1rem;
}

/* Certificate styles */
.certificate {
    background-color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 50px;
    position: relative;
    font-family: 'Times New Roman', Times, serif;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.certificate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 15px solid transparent;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
    pointer-events: none;
}

.certificate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/logo-watermark.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 50%;
    opacity: 0.05;
    pointer-events: none;
}

.certificate h1 {
    font-size: 2.5rem;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.certificate .certificate-content {
    font-size: 1.2rem;
    line-height: 2;
}

.certificate .signature {
    margin-top: 50px;
    text-align: right;
}

/* Profile photo */
.profile-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* News/Posts styles */
.news-item {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.news-item:hover {
    transform: translateX(5px);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    color: var(--gray-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.news-date i {
    margin-right: 0.5rem;
}

/* Alert styles */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* Footer styles */
footer {
    background: linear-gradient(135deg, var(--dark-color), #2c3e50);
    color: white;
    padding: 3rem 0 1.5rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

footer a:hover {
    color: white;
    text-decoration: none;
}

footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* New Components Styles */

/* Section Title */
.section-title h2 {
    font-weight: 700;
    position: relative;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.title-line {
    width: 50px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    margin-bottom: 20px;
}

.section-title .title-line.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Feature Box */
.feature-box {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    color: var(--primary-color);
    transition: var(--transition);
}

.feature-box:hover .feature-icon {
    transform: scale(1.1);
}

.feature-box h4 {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* Icon Box */
.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* Contact Icon */
.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(67, 97, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Course Card */
.course-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

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

.course-img {
    position: relative;
    overflow: hidden;
}

.course-img img {
    transition: var(--transition);
    width: 100%;
}

.course-card:hover .course-img img {
    transform: scale(1.1);
}

.course-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.course-content {
    padding: 20px;
}

.course-content h5 {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.course-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Testimonial Card */
.testimonial-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    position: relative;
    transition: var(--transition);
    height: 100%;
}

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

.testimonial-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 5px solid rgba(67, 97, 238, 0.1);
}

.testimonial-content {
    text-align: center;
}

.testimonial-rating {
    color: #f9c74f;
    margin-bottom: 15px;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.testimonial-content h5 {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.testimonial-info {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius);
    margin: 0 15px;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    color: white;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: -60px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 99;
    opacity: 0;
    transition: all 0.5s ease;
}

.back-to-top.active {
    bottom: 20px;
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Modal fixes */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}

.modal-dialog {
    margin: 1.75rem auto;
    pointer-events: auto;
}

.modal-content {
    pointer-events: auto;
}

body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        z-index: 1030;
        transition: left 0.3s ease;
    }

    .sidebar.show {
        left: 0;
    }

    .content {
        width: 100%;
    }

    .navbar-toggler {
        display: block;
    }

    .course-info {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .certificate {
        padding: 25px;
    }

    .certificate h1 {
        font-size: 2rem;
    }

    .dashboard-stats .card-text {
        font-size: 1.5rem;
    }

    .testimonial-card {
        padding: 20px;
    }

    .feature-box {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .profile-photo {
        width: 120px;
        height: 120px;
    }

    .form-container {
        padding: 1.5rem;
    }

    .cta-section {
        text-align: center;
    }

    .cta-section .btn {
        margin-top: 15px;
    }

    .testimonial-img {
        width: 60px;
        height: 60px;
    }
}
