/* style.css */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    
    /* Background Properties */
    background-color: #f0f0f0; /* Fallback color */
    background-image: url('../images/background2.jpg');  
    background-size: cover;
    background-position: center; /* Centers the image */
    background-repeat: no-repeat; /* Prevents tiling */
    background-attachment: fixed;
}

p {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
    line-height: 1.6;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

/* Voting Page Specific Styles */
.container {
    max-width: 900px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.theme-section {
    margin-bottom: 40px;
}

.theme-title {
    background: #3e015a;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
}

.voting-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.voting-table td {
    width: 25%;
    text-align: center;
    padding: 20px;
    border: 1px solid #ddd;
}

.voting-table img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 4px;
}

.vote-controls {
    margin-top: 15px;
}

.tally {
    font-weight: bold;
    color: #22e663;
}

/* Voting Form Section */
.vote-form-section {
    margin-top: 40px;
    padding: 25px;
    background-color: #f4f4f4;
    border-radius: 10px;
    text-align: center;
}

.vote-form-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.form-group input {
    width: 300px;
    max-width: 90%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.submit-btn {
    background-color: #222;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #444;
}

#confirmationMessage {
    margin-top: 20px;
    font-weight: bold;
    color: green;
}

/* Current Winners Page Specific Styles */

.theme-container {
  border: 2px solid #000;
  padding: 1px;
  border-radius: 8px;
}

.theme-title {
  text-align: center;
  margin-bottom: 20px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.photo-slot {
  text-align: center;
}

.slot-title {
  font-weight: bold;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

/* Larger images with hover rollover effect */
.photo-slot img {
  width: 70%;                 
  max-width: 400px;           /* Prevents oversized images */
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;

  /* Smooth hover animation */
  transition: transform 0.3s ease,
              box-shadow 0.3s ease,
              opacity 0.3s ease;

  cursor: pointer;
}

/* Mouse rollover action */
.photo-slot img:hover {
  transform: scale(1.50);     /* Enlarges image on hover */
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  opacity: 0.92;
}

main {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  min-height: 100vh;
}

/* Add What's New Section */
.whats-new {
    position: absolute;
    top: 820px;
    right: 250px;

    width: 350px;
    max-height: calc(100vh - 140px);

    background-color: #f7f4fa;
    border-left: 3px solid #a200ff;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    font-family: sans-serif;
    z-index: 500;

    overflow-y: auto;
}

.parent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-right: 380px; /* prevents content from hiding behind sidebar */
}

.whats-new h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2rem;
}

.update-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.update-list li {
    margin-bottom: 15px;
    border-bottom: 5px solid #42404010;
    padding-bottom: 5px;
}

.date {
    font-size: 0.8rem;
    color: #7700ff;
    font-weight: bold;
}

.update-list p {
    margin: 5px 0 0;
    font-size: 0.9rem;
    color: #0c0c0c;
}

.view-all {
    display: block;
    text-decoration: none;
    color: #8400ff;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 10px;
}

.view-all:hover {
    text-decoration: underline;
    color: #1b1b1b;
}

@media (max-width: 900px) {
    .whats-new {
        position: static;
        width: 100%;
        box-shadow: none;
        border-left: none;
    }

    .parent-container {
        padding-right: 0;
    }
}

/* Header & Navigation */
header {
    background: #1a1a1a;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

h1 {
    text-align: center;
  }

.primary-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    background: #333;
}

.primary-nav li a {
    color: white;
    padding: 15px 25px;
    display: block;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.primary-nav li a:hover {
    background: #555;
    color: #cd92f0;
}

/* Content Elements */
h1 {
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.grid-item {
  background: #eee;
  height: 200px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  transition: transform 0.2s;
}

.grid-item:hover {
  transform: scale(1.02);
}

/* Container forced to stay horizontal */
.themes-grid {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 30px;
}

/* Card Styling */
.theme-card {
  flex: 1;
  min-width: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.3s ease;
  
/* Shrinks all text inside the card */
  font-size: 0.95rem; 
}

/* Image Section */
.theme-image {
  /* Increases height */
  height: 200px; 
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Hover effect */
.theme-card:hover {
  transform: translateY(-10px);
}

/* Forms & Buttons */
.form-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 15px;
    max-width: 500px;
}

button {
    padding: 10px 20px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

button:hover {
    background: #555;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #ccc;
    text-align: center;
    padding: 10px 5px;
    margin-top: 10px;
}

.secondary-footer {
    background-color: #f8f9fa;
    padding: 50px 30px;
    border-top: solid #e7e7e7;
    color: #333;
}

.footer-nav a {
    color: #888;
    text-decoration: none;
    margin: 10px 5px;
    font-size: 0.8rem;
}

.footer-nav a:hover {
    color: #fff;
}