/* ========================================
   HOMEPAGE UI/UX CONSISTENCY FIXES
   Professional, balanced, and systematic design
   ======================================== */

/* ========================================
   1. CONSISTENT VERTICAL SPACING
   ======================================== */

/* Reset and standardize all section spacing */
.section-premium {
    padding: 80px 0 !important;
    margin: 0;
}

/* Remove extra spacing from first/last sections */
.hero-premium {
    margin-bottom: 0;
}

.section-premium:last-of-type {
    padding-bottom: 80px !important;
}

/* Consistent internal spacing */
.section-title {
    margin-bottom: 60px !important;
    padding: 0 20px;
}

.section-title h2 {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
    letter-spacing: -0.5px;
}

.section-title p {
    font-size: 1.125rem !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    color: var(--gray) !important;
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   2. EQUAL HEIGHT CARDS - FACULTIES
   ======================================== */

#faculties .row {
    display: flex;
    flex-wrap: wrap;
}

#faculties .col-lg-3,
#faculties .col-md-6 {
    display: flex;
    margin-bottom: 24px;
}

.card-premium {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
    padding: 40px 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-premium .card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-premium h4 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 16px !important;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-premium p {
    font-size: 0.9375rem !important;
    line-height: 1.7 !important;
    flex: 1;
    margin-bottom: 24px !important;
}

.card-premium .btn-card {
    margin-top: auto;
    align-self: center;
}

/* ========================================
   3. EQUAL HEIGHT CARDS - ACTIVITIES
   ======================================== */

#activities .row {
    display: flex;
    flex-wrap: wrap;
}

#activities .col-lg-4,
#activities .col-md-6 {
    display: flex;
    margin-bottom: 24px;
}

.activity-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 480px;
}

.activity-image {
    height: 240px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px;
}

.activity-content h4 {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
    min-height: 50px;
}

.activity-content p {
    font-size: 0.9375rem !important;
    line-height: 1.7 !important;
    flex: 1;
    margin-bottom: 20px !important;
}

.activity-link {
    margin-top: auto;
}

/* ========================================
   4. EQUAL HEIGHT CARDS - NEWS
   ======================================== */

#news .row {
    display: flex;
    flex-wrap: wrap;
}

#news .col-lg-4,
#news .col-md-6 {
    display: flex;
    margin-bottom: 24px;
}

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
}

.news-image {
    height: 220px;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 28px;
}

.news-content h4 {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-content p {
    font-size: 0.9375rem !important;
    line-height: 1.7 !important;
    flex: 1;
    margin-bottom: 20px !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-read-more {
    margin-top: auto;
}

/* ========================================
   5. BALANCED CAREER SECTION
   ======================================== */

#careers .row {
    display: flex;
    align-items: stretch;
}

#careers .col-lg-8 {
    flex: 0 0 65%;
    max-width: 65%;
}

#careers .col-lg-4 {
    flex: 0 0 35%;
    max-width: 35%;
}

.career-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.career-item {
    padding: 28px;
}

.placement-stats {
    padding: 36px 28px;
    position: sticky;
    top: 100px;
}

.placement-stats h3 {
    font-size: 1.5rem !important;
    margin-bottom: 28px !important;
}

.placement-stats .stat-item {
    padding: 20px 0;
}

.placement-stats .stat-number {
    font-size: 2.5rem !important;
}

.placement-stats .stat-label {
    font-size: 0.9375rem !important;
}

/* ========================================
   6. CONSISTENT BUTTON STYLING
   ======================================== */

.btn-hero-primary,
.btn-hero-secondary,
.btn-career-apply,
.btn-career-details,
.btn-card {
    font-size: 1rem !important;
    font-weight: 600 !important;
    padding: 14px 32px !important;
    line-height: 1.5 !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
}

.btn-hero-primary i,
.btn-hero-secondary i {
    margin-right: 8px;
    font-size: 0.875rem;
}

/* CTA Button Group */
.d-flex.gap-4 {
    gap: 16px !important;
    justify-content: center;
    flex-wrap: wrap;
}

.d-flex.gap-4>* {
    margin: 0 !important;
}

/* ========================================
   7. GRID FIXES FOR ALL BREAKPOINTS
   ======================================== */

/* Consistent grid gaps */
.row.g-4 {
    --bs-gutter-x: 24px;
    --bs-gutter-y: 24px;
    margin-left: calc(var(--bs-gutter-x) * -0.5);
    margin-right: calc(var(--bs-gutter-x) * -0.5);
}

.row.g-5 {
    --bs-gutter-x: 48px;
    --bs-gutter-y: 48px;
    margin-left: calc(var(--bs-gutter-x) * -0.5);
    margin-right: calc(var(--bs-gutter-x) * -0.5);
}

/* ========================================
   8. TYPOGRAPHY CONSISTENCY
   ======================================== */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary-dark);
}

/* Body text */
p,
li,
span {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--dark-gray);
}

/* Consistent font sizes */
.lead {
    font-size: 1.25rem !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
}

/* ========================================
   9. NOTICE BOARD IMPROVEMENTS
   ======================================== */

.notice-board-container {
    max-width: 900px;
    margin: 0 auto;
}

.notice-list {
    gap: 20px;
}

.notice-item {
    padding: 24px;
    gap: 20px;
}

.notice-content h4 {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
}

.notice-content p {
    font-size: 0.9375rem !important;
    line-height: 1.7 !important;
}

/* ========================================
   10. ABOUT SECTION BALANCE
   ======================================== */

#about .row {
    align-items: center;
}

.about-content {
    padding: 20px 0;
}

.about-title {
    font-size: 2.25rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
}

