/* 
 * Cyber UXcellence Awards - Global Stylesheet
 * Contains design system, typography, layout, shared components, and utilities
 */

/* --------------------------------------------------
 * CSS VARIABLES - DESIGN SYSTEM
 * -------------------------------------------------- */
 :root {
  /* Brand Colors */
  --mg-nearly-black: #231F20;
  --mg-dark-purple: #2C215A;
  --mg-orange: #F47114;
  --mg-red: #D12C31;
  --mg-light-purple: #AF92F8;
  --white: #FFFFFF;
  
  /* Gradients - Reference Only (use actual gradients in section CSS) */
  --orange-red-gradient: linear-gradient(to right, #F47114, #D12C31);
  --purple-white-gradient: linear-gradient(to right, #AF92F8, #FFFFFF);
  
  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-secondary: 'Roboto Mono', monospace;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 80px;
  --section-pad: clamp(3rem, 6vw, 5rem);
  
  /* Borders */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-pill: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.14);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Containers */
  --container-max-width: 1200px;
  --container-padding: 24px;
  
  /* Navigation height for proper spacing */
  --nav-height: 88px;
}

/* --------------------------------------------------
 * RESET & BASE STYLES
 * -------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--mg-nearly-black);
  line-height: 1.5;
  background-color: var(--white);
  overflow-x: hidden;
  margin: 0;
  padding-top: var(--nav-height); /* Account for fixed navbar */
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--mg-orange);
}

ul, ol {
  list-style-position: inside;
}

button, .button {
  cursor: pointer;
  font-family: var(--font-primary);
}

/* --------------------------------------------------
 * TYPOGRAPHY
 * -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
}

h1 {
  font-size: 4rem;
  line-height: 1.1;
}

h2 {
  font-size: 3rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5, h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

.subheading {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 2rem;
}

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

/* --------------------------------------------------
 * LAYOUT FRAMEWORK
 * -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Universal Section Rhythm */
section {
  margin: 0;
  padding: var(--section-pad) 0;
}

/* Collapse top padding where two sections meet */
section + section {
  padding-top: 0;
}

/* Remove spacing between sections when needed */
.no-spacing-after {
  padding-bottom: 0;
  margin-bottom: 0;
}

.no-spacing-before {
  padding-top: 0;
  margin-top: 0;
}

/* Last section needs bottom padding */
section:last-of-type {
  padding-bottom: var(--section-pad);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  padding: 0 15px;
  flex: 1;
}

/* --------------------------------------------------
 * SECTION HEADERS - GLOBAL STYLES
 * -------------------------------------------------- */
.section-header {
  text-align: left;
  margin-bottom: var(--spacing-xl);
  position: relative;
  padding: 0 var(--container-padding);
}

.section-header h2 {
  color: inherit; /* Will inherit from section */
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  position: relative;
}

.section-header .section-subheading {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 0;
  max-width: 700px;
}

/* --------------------------------------------------
 * BUTTONS
 * -------------------------------------------------- */
.cta-button {
  display: inline-block;
  background: var(--mg-red);
  color: var(--white);
  font-weight: 600;
  font-size: 1.125rem;
  padding: 16px 32px;
  border-radius: 50px;
  border: none;
  text-align: center;
  cursor: pointer;
  transition: background var(--transition-fast), 
              box-shadow var(--transition-fast);
  white-space: nowrap;
}

.cta-button:hover {
  color: var(--white);
  background: #b7131d; /* Slightly darker red */
  box-shadow: 0 4px 12px rgba(209, 44, 49, 0.5);
}


/* --------------------------------------------------
 * NAVIGATION
 * -------------------------------------------------- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--mg-nearly-black);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.07) 1px,
    transparent 1px
  );
  background-size: 16px 16px;
  background-position: center center;
  background-repeat: repeat;
}

.main-nav .container {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo a {
  display: flex;
  align-items: center;
  height: 100%;
}

.logo-wrapper {
  display: flex;
  position: relative;
  top: 6px;
  bottom: 6px;
  flex-direction: column;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-cyber {
  font-size: 1.10rem;
  font-weight: 200;
  color: var(--white);
  margin-top: 8px;
}

.logo-uxcellence {
  font-size: 1.10rem;
  font-weight: 50;
  color: var(--white);
}

.logo-uxcellence::before {
  content: "UX";
  position: absolute;
  font-weight: 950;
  color: var(--white);
}

.logo-awards {
  font-size: 1.10rem;
  font-weight: 950;
  color: var(--white);
}

.powered-by {
  padding-bottom: 10px;
  font-size: 0.60rem;
  color: var(--white);
  opacity: 0.7;
  margin-top: 4px;
  margin-bottom: 4px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
  height: 100%;
  margin-left: 32px;
}

.nav-links a {
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--white);
  font-weight: 900;
  font-size: 1.10rem;
  transition: color var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 8px;
}

/* Remove uppercase transform from CTA button */
.nav-links a.cta-button {
  text-transform: none;
}

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

