/* ===== Base Style ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* ===== Header/Navbar ===== */
header {
    background-color: #0d6efd;
    color: white;
    padding: 20px 0;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.navbar {
    background-color: #0d6efd;
    padding: 10px 20px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

.navbar-nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #ffc107 !important;
    transform: translateY(-2px);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(90deg, #0d6efd, #0b5ed7);
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 20px;
}

.hero .btn {
    font-size: 16px;
    padding: 12px 30px;
}

/* ===== Container & Cards ===== */
.container {
    max-width: 1140px;
    margin: auto;
    padding: 0 15px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

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

.card p {
    color: #6c757d;
}

/* ===== Ads Grid ===== */
.ads-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.ad {
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: 0.3s ease-in-out;
}

.ad:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.ad img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

/* ===== Buttons ===== */
.btn {
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #0d6efd;
    border: none;
}

.btn-primary:hover {
    background-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background-color: #198754;
}

.btn-success:hover {
    background-color: #146c43;
}

/* ===== Footer ===== */
footer {
    background-color: #0d6efd;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

footer a {
    color: #ffc107;
    text-decoration: none;
}

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

/* ===== Chat Styles ===== */
.chat-bubble {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    max-width: 80%;
    font-size: 14px;
}

.chat-bubble.sent {
    background-color: #d1e7dd;
    margin-left: auto;
    text-align: right;
}

.chat-bubble.received {
    background-color: #f8d7da;
    margin-right: auto;
}

.chat-bubble:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ===== Auth / Reset Forms ===== */
.form-wrapper {
    max-width: 420px;
    margin: 60px auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.form-title {
    margin-bottom: 25px;
    font-size: 26px;
    color: #0d6efd;
    font-weight: 700;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-input {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    width: 100%;
}

.form-input:focus {
    border-color: #0d6efd;
    outline: none;
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.2);
}

.reset-link-box {
    margin-top: 20px;
    background-color: #f1f3f5;
    padding: 15px;
    border-left: 4px solid #0d6efd;
    border-radius: 8px;
    word-break: break-word;
    text-align: left;
}

.error-text {
    color: red;
    font-weight: bold;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 16px;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 10px;
    }

    .ads-container {
        grid-template-columns: 1fr;
    }

    .form-wrapper {
        margin: 30px 15px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 15px;
    }

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

    .hero p {
        font-size: 14px;
    }

    .btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    .ad img {
        height: 150px;
    }

    .form-title {
        font-size: 22px;
    }

    .form-input {
        font-size: 14px;
    }

    footer {
        font-size: 14px;
    }
}
/* General card styling */
.card {
    transition: transform 0.2s ease-in-out;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
}

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

/* Hero Section */
section.bg-light {
    background: linear-gradient(to right, #e0f7fa, #ffffff);
}

/* Buttons */
.btn-lg {
    font-size: 1.1rem;
    padding: 14px 28px;
    border-radius: 8px;
}

/* Input and Selects */
form .form-control, form .form-select {
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: none;
    border: 1px solid #ccc;
}

form .form-control:focus, form .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.2);
}

/* Ad image styling */
.card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Pagination UI */
.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    font-weight: bold;
    border-radius: 6px;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .card-img-top {
        height: 180px;
    }

    .display-5 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1rem;
    }

    .btn-lg {
        width: 100%;
        font-size: 1rem;
    }

    form .col-md-3, form .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    form .text-end {
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-brand img {
        max-height: 60px;
        margin-right: 5px;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 0.85rem;
    }

    .card .btn {
        font-size: 0.9rem;
    }
}