.about-subtitle {
    font-size: 1.125rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
}

.about-description {
    font-size: 1rem !important;
    line-height: 1.8 !important;
    margin-bottom: 32px !important;
}

.stats-grid {
    gap: 16px;
    margin-bottom: 32px;
}

.stat-box {
    padding: 20px;
}

.stat-number {
    font-size: 2rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin-bottom: 8px !important;
}

.stat-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
}

/* ========================================
   11. RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .section-premium {
        padding: 60px 0 !important;
    }

    .section-title {
        margin-bottom: 48px !important;
    }

    .section-title h2 {
        font-size: 2rem !important;
    }

    .section-title p {
        font-size: 1rem !important;
    }

    /* 2-column grids */
    #faculties .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    #activities .col-lg-4,
    #news .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Career section stack */
    #careers .col-lg-8,
    #careers .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .placement-stats {
        margin-top: 32px;
        position: relative;
        top: 0;
    }

    /* Card heights */
    .card-premium {
        min-height: 340px;
    }

    .activity-card {
        min-height: 440px;
    }

    .news-card {
        min-height: 460px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .section-premium {
        padding: 50px 0 !important;
    }

    .section-title {
        margin-bottom: 40px !important;
    }

    .section-title h2 {
        font-size: 1.75rem !important;
    }

    .section-title p {
        font-size: 0.9375rem !important;
    }

    /* Single column */
    #faculties .col-lg-3,
    #faculties .col-md-6,
    #activities .col-lg-4,
    #activities .col-md-6,
    #news .col-lg-4,
    #news .col-md-6,
    #careers .col-lg-8,
    #careers .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Adjust card heights */
    .card-premium {
        min-height: auto;
        padding: 32px 24px;
    }

    .activity-card,
    .news-card {
        min-height: auto;
    }

    .activity-image,
    .news-image {
        height: 200px;
    }

    /* Button full width */
    .d-flex.gap-4 {
        flex-direction: column;
        gap: 12px !important;
    }

    .d-flex.gap-4 .btn-hero-primary,
    .d-flex.gap-4 .btn-hero-secondary {
        width: 100%;
    }

    /* About section */
    .about-title {
        font-size: 1.75rem !important;
    }

    .about-subtitle {
        font-size: 1rem !important;
    }

    .about-description {
        font-size: 0.9375rem !important;
    }

    /* Career section */
    .career-item {
        padding: 20px;
    }

    .career-header {
        flex-direction: column;
        gap: 12px;
    }

    .career-type-badge {
        align-self: flex-start;
    }

    .career-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-career-apply,
    .btn-career-details {
        width: 100%;
        text-align: center;
    }

    .placement-stats {
        padding: 28px 20px;
    }

    /* Notice board */
    .notice-item {
        flex-direction: column;
        padding: 20px;
    }

    .notice-date {
        flex-direction: row;
        width: 100%;
        justify-content: flex-start;
        gap: 12px;
    }
}

/* ========================================
   12. ALIGNMENT & PADDING FIXES
   ======================================== */

/* Remove inconsistent margins */
.container-premium {
    padding-left: 20px;
    padding-right: 20px;
}

/* Consistent row margins */
.row {
    margin-left: calc(var(--bs-gutter-x) * -0.5);
    margin-right: calc(var(--bs-gutter-x) * -0.5);
}

.row>* {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
}

/* Center all "View All" buttons */
.text-center.mt-5 {
    margin-top: 48px !important;
    padding: 0;
}

/* ========================================
   13. FOOTER IMPROVEMENTS
   ======================================== */

.footer-premium {
    padding: 60px 0 30px !important;
}

.footer-content {
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    line-height: 1.4 !important;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
}

.footer-bottom {
    padding-top: 30px;
    margin-top: 40px;
}

/* ========================================
   14. VISUAL CONSISTENCY
   ======================================== */

/* Consistent border radius */
.card-premium,
.activity-card,
.news-card,
.career-item,
.notice-item,
.stat-box {
    border-radius: 16px !important;
}

/* Consistent shadows */
.card-premium,
.activity-card,
.news-card,
.career-item {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

.card-premium:hover,
.activity-card:hover,
.news-card:hover,
.career-item:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
}

/* Make card-premium smaller when animated */
.card-premium.scroll-animate.active,
.scroll-animate.active .card-premium {
    padding: var(--space-6) var(--space-5) !important;
}

.card-premium.scroll-animate.active .card-icon,
.scroll-animate.active .card-premium .card-icon {
    width: 50px !important;
    height: 50px !important;
    font-size: var(--text-2xl) !important;
    margin-bottom: var(--space-4) !important;
}

.card-premium.scroll-animate.active h4,
.scroll-animate.active .card-premium h4 {
    font-size: var(--text-lg) !important;
    margin-bottom: var(--space-2) !important;
}

.card-premium.scroll-animate.active p,
.scroll-animate.active .card-premium p {
    font-size: var(--text-sm) !important;
    line-height: 1.5 !important;
    margin-bottom: var(--space-4) !important;
}

.card-premium.scroll-animate.active .btn-card,
.scroll-animate.active .card-premium .btn-card {
    padding: var(--space-2) var(--space-4) !important;
    font-size: var(--text-sm) !important;
}

.card-premium.scroll-animate.active:hover,
.scroll-animate.active .card-premium:hover {
    transform: translateY(-8px) !important;
}

/* Consistent transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Support custom properties */

/* Remove layout shift */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Prevent overflow */
body {
    overflow-x: hidden;
}

/* Focus states */
*:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* Selection color */
::selection {
    background: var(--gold);
    color: var(--primary-dark);
}