/* Navigation CTA Button */
.nav-links a.cta-button {
  background: var(--mg-red);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 50px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  height: 40px;
  line-height: 1;
  transition: background var(--transition-fast), 
              box-shadow var(--transition-fast);
  white-space: nowrap;
}

.nav-links a.cta-button:hover,
.nav-links a.cta-button:focus {
  background: #b7131d;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(209, 44, 49, 0.5);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--white);
  border-radius: 3px;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--mg-nearly-black);
  z-index: 2000;
  padding: 60px 0;
}

.mobile-menu.active {
  display: block;
}

.close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 40px;
  color: var(--white);
  cursor: pointer;
}

.mobile-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.mobile-links a {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
}


/* --------------------------------------------------
 * FOOTER
 * -------------------------------------------------- */
footer {
  background-color: var(--mg-nearly-black);
  color: var(--white);
  padding: var(--spacing-lg) 0 var(--spacing-md);
  margin-top: 0;
  position: relative;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.07) 1px,
    transparent 1px
  );
  background-size: 16px 16px;
  background-position: center center;
  background-repeat: repeat;
  border-top: 3px solid var(--mg-orange);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding-top: 1.2rem;
  padding-bottom: 0.8rem;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.footer-logo {
  max-width: 200px;
  margin-bottom: 0.5rem;
}

.copyright {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: 30px;
  margin-bottom: 20px;
}

.tagline {
  font-style: italic;
  font-size: 0.95rem;
  color: #e0e0e0;
  margin: 0;
}

.social-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6rem;
}

.footer-top-links {
  display: flex;
  gap: 24px;
  margin-bottom: 40px;
}

.footer-top-links a {
  color: var(--white);
  font-size: 0.875rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.footer-top-links a:hover {
  opacity: 1;
}

.footer-contact {
  margin-top: 8px;
  text-align: right;
}

.footer-contact h3 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.footer-contact ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: right;
}

.footer-contact li {
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: #e0e0e0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.footer-contact a {
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-contact a:hover {
  opacity: 0.8;
}

/* Footer actions container */
.footer-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Social link styling */
.social-link {
  display: flex;
  align-items: center;
  background-color: transparent;
  border: 2px solid var(--white);
  padding: 8px 16px;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  width: fit-content;
  text-align: center;
}

.social-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  opacity: 1;
}

.linkedin-icon {
  margin-right: 10px;
  width: 24px;
  height: 24px;
}

/* Visit Mindgrub button styling */
.visit-mindgrub {
  background-color: var(--mg-dark-purple);
  color: var(--white);
  display: inline-block;
  width: 200px;
  font-size: 1.125rem;
  padding: 14px 20px;
  border-radius: var(--border-radius-pill);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  margin-top: 20px;
}

.visit-mindgrub:hover {
  background-color: #251c4a; /* Slightly darker purple on hover */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  color: var(--white);
  opacity: 1;
}

/* Copyright container styles */
.copyright-container {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem 0;
  text-align: center;
  background-color: var(--mg-nearly-black);
  width: 100%;
  margin-top: 15px;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.07) 1px,
    transparent 1px
  );
  background-size: 16px 16px;
  background-position: center center;
  background-repeat: repeat;
}

.copyright-container .copyright {
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0;
}

.copyright-container a {
  color: var(--white);
  margin-left: 15px;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.copyright-container a:hover {
  opacity: 1;
  color: var(--white);
}

/* --------------------------------------------------
 * COOKIE CONSENT
 * -------------------------------------------------- */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--mg-nearly-black);
  color: var(--white);
  padding: 16px;
  z-index: 9999;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
}

