/* Global styles */

/* Root variables */
:root {
    --primary-color: #FF6B35;
    --primary-hover: #e85a2a;

    --secondary-color: #F5F5F5;
    --dark-accent: #2D3142;
    --accent-color: #4F5D75;
    --success-color: #06D6A0;
    --light-bg: #F5F5F5;

    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Base */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--secondary-color);
    color: var(--dark-accent);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
}

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

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

/* Layout */

.container {
    max-width: 1140px;
}

.page-header {
    width: 100%;
    padding: 80px 0;
}

.page-header-bg {
    background: linear-gradient(rgba(45, 49, 66, 0.75), rgba(45, 49, 66, 0.75)),
        url('/static/cup_of_english/images/course-3.jpg') center/cover no-repeat;
}

.page-header h1,
.page-header h3 {
    color: white;
}

/* Navbar */

.navbar {
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--dark-accent);
}

.navbar-nav .nav-link {
    color: var(--accent-color);
    font-weight: 500;
    padding: 0.8rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Active navbar link */
.navbar-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

/* Hover effect for navbar links */
.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* About page */

/* CTA box inside About section */
.registration-cta-box {
    margin-top: 30px;
    max-width: 360px;
    background: linear-gradient(135deg,
            rgba(255, 107, 53, 0.08),
            rgba(79, 93, 117, 0.06));
    padding: 18px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.registration-cta-box p {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--accent-color);
}

/* Buttons */

.btn {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

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

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

.btn-success:hover {
    opacity: 0.9;
}

/* Cards */

.card {
    background: white;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(45, 49, 66, 0.08);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
}

/* Course cards */

.course-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.course-card img {
    width: 100%;
    height: auto;
}

.course-card-body {
    padding: 20px;
}


/* Category items */

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

.cat-item:hover img {
    transform: scale(1.05);
}

.cat-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


/* Forms */

form input,
form select,
form textarea {
    border-radius: var(--border-radius);
}

.contact-input-row {
    max-width: 70%;
    margin-left: 0;
    margin-right: auto;
}

.contact-input-col {
    display: flex;
    flex-direction: column;
}

.contact-map {
    border: 0;
    border-radius: 8px;
}

/* Footer */

.footer-main {
    margin-top: 90px;
}

.footer-heading {
    letter-spacing: 5px;
}

.footer-bottom {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.footer-item i,
.footer-link i {
    margin-right: 0.5rem; /* first space */
}

.footer-item span,
.footer-link span {
    margin-left: 0.25rem; /* second space */
}

/* better alignment */
.footer-item,
.footer-link {
    display: flex;
    align-items: center;
}

.footer-link:hover {
    text-decoration: underline;
}

footer,
.bg-dark {
    background: var(--dark-accent) !important;
}

footer a,
.bg-dark a {
    color: white;
}

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

.footer-socials a {
    margin-right: 10px;
}

footer-socials a:last-child {
    margin-right: 0;
}


/* Back to top */

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: inline-block;
}

/* Carousel height fix */
#header-carousel .carousel-item img {
    height: 500px;
    object-fit: cover;
}

/* Smoother transition */
.carousel-item {
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

/* Caption styling */
.carousel-caption {
    padding: 1rem;
}

@media (max-width: 576px) {
    .carousel-caption h1 {
        font-size: 1.5rem;
    }

    .carousel-caption h5 {
        font-size: 0.9rem;
    }
}

/* Caption animation */
.animate-caption {
    animation: fadeInUp 0.8s ease forwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-section .bg-light {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


/* Responsive design */

/* Mobile devices < 768px */
@media (min-width: 576px) {

    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .card {
        margin-bottom: 20px;
    }

    .btn {
        font-size: 0.9rem;
    }

    .navbar .btn {
        margin-top: 10px;
    }

    /* Auth & checkout forms */
    .card form {
        font-size: 0.95rem;
    }

    .row.g-4 > div {
        margin-bottom: 20px;
    }

    form .row > div {
        margin-bottom: 10px;
    }
}

/* Tablet ≥ 768px */
@media (min-width: 768px) {

    .container {
        max-width: 720px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .navbar .btn {
        margin-top: 0;
    }

    .card {
        margin-bottom: 30px;
    }

    .course-card {
        padding: 10px;
    }

    #header-carousel .carousel-item img {
        height: 350px;
    }
}

/* Desktop ≥ 992px */
@media (min-width: 992px) {

    .container {
        max-width: 960px;
    }

    .page-header h1 {
        font-size: 2.6rem;
    }

    .navbar-brand {
        font-size: 1.6rem;
    }

    .btn {
        font-size: 1rem;
    }

    .card {
        padding: 20px;
    }

    #header-carousel .carousel-item img {
        height: 450px;
    }
}

/* Large desktop ≥ 1200px */
@media (min-width: 1200px) {

    .container {
        max-width: 1140px;
    }

    #header-carousel .carousel-item img {
        height: 550px;
    }
}

/* Mobile layout ≤ 576px */
@media (max-width: 576px) {

    .navbar-brand {
        font-size: 1.2rem;
    }

    .page-header {
        padding: 40px 0;
    }

    .btn {
        width: 100%;
    }

    #header-carousel .carousel-item img {
        height: 250px;
        object-fit: cover;
    }
}