/*
Theme Name:  HRI 2027 (Preview 2)
Theme URI:   https://humanrobotinteraction.org/2027/
Author:      HRI 2027 Organizing Committee
Description: Official theme for the 22nd ACM/IEEE International Conference on Human-Robot Interaction. Navy/teal Silicon Valley design with particle canvas hero, circuit animation, and photo carousel.
Version:     2.8.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hri-2027-v2
Tags:        conference, one-page, custom-colors, responsive-layout
*/

/* ===== HRI 2027 Mockup v2 — Professional / Silicon Valley ===== */

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

:root {
  --navy: #0a1628;
  --navy-light: #111d33;
  --teal: #3ecfb4;
  --blue: #2d8cf0;
  --dark: #1a1a1a;
  --gray: #6b7280;
  --gray-light: #9ca3af;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;

  --content-width: 1000px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--dark);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== Navigation ===== */
.navbar {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  flex-shrink: 0;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dark);
  transition: opacity 0.2s;
}

.nav-links a:hover { opacity: 0.6; }

.nav-dropdown { position: relative; }
.dropdown-arrow {
  display: inline-block;
  vertical-align: middle;
  margin-left: 2px;
  transition: transform 0.2s;
}
.nav-dropdown:hover .dropdown-arrow { transform: rotate(180deg); }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  min-width: 200px;
  padding: 0.4rem 0;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-radius: 6px;
}

.nav-dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu li a {
  display: block;
  padding: 0.45rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.dropdown-menu li a:hover { background: var(--bg-alt); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--dark);
}

/* ===== Hero Banner ===== */
.hero-banner {
  position: relative;
  background: var(--navy);
  background-image:
    radial-gradient(ellipse 90% 70% at 15% 90%, rgba(62, 207, 180, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 70% 60% at 85% 15%, rgba(45, 140, 240, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(62, 207, 180, 0.03) 0%, transparent 60%);
  padding: 4.5rem 1.5rem 3.5rem;
  overflow: hidden;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-banner-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.hero-banner-content::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 130%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.3) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  filter: blur(40px);
}

.hero-hri-logo {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;
  margin: 0 auto 1.25rem;
}

/* Primary location heading */
.hero-location-heading {
  font-family: var(--font-body);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
  line-height: 1.1;
}

.hero-logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0 2.75rem;
  position: relative;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  width: 100%;
}

.hero-meta-item {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
}

.hero-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
}

/* Theme label — lowest emphasis in hero */
.hero-theme-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  opacity: 0.8;
  margin-top: 0.25rem;
}

/* ===== Countdown Section ===== */
.hero-countdown-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-top: 3rem;
}

.countdown-grid {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 0.4rem 0.4rem 0.3rem;
}

.countdown-num {
  font-family: var(--font-body);
  font-size: 1.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  line-height: 1;
  letter-spacing: -0.02em;
}

.countdown-text {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}

.countdown-sep {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 300;
  color: rgba(255,255,255,0.15);
  padding-bottom: 0.75rem;
}

/* ===== Circuit Wrapper ===== */
.circuit-wrapper {
  position: relative;
  overflow: hidden;
}

.circuit-wrapper > .theme-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Section Headings ===== */
.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  margin-bottom: 0.4rem;
}

.section-heading {
  font-family: var(--font-body);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

.section-intro {
  font-size: var(--text-base);
  color: var(--gray);
  line-height: 1.7;
  max-width: 720px;
  margin-bottom: 2rem;
}

/* ===== Theme Section ===== */
.theme-section {
  padding: 3.5rem 1.5rem;
  position: relative;
  z-index: 1;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.theme-container {
  max-width: var(--content-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.theme-card {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.2s;
}

.theme-card:hover {
  border-color: var(--teal);
}

.dates-card {
  grid-column: 1 / -1;
}

/* ===== Dates Block ===== */
.dates-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.dates-block-title {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.dates-block .dates-list {
  columns: 2;
  column-gap: 3rem;
}

.theme-icon {
  margin-bottom: 0.75rem;
}

.theme-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.theme-card p {
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.7;
}

.dates-group-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dark);
  margin-top: 0.6rem;
  margin-bottom: 0.1rem;
  break-after: avoid;
}

.dates-group-label:first-child {
  margin-top: 0;
}

.date-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  break-inside: avoid;
}

.date-row:last-child {
  border-bottom: none;
}

.date-label {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--gray);
}

.date-value {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--dark);
  white-space: nowrap;
}

.date-row-conf .date-label,
.date-row-conf .date-value {
  color: var(--teal);
  font-weight: 700;
}

.theme-card p + p {
  margin-top: 0.75rem;
}

/* ===== Visiting Silicon Valley ===== */
.visit-section {
  padding: 3.5rem 1.5rem 2.5rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}

.visit-container {
  max-width: var(--content-width);
  margin: 0 auto;
}

.visit-banner {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.visit-carousel {
  position: absolute;
  inset: 0;
}

.visit-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.visit-slide.active {
  opacity: 1;
}

.visit-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.visit-slide-caption {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: rgba(10, 22, 40, 0.5);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  letter-spacing: 0.04em;
}

.visit-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10, 22, 40, 0.7) 0%, rgba(10, 22, 40, 0.2) 60%, transparent 100%);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  z-index: 2;
  pointer-events: none;
}

.visit-banner-overlay h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
}

