/**
 * What: CSS Variables and Reset
 * Why: Establishes a cohesive color palette and typography baseline for the modern, premium aesthetic.
 */

:root {
    --primary-color: #F27423; /* Saffron Orange */
    --primary-hover: #F7B718; /* Golden Yellow */
    --background: #FFFFFF; /* White */
    --surface: #FFFFFF;
    --text-main: #1A1A1A; /* Charcoal Black */
    --text-muted: #6B7280;
    --border-color: #F7B718; /* Golden Yellow */
    
    --font-sans: 'Inter', sans-serif;
}

/**
 * What: Background and Panel Utilities
 * Why: Supports the unified glassmorphism aesthetic across the app.
 */
.admin-bg {
    background: var(--background);
    min-height: 100vh;
}

.hub-bg {
    background: var(--background);
    min-height: 100vh;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    border-radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
}

/**
 * What: Layout Utilities
 * Why: Provides structured containers for the application layout.
 */
#app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/**
 * What: Navigation Bar Styling
 * Why: Creates a clear, accessible top header for navigation, utilizing glassmorphism for a premium feel.
 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/**
 * What: Button Components
 * Why: Standardizes button appearance across the application for consistency.
 */
.btn-primary {
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/**
 * What: Main Content area
 * Why: Pushes content into a readable width and centers it.
 */
.main-content {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero {
    text-align: center;
    padding: 4rem 1rem;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

/**
 * What: Competition Grid Styles
 * Why: Defines the layout for the competition hub listing on the landing page.
 */
.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.comp-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.comp-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.comp-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.comp-card-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.comp-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex: 1;
}

.comp-card-dates {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
    background: rgba(26, 71, 136, 0.05);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    align-self: flex-start;
}

.slider-image.active { opacity: 1; }

.slider-prev, .slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease, color 0.3s ease;
    border-radius: 4px;
}

.slider-prev:hover, .slider-next:hover {
    background: var(--primary-color);
    color: var(--text-main);
}

.slider-prev { left: 20px; }
.slider-next { right: 20px; }

/**
 * What: Floating Icon
 * Why: Quick access to Shraddha App from anywhere on the frontend.
 */
.floating-icon {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--primary-color);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 1000;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.1;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.floating-icon:hover {
    transform: scale(1.1);
    background-color: var(--primary-hover);
    color: var(--text-main);
}

/**
 * What: Responsive Adjustments
 * Why: Ensures the frontend adapts cleanly to tablet and mobile screens without breaking UI.
 */
@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem 1rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

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

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

    .navbar {
        flex-direction: column;
        justify-content: center;
        padding: 1rem;
    }

    .navbar .logo {
        margin-bottom: 0.75rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }

    .competitions-grid {
        grid-template-columns: 1fr;
    }

    .slider-prev, .slider-next {
        padding: 0.5rem 1rem;
        font-size: 1.25rem;
    }

    .slider-prev { left: 10px; }
    .slider-next { right: 10px; }

    .floating-icon {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {

    .hero h1 {
        font-size: 1.5rem;
    }
    
    .slider-prev, .slider-next {
        padding: 0.3rem 0.6rem;
        font-size: 1rem;
    }
}
