/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --main-dark: #0e0f10;
    --secondary-dark: #1a1c1e;
    --accent: #ff3838;
    --text-light: #f8f9fa;
    --text-secondary: #adb5bd;
    --event-date-bg: #ff3838;
}

html, body {
    height: 100%;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background-color: black;
    color: white;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes full viewport height */
    line-height: 1.6;
}

/* Header Styling */
.site-header {
    background: linear-gradient(to bottom, var(--main-dark), var(--secondary-dark));
    padding: 2rem 0;
    text-align: center;
    border-bottom: 4px solid var(--accent);
}

.site-logo {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.site-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px 30px;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-left img {
    height: 75px;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav-left img:not([src]),
.nav-left img[src=""],
.nav-left img[src="/images/images.png"] {
    content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="45" height="45" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect width="18" height="18" x="3" y="3" rx="2"/><circle cx="9" cy="9" r="2"/><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"/></svg>');
    filter: invert(0.5);
}

.nav-title {
    font-weight: 600;
    font-size: 1.4em;
    color: #333;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    line-height: 1;
}

.nav-center {
    display: flex;
    gap: 30px;
}

.nav-right {
    display: flex;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 8px 12px;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

nav a:hover {
    color: #000;
    transform: translateY(-2px);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #333;
    transition: all 0.3s ease;
}

nav a:hover::after {
    width: 80%;
    left: 10%;
}

.nav-right a {
    background-color: #f5f5f5;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-right a:hover {
    background-color: #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Navigation buttons */
.nav-btn {
    padding: 8px 15px;
    margin-left: 10px;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    min-width: 100px;
}

.login-btn {
    background-color: transparent;
    border: 1px solid #333;
}

.login-btn:hover {
    background-color: rgba(51, 51, 51, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.signup-btn {
    background-color: transparent;
    border: 1px solid #333;
}

.signup-btn:hover {
    background-color: rgba(51, 51, 51, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Header styles */
header {
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    max-width: 100%;
    width: 100%;
    padding: 40px 20px;
    margin: 0 auto;
    gap: 5%;
    box-sizing: border-box;
}

header > img {
    border-radius: 15px;
    width: 20%;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
}

header > img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.header-text {
    color: black;
    text-align: center;
    flex: 0 1 auto;
    padding: 0 15px;
    max-width: 600px;
    margin: 0;
    transition: transform 0.3s ease;
}

.header-logo {
    width: 200px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.header-text:hover .header-logo {
    transform: none;
}

header h1 {
    font-size: 5rem;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    cursor: default;
}

header h4 {
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
    margin: 0 auto;
    padding: 0 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    cursor: default;
}

main {
    min-height: auto; /* Changed from 70% to auto */
    max-width: 1300px;
    margin: 80px auto;
    padding: 0 20px;
    flex: 1; /* This will push the footer to the bottom */
}

main > h1 {
    grid-area: title;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 600;
}

.event-card {
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.event-card:nth-child(2) { grid-area: card1; }
.event-card:nth-child(3) { grid-area: card2; }
.event-card:nth-child(4) { grid-area: card3; }
.event-card:nth-child(5) { grid-area: card4; }
.event-card:nth-child(6) { grid-area: card5; }
.event-card:nth-child(7) { grid-area: card6; }

.event-card img {
    width: 40%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.event-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    transition: transform 0.2s ease;
}

.event-card:hover .event-info {
    transform: translateX(15px);
}

main h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.event-card:hover h2 {
    color: #f0f0f0;
}

main h2:first-of-type {
    font-weight: 600;
    font-size: 1.6rem;
    margin-bottom: 15px;
    position: relative;
    transition: color 0.3s ease;
}

main h2:first-of-type::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.event-card:hover h2:first-of-type::after {
    width: 27%;
}

/* Footer styles */
footer {
    background-color: white;
    color: black;
    padding: 60px 0 30px;
    width: 100%;
    margin-top: auto; /* Push footer to bottom */
    position: relative; /* Ensure footer stays above content */
    z-index: 5; /* Add z-index to keep footer above other elements */
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.newsletter {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

.newsletter h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.newsletter p {
    font-size: 1rem;
    margin-bottom: 25px;
    opacity: 0.8;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #eaeaea;
    border-radius: 6px 0 0 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #333;
}

.newsletter-form button {
    background-color: black;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 0 6px 6px 0;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #333;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 20px 0;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo-img {
    height: 40px;
    width: auto;
}

.footer-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.footer-links a {
    color: black;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #555;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: black;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background-color: #e0e0e0;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    header {
        flex-direction: column;
        padding: 20px;
    }

    header > img {
        width: 40%;
        margin: 10px 0;
    }

    main {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "card1"
            "card2"
            "card3"
            "card4"
            "card5"
            "card6";
    }

    .footer-info {
        flex-direction: column;
        gap: 20px;
    }
}

/* Improved responsive typography system */
html {
    font-size: 16px;
}

body {
    margin: 0;
    padding: 0;
    background-color: black;
    color: white;
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

/* Mobile typography improvements */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    .newsletter {
        padding: 0 15px;
    }

    .newsletter h3 {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    p, li, a {
        font-size: 0.95rem;
    }

    /* Improve touch targets */
    button,
    .btn,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px;
        padding: 10px 15px;
    }

    /* Add space between stacked elements */
    .row > [class*="col-"],
    [class*="d-flex"] > * {
        margin-bottom: 15px;
    }

    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        border-radius: 6px;
        margin-bottom: 10px;
        box-sizing: border-box;
    }

    .newsletter-form input {
        padding: 14px 15px;
    }

    .newsletter-form button {
        padding: 14px 15px;
        margin-top: 5px;
    }

    .newsletter h3 {
        font-size: 1.4rem;
    }

    .newsletter p {
        font-size: 0.95rem;
        padding: 0 10px;
    }

    .footer-info {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .footer-links a {
        display: block;
        padding: 8px 0;
    }

    .footer-links a:last-child {
        border-bottom: none;
    }
}

/* Add specific media query targeting screens between 375px and 490px */
@media (min-width: 376px) and (max-width: 490px) {
    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .footer-links a {
        display: block;
        padding: 8px 0;
        width: 100%;
        text-align: center;
    }

    .footer-links a:last-child {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .footer-links a {
        display: block;
        padding: 8px 0;
        width: 100%;
        text-align: center;
    }

    .footer-links a:last-child {
        border-bottom: none;
    }
}

@media (max-width: 375px) {
    html {
        font-size: 13px;
    }

    /* Make cards more compact */
    .card, [class*="card"] {
        padding: 12px !important;
    }

    .newsletter {
        margin-bottom: 30px;
    }

    .newsletter h3 {
        font-size: 1.3rem;
    }

    .newsletter p {
        margin-bottom: 15px;
    }

    .newsletter-form input,
    .newsletter-form button {
        padding: 12px;
    }

    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .footer-links a {
        font-size: 0.9rem;
        padding: 6px 0;
        white-space: normal;
        word-break: break-word;
    }

    .footer-logo {
        flex-direction: column;
        gap: 10px;
    }

    .footer-logo span {
        font-size: 0.9rem;
    }
}

/* Extra small screens */
@media (max-width: 320px) {
    .footer-links a {
        font-size: 0.85rem;
        padding: 5px 0;
        display: block;
        width: 100%;
        text-align: center;
    }

    .footer-links a {
        font-size: 0.85rem;
        padding: 5px 0;
    }

    .newsletter h3 {
        font-size: 1.2rem;
    }

    .newsletter p {
        font-size: 0.85rem;
    }

    .copyright p {
        font-size: 0.8rem !important;
    }
}

/* Improved spacing for content at all screen sizes */
.content-section {
    margin-bottom: 2rem;
}

/* Better form controls for mobile */
input, select, textarea {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    padding: 10px 12px !important;
}

/* Notifications & alerts */
.alert {
    background-color: rgba(255,255,255,0.1);
    border-left: 4px solid #007bff;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    border-color: #28a745;
}

.alert-danger {
    border-color: #dc3545;
}

.alert-warning {
    border-color: #ffc107;
}

.alert-info {
    border-color: #17a2b8;
}

/* Django specific styles for forms */
form .form-control {
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 10px;
    border-radius: 4px;
}

form .form-label {
    margin-bottom: 5px;
    display: block;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}