.cookie-consent.active {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.cookie-content p {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.cookie-buttons {
  display: flex;
  gap: 12px;
}

.cookie-accept {
  background-color: var(--mg-red);
  color: var(--white);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.cookie-decline {
  background-color: transparent;
  color: var(--white);
  border: 1px solid var(--white);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

/* --------------------------------------------------
 * MODAL STYLES
 * -------------------------------------------------- */
.nomination-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.25s, opacity 0.25s 0s;
}

.nomination-modal.active {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s linear 0s, opacity 0.25s 0s;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.modal-container {
  position: relative;
  background-color: var(--white);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 1;
  transform: translateY(20px);
  transition: transform 0.3s ease-out;
}

.nomination-modal.active .modal-container {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--mg-dark-purple);
  color: var(--white);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.75rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.75rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

.modal-intro {
  margin-bottom: var(--spacing-lg);
}


/* --------------------------------------------------
 * THEME COLORS - SECTION HEADING COLORS
 * These styles apply color themes to headings based on section
 * -------------------------------------------------- */
/* Light backgrounds get dark purple text */
.about-section h1, .about-section h2, .about-section h3, .about-section .section-title, .about-section .subheading,
.why-section h1, .why-section h2, .why-section h3, .why-section .section-title, .why-section .subheading,
.judges-section h1, .judges-section h2, .judges-section h3, .judges-section .section-title, .judges-section .subheading,
.faq-section h1, .faq-section h2, .faq-section h3, .faq-section .section-title, .faq-section .subheading {
  color: var(--mg-dark-purple);
}

/* Dark backgrounds get white text */
.timeline-section h1, .timeline-section h2, .timeline-section h3, .timeline-section .section-title, .timeline-section .subheading,
.sponsorship-section h1, .sponsorship-section h2, .sponsorship-section h3, .sponsorship-section .section-title, .sponsorship-section .subheading {
  color: var(--white);
}

/* Categories section gets light purple text */
.categories-section-desktop h1, .categories-section-desktop h2, .categories-section-desktop h3, .categories-section-desktop .section-title, .categories-section-desktop .subheading,
.categories-section-mobile h1, .categories-section-mobile h2, .categories-section-mobile h3, .categories-section-mobile .section-title, .categories-section-mobile .subheading {
  color: var(--mg-light-purple);
}

/* --------------------------------------------------
 * VISUAL PATTERNS & BACKGROUNDS
 * Reusable pattern styles for backgrounds
 * -------------------------------------------------- */
.diagonal-pattern {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.05) 2px,
    transparent 2px,
    transparent 8px
  );
}

.dot-grid-pattern {
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.1) 1px,
    transparent 1px
  );
  background-size: 48px 48px;
}

/* --------------------------------------------------
 * UTILITY CLASSES
 * Reusable utility classes for spacing, colors, etc.
 * -------------------------------------------------- */
/* Margin utilities */
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding utilities */
.py-1 { padding-top: var(--spacing-xs); padding-bottom: var(--spacing-xs); }
.py-2 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-3 { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-4 { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.py-5 { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }

/* Background color utilities */
.bg-dark-purple { background-color: var(--mg-dark-purple); }
.bg-light-purple { background-color: var(--mg-light-purple); }
.bg-nearly-black { background-color: var(--mg-nearly-black); }

/* Text color utilities */
.text-white { color: var(--white); }

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Main content area */
main {
  margin-top: 0;
  margin-bottom: 0;
}

/* --------------------------------------------------
 * RESPONSIVE STYLES
 * Global responsive styles
 * -------------------------------------------------- */
@media (max-width: 1200px) {
  /* Large screen adjustments */
  .nav-links {
    gap: 28px;
  }
}

@media (max-width: 991px) {
  /* Medium screen adjustments */
  .section-header h2 {
    font-size: 2.5rem;
  }
  
  .nav-links {
    gap: 16px;
  }
  
  .nav-links a {
    font-size: 0.85rem;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  /* Tablet-specific adjustments */
  .nav-links a.cta-button {
    padding: 8px 16px;
    font-size: 0.85rem;
    margin-left: 5px;
    min-width: 115px;
    height: auto;
  }
}

@media (max-width: 768px) {
  /* Mobile adjustments */
  .row {
    flex-direction: column;
  }
  
  .col {
    width: 100%;
    margin-bottom: var(--spacing-md);
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2.5rem;
  }
  
  section {
    padding: var(--spacing-xl) 0 0 0;
  }
  
  section:last-of-type {
    padding-bottom: var(--spacing-xl);
  }
  
  .main-nav .container {
    justify-content: space-between;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .main-nav,
  .logo,
  .logo a {
    height: var(--nav-height);
  }
  
  /* Footer mobile adjustments */
  footer .container {
    flex-direction: column;
    gap: 40px;
    text-align: center;
    align-items: center;
  }
  
  .footer-left {
    align-items: center;
    max-width: 100%;
  }
  
  .footer-right {
    text-align: center;
    align-items: center;
  }
  
  .footer-top-links {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-contact {
    text-align: center;
    margin-top: 16px;
  }
  
  .footer-contact h3 {
    text-align: center;
  }
  
  .footer-contact ul {
    text-align: center;
  }
  
  .footer-contact li {
    justify-content: center;
  }
  
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
  
}