/* Modern Contact Page Styles */
:root {
  --primary-green: #10b981;
  --primary-green-light: #34d399;
  --primary-green-dark: #059669;
  --accent-green: #ecfdf5;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --background-main: #ffffff;
  --background-secondary: #f9fafb;
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --shadow-light: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base page styling */
.page_contact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
}

/* Page header */
.page_contact h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
  position: relative;
}

.page_contact h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-green-light));
  margin: 1rem auto;
  border-radius: 2px;
}

/* Contact section container */
.contact_section {
  margin-top: 3rem;
}

/* Mailing address styling */
.address {
  background: linear-gradient(135deg, var(--accent-green) 0%, rgba(16, 185, 129, 0.05) 100%);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 3rem;
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  transition: var(--transition-base);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.address:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Contact cards container - proper grid layout */
.contact_section .contact {
  margin-bottom: 0;
}

/* Create a grid wrapper for contact cards only */
.contact_section {
  display: block;
}

/* Target only the contact cards, not the address */
.contact_section .contact:first-of-type {
  margin-top: 0;
}

/* Grid layout for contact cards */
.contact_section .contact {
  margin-bottom: 2rem;
}

/* Use flexbox for larger screens to show cards side by side */
@media (min-width: 768px) {
  .contact_section {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  
  .contact_section .address {
    order: -1;
    margin-bottom: 3rem;
  }
  
  /* Container for contact cards */
  .contact_section .contact:first-of-type {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  /* Create a wrapper div effect using CSS */
  .contact_section {
    position: relative;
  }
  
  .contact_section::after {
    content: '';
    display: table;
    clear: both;
  }
}

/* Base contact card styling */
.contact {
  background: var(--background-main);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-light);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  max-width: 100%;
}

/* Grid layout for contact cards on larger screens */
@media (min-width: 900px) {
  .contact_section {
    display: block;
    position: relative;
  }
  
  .contact_section .contact {
    width: calc(50% - 1rem);
    display: inline-block;
    vertical-align: top;
    margin-right: 2rem;
    margin-bottom: 2rem;
  }
  
  .contact_section .contact:nth-of-type(even) {
    margin-right: 0;
  }
}

.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-green-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition-base);
}

.contact:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-large);
  border-color: rgba(16, 185, 129, 0.3);
}

.contact:hover::before {
  transform: scaleX(1);
}

/* Primary contact specific styling */
.contact.primary {
  background: linear-gradient(135deg, var(--background-main) 0%, var(--accent-green) 100%);
}

.contact.primary h2 {
  color: var(--primary-green-dark);
}

/* Support contact specific styling */
.contact.support {
  background: linear-gradient(135deg, var(--background-main) 0%, rgba(16, 185, 129, 0.03) 100%);
}

.contact.support h2 {
  color: var(--primary-green);
}

/* Contact section headers */
.contact h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact.primary h2::before {
  content: '👤';
  font-size: 1.25rem;
}

.contact.support h2::before {
  content: '🛠️';
  font-size: 1.25rem;
}

/* Contact information styling */
.contact .name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding: 0.75rem 0;
}

.contact .title {
  font-size: 1.1rem;
  color: var(--primary-green);
  font-weight: 500;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-sm);
  display: inline-block;
}

.contact .affiliation {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.05);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary-green-light);
  line-height: 1.6;
}

.contact .phone,
.contact .email {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--background-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.contact .phone:hover,
.contact .email:hover {
  background: var(--accent-green);
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.2);
}

.contact .phone .label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 80px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact .phone .label::before {
  content: '📞';
  margin-right: 0.5rem;
}

.contact .phone .value {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
}

/* Email link styling */
.contact .email {
  background: linear-gradient(135deg, var(--background-secondary) 0%, var(--accent-green) 100%);
}

.contact .email a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: var(--transition-fast);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact .email a::before {
  content: '✉️';
  font-size: 1.2rem;
}

.contact .email a:hover {
  color: var(--primary-green-dark);
}

.contact .email a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 1.7rem;
  width: 0;
  height: 2px;
  background: var(--primary-green);
  transition: var(--transition-fast);
}

.contact .email a:hover::after {
  width: calc(100% - 1.7rem);
}

/* Breadcrumbs styling */
.breadcrumbs {
  margin-bottom: 2rem;
  padding: 1rem 0;
}

/* Edit link styling */
.edit_link {
  text-align: center;
  margin: 1rem 0 2rem 0;
}

.edit_link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-green);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition-base);
  box-shadow: var(--shadow-light);
}

.edit_link a:hover {
  background: var(--primary-green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Responsive design */
@media (max-width: 900px) {
  .contact_section .contact {
    width: 100% !important;
    display: block !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 768px) {
  .page_contact {
    padding: 1rem 0.75rem;
  }
  
  .page_contact h1 {
    font-size: 2rem;
  }
  
  .contact_section .contact {
    width: 100%;
    margin-right: 0;
    margin-bottom: 1.5rem;
  }
  
  .contact {
    padding: 2rem;
  }
  
  .contact h2 {
    font-size: 1.3rem;
  }
  
  .contact .phone,
  .contact .email {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
  
  .contact .phone .label {
    min-width: 70px;
  }
  
  .address {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .page_contact h1 {
    font-size: 1.75rem;
  }
  
  .contact {
    padding: 1.5rem;
  }
  
  .address {
    padding: 1.25rem;
    font-size: 1rem;
  }
  
  .contact .phone,
  .contact .email {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .contact .phone .label {
    min-width: unset;
  }
  
  .contact .name {
    font-size: 1.2rem;
  }
  
  .contact h2 {
    font-size: 1.2rem;
  }
}

/* Loading animation for smooth entrance */
.contact {
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.contact.primary {
  animation-delay: 0.1s;
}

.contact.support {
  animation-delay: 0.2s;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Focus states for accessibility */
.contact .email a:focus,
.edit_link a:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .contact {
    box-shadow: none;
    border: 1px solid var(--border-medium);
    break-inside: avoid;
  }
  
  .contact:hover {
    transform: none;
  }
  
  .edit_link {
    display: none;
  }
}