.visit-carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  z-index: 3;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.carousel-dot.active {
  background: var(--teal);
  transform: scale(1.3);
}

.visit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.visit-card {
  padding: 0;
}

.visit-num {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--teal);
  display: block;
  margin-bottom: 0.4rem;
}

.visit-card h3 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}

.visit-card p {
  font-size: var(--text-sm);
  color: var(--gray);
  line-height: 1.7;
}

/* ===== Sponsors (scrolling) ===== */
.sponsors-section {
  padding: 3rem 0 3.5rem;
  overflow: hidden;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.sponsors-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.sponsors-inner h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.sponsors-cta-text {
  font-size: var(--text-sm);
  color: var(--gray);
}

.sponsors-cta-text a {
  color: var(--teal);
  font-weight: 500;
}
.sponsors-cta-text a:hover { opacity: 0.7; }

.sponsors-track-wrapper {
  overflow: hidden;
  max-width: var(--content-width);
  margin: 0 auto;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.sponsors-track {
  display: flex;
  gap: 3rem;
  animation: scroll-sponsors 20s linear infinite;
  width: max-content;
}

.sponsor-logo {
  flex-shrink: 0;
  width: 150px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.3s;
}

.sponsor-logo:hover { opacity: 1; }
.sponsor-logo svg { width: 100%; height: 100%; }
.sponsor-logo img { max-height: 32px; max-width: 130px; object-fit: contain; }

@keyframes scroll-sponsors {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Footer ===== */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 0;
}

.footer-container {
  max-width: var(--content-width);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-logo {
  margin-bottom: 0.4rem;
}

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

.footer-desc {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  color: rgba(255,255,255,0.5);
  transition: color 0.15s;
}
.footer-social a:hover { color: var(--teal); }

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.6rem;
}

.footer-col ul li {
  margin-bottom: 0.3rem;
}

.footer-col ul li a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--teal); }

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
}

/* ===== WordPress core helpers ===== */
.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-block-image img { max-width: 100%; height: auto; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .logo-img { height: 30px; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.75rem;
  }
  .nav-links.active { display: flex; }
  .nav-toggle { display: flex; }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    border-radius: 0;
  }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }

  .hero-banner-content { max-width: 100%; }

  .hero-hri-logo { max-width: 260px; }

  .hero-location-heading { font-size: var(--text-3xl); }

  .hero-meta-item { font-size: var(--text-base); }

  .countdown-num { font-size: 1.5rem; }
  .countdown-unit { min-width: 44px; }
  .countdown-sep { font-size: 1.1rem; padding-bottom: 0.7rem; }

  .theme-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .dates-block .dates-list { columns: 1; }

  .visit-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .visit-banner { height: 160px; }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .hero-hri-logo { max-width: 200px; }
  .hero-location-heading { font-size: var(--text-2xl); }

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

  .footer-links { grid-template-columns: 1fr; }
}

/* ===== Footer simplified (no link columns) ===== */
.footer-top--simple {
  grid-template-columns: 1fr;
}

/* ===== Organizers Page ===== */
.org-contact-note {
  font-size: var(--text-sm);
  color: var(--gray);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}
.org-contact-note a { color: var(--blue); text-decoration: none; }
.org-contact-note a:hover { text-decoration: underline; }

.org-section { margin-bottom: 3rem; }

.org-role-heading {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 1rem 0;
}

.org-email-box {
  display: block;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.6rem 1rem;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--blue);
  text-decoration: none;
  margin-bottom: 1.75rem;
  transition: background 0.15s;
}
.org-email-box:hover { background: var(--bg-alt); }

/* WordPress auto-wraps the link in <p> — neutralise that */
p:has(> .org-email-box) { margin: 0; padding: 0; }

.org-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2.5rem;
}

.org-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 160px;
}

.org-photo {
  width: 160px;
  height: 160px;
  border-radius: 4px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border);
  margin-bottom: 0.6rem;
  display: block;
  /* Built-in SVG placeholder — shown when image fails or hasn't loaded */
  background-color: #e5e7eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Crect width='160' height='160' fill='%23e5e7eb'/%3E%3Ccircle cx='80' cy='60' r='28' fill='%239ca3af'/%3E%3Cellipse cx='80' cy='120' rx='44' ry='28' fill='%239ca3af'/%3E%3C/svg%3E");
  background-size: cover;
  /* Hide broken image icon and alt text */
  color: transparent;
  font-size: 0;
}

/* Hide the broken image icon in all browsers */
.org-photo::before {
  content: '';
  display: block;
  position: absolute;
  width: 160px;
  height: 160px;
  background-color: #e5e7eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Crect width='160' height='160' fill='%23e5e7eb'/%3E%3Ccircle cx='80' cy='60' r='28' fill='%239ca3af'/%3E%3Cellipse cx='80' cy='120' rx='44' ry='28' fill='%239ca3af'/%3E%3C/svg%3E");
  background-size: cover;
}

.org-card { position: relative; }

.org-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--dark);
  line-height: 1.4;
  display: block;
}

.org-affil {
  font-size: var(--text-sm);
  color: var(--gray);
  font-style: italic;
  line-height: 1.4;
  display: block;
  margin-top: 0.15rem;
}

@media (max-width: 640px) {
  .org-cards { gap: 1.5rem; }
  .org-card { width: 130px; }
  .org-photo { width: 130px; height: 130px; }
}
