/**
 * Cardano Hub Custom Styles
 * Tailwind-based customizations for Cardano Hub branding
 */

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Global Font - Archivo */
body,
html {
  font-family: 'Archivo', sans-serif !important;
}

/* Hero Section Customization - Figma Design Specs */
#hero {
  max-width: 1800px !important;
  height: 628px !important;
  border-radius: 30px !important;
  padding: 80px 100px !important;
  gap: 165px;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

/* Responsive adjustments for hero section */
@media (max-width: 1440px) {
  #hero {
    max-width: calc(100% - 40px) !important;
    padding: 70px 80px !important;
  }
}

@media (max-width: 1024px) {
  #hero {
    height: 550px !important;
    padding: 60px 60px !important;
    gap: 100px;
  }
}

@media (max-width: 768px) {
  #hero {
    height: 500px !important;
    padding: 50px 40px !important;
    gap: 60px;
    border-radius: 20px !important;
  }
}

@media (max-width: 640px) {
  #hero {
    height: 450px !important;
    padding: 40px 24px !important;
    gap: 40px;
    border-radius: 16px !important;
  }
}

/* Hero background inherits border-radius */
#hero .hero-background {
  border-radius: inherit;
}

/* Hero content styling to match design */
#hero .hero-content {
  gap: 24px;
  max-width: 700px;
}

#hero .hero-content h1 {
  margin-bottom: 0;
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

#hero .hero-content p {
  margin-top: 20px;
  margin-bottom: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  opacity: 0.95;
  max-width: 600px;
}

#hero .hero-content .mt-2 {
  margin-top: 32px !important;
}

/* Responsive hero text sizing */
@media (max-width: 1024px) {
  #hero .hero-content h1 {
    font-size: 3rem;
  }
  
  #hero .hero-content p {
    font-size: 1.0625rem;
  }
}

@media (max-width: 768px) {
  #hero .hero-content h1 {
    font-size: 2.5rem;
  }
  
  #hero .hero-content p {
    font-size: 1rem;
    margin-top: 16px;
  }
  
  #hero .hero-content .mt-2 {
    margin-top: 24px !important;
  }
}

@media (max-width: 640px) {
  #hero .hero-content h1 {
    font-size: 2rem;
  }
  
  #hero .hero-content p {
    font-size: 0.9375rem;
  }
}

.hero-section,
.wp-block-cover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

/* Hero Section Button - White background with blue text */
#hero .cardanohub-btn {
  background-color: #FFFFFF !important;
  color: #0033AD !important;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3) !important;
  border-radius: 11px !important;
  font-weight: 500 !important;
  padding: 0.875rem 2rem !important;
  font-size: 1rem !important;
  transition: all 0.3s ease !important;
}

#hero .cardanohub-btn:hover {
  background-color: #F5F5F5 !important;
  color: #002080 !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-2px) !important;
}

.hero-section .wp-block-button__link,
.wp-block-cover .wp-block-button__link,
.hero-section .button,
.wp-block-cover .button,
#hero .hero-static-button a,
#hero .hero-slide1-button a {
  background-color: #FFFFFF !important;
  color: #0033AD !important;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

/* Hero button text color override */
#hero .hero-static-button a span,
#hero .hero-slide1-button a span {
  color: #0033AD !important;
}

.hero-section .wp-block-button__link:hover,
.wp-block-cover .wp-block-button__link:hover,
.hero-section .cardanohub-btn:hover,
.wp-block-cover .cardanohub-btn:hover,
.hero-section .button:hover,
.wp-block-cover .button:hover,
#hero .hero-static-button a:hover,
#hero .hero-slide1-button a:hover {
  background-color: #F5F5F5 !important;
  color: #002080 !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

/* Hero button hover text color override */
#hero .hero-static-button a:hover span,
#hero .hero-slide1-button a:hover span {
  color: #002080 !important;
}

/* Cardano Hub Button Styles - Matching Design */

/* Base Button Styles */
.cardanohub-btn,
.wp-block-button__link,
button[type="submit"],
input[type="submit"],
.btn,
.button {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: 'Archivo', sans-serif !important;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none !important;
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.5;
  white-space: nowrap;
}

