/**
 * RPI Alumni Website - Brand Styling
 * Colors: Primary Red #D6001C, Dark Red #A40014, Black #000000, Dark Gray #444444, Background Gray #F4F4F4, White #FFFFFF
 */

/* Import Montserrat for headings */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&display=swap');

/* Global Variables */
:root {
    --rpi-red: #D6001C;
    --rpi-dark-red: #A40014;
    --rpi-black: #000000;
    --rpi-dark-gray: #444444;
    --rpi-bg-gray: #F4F4F4;
    --rpi-white: #FFFFFF;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    color: var(--rpi-dark-gray);
    background-color: var(--rpi-bg-gray);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--rpi-black);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* Header & Navigation */
.navbar {
    background-color: var(--rpi-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
    align-items: center;
}

.navbar .container {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--rpi-red) !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    height: auto;
}

.rpi-logo {
    height: 70px !important;
    width: 70px !important;
    max-height: 100px !important;
    max-width: 100px !important;
    object-fit: contain;
    transition: transform 0.3s;
    flex-shrink: 0;
    align-self: center;
}

.rpi-logo:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .rpi-logo {
        height: 50px !important;
        width: 50px !important;
        max-height: 50px !important;
        max-width: 50px !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

.navbar-nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    color: var(--rpi-dark-gray) !important;
    font-weight: 500;
    margin: 0 0.3rem;
    padding: 0.5rem 0.75rem !important;
    transition: color 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    line-height: 1.2;
    height: auto;
}

.navbar-nav .dropdown-toggle {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link:hover {
    color: var(--rpi-red) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--rpi-dark-red) 0%, var(--rpi-red) 100%);
    color: var(--rpi-white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
    will-change: opacity;
}

.hero-slide.active {
    opacity: 1;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    color: var(--rpi-white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

/* Buttons */
.btn-rpi {
    background-color: var(--rpi-red);
    color: var(--rpi-white);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-rpi:hover {
    background-color: var(--rpi-dark-red);
    color: var(--rpi-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(214, 0, 28, 0.3);
}

.btn-rpi-outline {
    background-color: transparent;
    color: var(--rpi-red);
    border: 2px solid var(--rpi-red);
    padding: 10px 28px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-rpi-outline:hover {
    background-color: var(--rpi-red);
    color: var(--rpi-white);
}

/* Title Bars */
.title-bar {
    background-color: var(--rpi-red);
    color: var(--rpi-white);
    padding: 20px 0;
    margin-bottom: 30px;
}

.title-bar h2 {
    color: var(--rpi-white);
    margin: 0;
    font-size: 2rem;
}

/* Cards */
.card {
    background-color: var(--rpi-white);
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 2rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.card-header {
    background-color: var(--rpi-red);
    color: var(--rpi-white);
    padding: 15px 20px;
    font-weight: 600;
    border: none;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--rpi-black);
    margin-bottom: 1rem;
}

/* Feature Boxes */
.feature-box {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--rpi-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-box h3 {
    color: var(--rpi-red);
    margin-bottom: 1rem;
}

/* Forms */
.form-control {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 1rem;
}

.form-control:focus {
    border-color: var(--rpi-red);
    box-shadow: 0 0 0 0.2rem rgba(214, 0, 28, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--rpi-dark-gray);
    margin-bottom: 0.5rem;
}

/* Search & Filters */
.search-section {
    background-color: var(--rpi-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.filter-group {
    margin-bottom: 1rem;
}

/* Alumni Directory */
.alumni-card {
    text-align: center;
    padding: 20px;
}

.alumni-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--rpi-red);
}

.alumni-card h4 {
    color: var(--rpi-red);
    margin-bottom: 0.5rem;
}

.alumni-card .badge {
    background-color: var(--rpi-red);
    color: var(--rpi-white);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 0.25rem;
}

/* Events */
.event-card {
    position: relative;
    overflow: hidden;
}

.event-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.event-card:hover img {
    transform: scale(1.05);
}

.event-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--rpi-red);
    color: var(--rpi-white);
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 600;
}

/* Clubs */
.club-card {
    text-align: center;
    padding: 30px 20px;
}

.club-card .club-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.club-card h3 {
    color: var(--rpi-red);
}

/* Footer */
.footer {
    background-color: var(--rpi-black);
    color: var(--rpi-white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer h5 {
    color: var(--rpi-white);
    margin-bottom: 1rem;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: var(--rpi-red);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: #999;
}

/* Alerts */
.alert {
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Pagination */
.pagination .page-link {
    color: var(--rpi-red);
}

.pagination .page-item.active .page-link {
    background-color: var(--rpi-red);
    border-color: var(--rpi-red);
}

/* Admin Panel */
.admin-sidebar {
    background-color: var(--rpi-dark-gray);
    min-height: 100vh;
    padding: 20px 0;
}

.admin-sidebar .nav-link {
    color: var(--rpi-white);
    padding: 12px 20px;
    transition: background-color 0.3s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: var(--rpi-red);
    color: var(--rpi-white);
}

.admin-content {
    padding: 30px;
}

/* Utilities */
.text-rpi-red {
    color: var(--rpi-red) !important;
}

.bg-rpi-red {
    background-color: var(--rpi-red) !important;
}

.bg-rpi-gray {
    background-color: var(--rpi-bg-gray) !important;
}

/* Disclaimer Section */
.disclaimer-section {
    background-color: #fff3cd;
    border-top: 2px solid #ffc107;
    border-bottom: 2px solid #ffc107;
    padding: 15px 0;
}

.disclaimer-section i {
    color: #856404;
}

.disclaimer-section strong {
    color: #856404;
}

.disclaimer-section p {
    color: #856404;
    margin-bottom: 0;
}

/* Accordion Styling */
.accordion-button {
    background-color: var(--rpi-bg-gray);
    color: var(--rpi-dark-gray);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: var(--rpi-red);
    color: var(--rpi-white);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(214, 0, 28, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-section {
        min-height: 400px;
        padding: 60px 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .disclaimer-section {
        padding: 12px 0;
    }
    
    .disclaimer-section p {
        font-size: 0.85rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.5rem !important;
        font-size: 0.9rem;
    }
}

/* Spacing */
.section-padding {
    padding: 60px 0;
}

.mb-section {
    margin-bottom: 60px;
}

/* Loading Spinner */
.spinner-border-rpi {
    color: var(--rpi-red);
}