/* Primary Button - Blue */
.cardanohub-btn-primary,
.wp-block-button__link,
button[type="submit"],
input[type="submit"],
.btn-primary,
.button-primary {
  background-color: var(--button-primary-bg, #0033AD) !important;
  color: var(--button-primary-text, #FFFFFF) !important;
  box-shadow: 0 2px 8px rgba(0, 51, 173, 0.2);
}

.cardanohub-btn-primary:hover,
.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.btn-primary:hover,
.button-primary:hover {
  background-color: var(--button-primary-hover-bg, #002080) !important;
  box-shadow: 0 4px 12px rgba(0, 51, 173, 0.3);
  transform: translateY(-2px);
}

/* Secondary Button - Yellow */
.cardanohub-btn-secondary,
.wp-block-button.is-style-outline .wp-block-button__link,
.btn-secondary,
.button-secondary {
  background-color: var(--button-secondary-bg, #FFD700) !important;
  color: var(--button-secondary-text, #000000) !important;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.cardanohub-btn-secondary:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.btn-secondary:hover,
.button-secondary:hover {
  background-color: var(--button-secondary-hover-bg, #FFC700) !important;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  transform: translateY(-2px);
}

/* Button Sizes */
.cardanohub-btn-large,
.btn-lg {
  padding: 1.25rem 3rem;
  font-size: 1.125rem;
}

.cardanohub-btn-small,
.btn-sm {
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
}

/* Button with Icon */
.cardanohub-btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Full Width Button */
.cardanohub-btn-block {
  display: block;
  width: 100%;
}

/* Disabled State */
.cardanohub-btn:disabled,
.cardanohub-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Button Group */
.cardanohub-btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cardanohub-btn-group .cardanohub-btn {
  flex: 0 1 auto;
}

/* Responsive Button Adjustments */
@media (max-width: 768px) {
  .cardanohub-btn,
  .wp-block-button__link,
  button[type="submit"],
  input[type="submit"] {
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
  }
  
  .cardanohub-btn-large {
    padding: 1rem 2.5rem;
    font-size: 1rem;
  }
  
  .cardanohub-btn-group {
    flex-direction: column;
  }
  
  .cardanohub-btn-group .cardanohub-btn {
    width: 100%;
  }
}

/* Event Cards Customization */
.event-card,
.card {
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover,
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 51, 173, 0.2);
}

/* Event card with yellow background */
.event-card.yellow-bg {
  background-color: var(--color-secondary);
  color: var(--color-text-dark);
}

/* Event card with blue background */
.event-card.blue-bg {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

/* Event card with light blue background */
.event-card.light-blue-bg {
  background-color: var(--color-accent-light-blue);
  color: var(--color-text-dark);
}

/* Event Grid Cards - Alternating Date Badge Colors */
#em-events-grid-1 > div:nth-child(odd) .event-date-badge,
#em-events-grid-2 > div:nth-child(odd) .event-date-badge,
#em-events-grid-3 > div:nth-child(odd) .event-date-badge,
[id^="em-events-grid-"] > div:nth-child(odd) .event-date-badge {
  background-color: #FFD700;
  color: #FFFFFF;
}

#em-events-grid-1 > div:nth-child(even) .event-date-badge,
#em-events-grid-2 > div:nth-child(even) .event-date-badge,
#em-events-grid-3 > div:nth-child(even) .event-date-badge,
[id^="em-events-grid-"] > div:nth-child(even) .event-date-badge {
  background-color: #7B9FD3;
  color: #FFFFFF;
}

/* Event card hover effect */
#em-events-grid-1 > div,
#em-events-grid-2 > div,
#em-events-grid-3 > div,
[id^="em-events-grid-"] > div {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#em-events-grid-1 > div:hover,
#em-events-grid-2 > div:hover,
#em-events-grid-3 > div:hover,
[id^="em-events-grid-"] > div:hover {
  transform: translateY(-4px);
}

/* Community Section Cards */
.community-card {
  background-color: var(--color-accent-light-blue);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
}

.community-card.yellow {
  background-color: var(--color-secondary);
}

.community-card.blue {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

/* FAQ Section */
.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem 0;
}

.faq-question {
  color: var(--color-text-dark);
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  color: var(--color-primary);
}

.faq-icon {
  color: var(--color-primary);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

/* Navigation Customization */
header.site-header {
  background-color: var(--color-background-white);
}

.nav-link,
.menu-item a {
  color: var(--color-text-dark);
  font-family: 'Archivo', sans-serif;
  transition: color 0.3s ease;
}

.nav-link:hover,
.menu-item a:hover {
  color: var(--color-primary);
}

/* Footer Customization */
.site-footer,
footer {
  background-color: #FFFFFF !important;
  color: var(--color-text-dark);
}

.footer-link {
  color: var(--color-text-dark);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--color-primary);
}

/* Section Headings */
h1, h2, h3, h4, h5, h6,
.heading {
  font-family: 'Archivo', sans-serif;
  color: var(--color-text-dark);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
}

/* Blue section headings */
.blue-section h1,
.blue-section h2,
.blue-section h3,
.blue-section .heading {
  color: var(--color-text-light);
}

/* Accent Elements */
.accent-line {
  height: 4px;
  width: 80px;
  background-color: var(--color-secondary);
  margin: 1rem auto;
}

.badge {
  background-color: var(--color-secondary);
  color: var(--color-text-dark);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-background-light);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* Form Styling */
.custom-launch-form,
.registration-form-container {
  background: var(--color-background-white);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 51, 173, 0.1);
}

.custom-launch-form input,
.custom-launch-form textarea,
.custom-launch-form select {
  border: 1px solid #d4d4d8;
  border-radius: 0.5rem;
  transition: border-color 0.3s ease;
}

.custom-launch-form input:focus,
.custom-launch-form textarea:focus,
.custom-launch-form select:focus {
  border-color: var(--color-primary);
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .event-card,
  .community-card {
    margin-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .section-title {
    font-size: 1.75rem;
  }
}

/* Contact Section Icon Styling */
.icon-primary {
  /* CSS filter to convert black SVG to primary blue (#0033AD) */
  filter: brightness(0) saturate(100%) invert(14%) sepia(97%) saturate(4447%) hue-rotate(221deg) brightness(92%) contrast(107%);
}

/* Alternative approach using CSS variables */
#contact .contact-info img {
  filter: brightness(0) saturate(100%) invert(14%) sepia(97%) saturate(4447%) hue-rotate(221deg) brightness(92%) contrast(107%);
}

/* Hover effect for contact icons */
#contact .contact-info:hover img {
  filter: brightness(0) saturate(100%) invert(10%) sepia(100%) saturate(5000%) hue-rotate(221deg) brightness(85%) contrast(110%);
  transition: filter 0.3s ease;
}

/* Hero Button Override - White background with blue text (highest specificity) */
section#hero .hero-static-button a,
section#hero .hero-slide1-button a,
section#hero .cta-button-wrapper a {
  background-color: #FFFFFF !important;
  color: #0033AD !important;
}

section#hero .hero-static-button a span span,
section#hero .hero-slide1-button a span span,
section#hero .cta-button-wrapper a span span {
  color: #0033AD !important;
}

section#hero .hero-static-button a:hover,
section#hero .hero-slide1-button a:hover,
section#hero .cta-button-wrapper a:hover {
  background-color: #F5F5F5 !important;
  color: #002080 !important;
}

section#hero .hero-static-button a:hover span span,
section#hero .hero-slide1-button a:hover span span,
section#hero .cta-button-wrapper a:hover span span {
  color: #002080 !important;
}
/* Event card layout improvements */
.event-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* Ensure consistent description height */
.event-card p.line-clamp-3 {
    height: 4.5rem; /* 3 lines × 1.5 line-height */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Grid container ensures equal heights */
.events-grid-container .grid {
    align-items: stretch;
}

.events-grid-container .grid > * {
    display: flex;
    flex-direction: column;
}

/* Past event styling */
.past-event {
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.past-event:hover {
    opacity: 1;
}

.past-event .date-badge {
    position: relative;
}

.past-event .date-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* Ensure buttons are always aligned at bottom */
.event-card .p-6 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

/* Button container styling */
.event-card .mt-auto {
    margin-top: auto;
    padding-top: 0.5rem;
}

/* Skeleton card styling to match event cards */
.skeleton-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skeleton-card .p-6 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
}

.skeleton-card .mt-auto {
    margin-top: auto;
    padding-top: 0.5rem;
}