/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Main Styles for JIKO Ent Website */

/* Design System - Color Palette */
:root {
  /* Primary palette - focused on sustainability */
  --primary-color: #2e7d32; /* Main brand green */
  --primary-light: #60ad5e; /* Lighter shade for hover states */
  --primary-dark: #005005; /* Darker shade for text on light backgrounds */
  
  /* Secondary palette - more neutral and professional */
  --secondary-color: #455a64; /* More neutral blue-grey */
  --secondary-light: #718792; /* Lighter shade for hover states */
  --secondary-dark: #1c313a; /* Darker shade for contrast elements */
  
  /* Accent color - used sparingly */
  --accent-color: #26a69a; /* Teal - represents innovation and science */
  
  /* Background colors */
  --background-light: #f5f5f5;
  --background-white: #ffffff;
  --background-dark: #1b4332; /* Deeper, more sophisticated green */
  
  /* Text colors */
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-light: #ffffff;
  
  /* Spacing system */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-xxl: 64px;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* 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.15);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Global Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--text-primary);
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background-color: var(--background-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

/* Typography System */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

h2 {
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: var(--space-md);
  position: relative;
}

h2:after {
  content: "";
  position: absolute;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  bottom: -12px;
  left: 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title h2 {
  margin-bottom: var(--space-lg);
}

.section-title h2:after {
  left: 50%;
  transform: translateX(-50%);
}

h3 {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

h5 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-md);
}

.flow-text {
  font-size: 1.2rem;
  margin: var(--space-md) 0;
  line-height: 1.7;
}

/* Layout Components */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

section {
  padding: var(--space-xxl) 0;
}

section:nth-of-type(even) {
  background-color: var(--background-light);
}

.divider {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
  margin-bottom: var(--space-lg);
  opacity: 0.7;
}

/* Button System */
.btn, .btn-large {
  background-color: var(--primary-color);
  border-radius: var(--radius-sm);
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-decoration: none;
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
}

.btn:hover, .btn-large:hover {
  background-color: var(--primary-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn:focus, .btn-large:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.3);
}

.btn-large {
  padding: var(--space-sm) var(--space-lg);
  font-size: 1.1rem;
}

.btn-secondary, .btn-large.btn-secondary {
  background-color: var(--secondary-color);
}

.btn-secondary:hover, .btn-large.btn-secondary:hover {
  background-color: var(--secondary-light);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: rgba(46, 125, 50, 0.1);
}

/* Navigation */
nav {
  background-color: var(--primary-color); /* #2e7d32 - your main brand green */
  box-shadow: var(--shadow-md);
}

.nav-wrapper {
  background-color: var(--primary-color); /* #2e7d32 - your main brand green */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) 0;
}

.brand-logo {
  color: var(--text-light);
  font-weight: 600;
  font-size: 1.6rem;
  text-decoration: none;
  display: flex;
  align-items: center;
}

#nav-mobile {
  display: flex;
  list-style: none;
  margin-left: auto;
}

#nav-mobile li a {
  color: var(--text-light);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  transition: color var(--transition-fast);
}

#nav-mobile li a:hover {
  color: var(--primary-light);
}

#languageSwitcher {
  background-color: transparent;
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  padding: var(--space-xs);
  cursor: pointer;
  margin-left: var(--space-sm);
  transition: border-color var(--transition-fast);
}

#languageSwitcher:hover {
  border-color: var(--text-light);
}

/* Mobile Navigation */
.sidenav {
  background-color: var(--primary-color); /* Match the main navigation */
  width: 250px;
  padding: var(--space-lg) 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  overflow-y: auto;
  z-index: 999;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
}

.sidenav.open {
  transform: translateX(0);
}

.sidenav li {
  list-style: none;
}

.sidenav li > a {
  color: var (--text-light);
  font-size: 1.1rem;
  padding: var(--space-sm) var(--space-lg);
  display: block;
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.sidenav li > a:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidenav-trigger {
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

/* Hero Section */
#hero {
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  padding: var(--space-xxl) 0;
  text-align: center;
}

#hero h1 {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

#hero h5 {
  margin-bottom: var(--space-md);
  opacity: 0.9;
  font-weight: 400;
  font-size: 1.4rem;
}

.buttons-container {
  margin-top: var(--space-lg);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* Card System */
.card {
  background-color: var(--background-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.card.visible {
  opacity: 1;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-content {
  padding: var(--space-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card .card-title {
  font-weight: 500;
  color: var(--primary-dark);
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
}

.card-content .card-title {
  display: block;
  color: var(--primary-dark);
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: var(--space-sm);
  text-align: center;
}

.card-image {
  position: relative;
}

.card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.card-image .card-title {
  display: none; /* Hide the overlapping titles */
}

.card-panel {
  background-color: var(--background-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  height: 100%;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.card-panel.visible {
  opacity: 1;
}

.card-panel:hover {
  box-shadow: var(--shadow-lg);
}

/* SVG Icon Styling */
.svg-card-container {
  position: relative;
  padding: var(--space-md);
  background-color: #f9f9f9;
  height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.svg-card-container.visible {
  opacity: 1;
}

.svg-card-container svg {
  max-height: 100%;
  max-width: 100%;
}

.svg-card-container:hover svg {
  transform: scale(1.1);
}

/* Technology SVG */
.tech-svg-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background-color: var(--background-white);
}

.tech-process-svg {
  width: 80%;
  max-height: 300px;
}

/* Funding SVG */
.funding-svg-container {
  text-align: center;
  transition: transform var(--transition-normal), opacity 0.8s ease-in-out;
  padding: var(--space-md);
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.funding-svg-container.visible {
  opacity: 1;
}

.funding-svg-container:hover {
  transform: translateY(-5px);
}

.funding-svg {
  height: 100px;
  width: auto;
  margin-bottom: var(--space-md);
}

/* Technology Section */
#technology img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 100%;
}

/* Research Section */
#research .card {
  min-height: 220px;
}

/* Applications Section */
#applications .card .card-image {
  max-height: 180px;
  overflow: hidden;
}

/* About Section */
#about ul.browser-default {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

#about ul.browser-default li {
  margin-bottom: var(--space-xs);
}

/* Funding Section */
#funding .card-panel {
  text-align: center;
  padding: var(--space-lg);
}

#funding .card-panel img {
  max-height: 80px;
  margin-bottom: var (--space-md);
  transition: transform var(--transition-normal);
}

#funding .card-panel:hover img {
  transform: scale(1.05);
}

#funding .card-panel h5 {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 1rem;
}

/* Contact Section */
#contact .card-panel {
  min-height: 320px;
}

#contact .input-field {
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

#contact .input-field input,
#contact .input-field textarea {
  border-bottom: 2px solid #e0e0e0;
  box-shadow: none;
  font-size: 16px;
  transition: border-color var(--transition-normal);
}

#contact .input-field input:focus,
#contact .input-field textarea:focus {
  border-bottom: 2px solid var(--primary-color);
  box-shadow: none;
}

#contact .input-field label {
  color: var(--text-secondary);
}

#contact .input-field input:focus + label,
#contact .input-field textarea:focus + label {
  color: var(--primary-color) !important;
}

#contact button[type="submit"] {
  width: 100%;
  margin-top: var(--space-md);
}

#contact .social-media {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

#contact .social-media a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

#contact .social-media a:hover {
  transform: translateY(-3px);
  background-color: var(--primary-light);
}

/* Footer */
.page-footer {
  background-color: var(--primary-color); /* #2e7d32 - your main brand green */
  color: var(--text-light);
  padding-top: var(--space-xl);
}

.page-footer h5 {
  font-weight: 500;
  margin-bottom: var (--space-md);
  color: var(--text-light);
}

.page-footer ul {
  padding: 0;
  list-style: none;
}

.page-footer ul li {
  margin-bottom: var(--space-xs);
}

.page-footer a.white-text {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.page-footer a.white-text:hover {
  color: var(--text-light);
}

.footer-copyright {
  padding: var(--space-md) 0;
  background-color: rgba(0, 0, 0, 0.15);
  text-align: center;
  margin-top: var(--space-xl);
}

/* Animation Classes */
.fade-in {
  opacity: 1;
}

.slide-in {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Scroll Spy */
.scrollspy {
  scroll-margin-top: 64px;
}

/* Responsive Styles */
@media only screen and (max-width: 992px) {
  h1 {
    font-size: 2.4rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .buttons-container {
    flex-direction: column;
    align-items: center;
  }
  
  .buttons-container .btn-large {
    width: 100%;
    max-width: 320px;
  }
  
  #nav-mobile {
    display: none;
  }
  
  .sidenav-trigger {
    display: block;
  }
  
  section {
    padding: var(--space-xl) 0;
  }
}

@media only screen and (max-width: 600px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .flow-text {
    font-size: 1rem;
  }
  
  #hero {
    padding: var(--space-xl) 0;
  }
  
  #hero h5 {
    font-size: 1.2rem;
  }
  
  section {
    padding: var(--space-lg) 0;
  }
  
  .section-title {
    margin-bottom: var(--space-lg);
  }
  
  .card-panel {
    padding: var(--space-sm);
  }
  
  #funding .card-panel {
    padding: var(--space-md);
  }
}

/* Materialize CSS Overrides */
.row {
  margin-bottom: var(--space-lg);
}

.row .col {
  padding: var(--space-sm);
}

select {
  display: block;
}

.browser-default {
  color: var(--text-primary);
}

.sidenav-overlay {
  background-color: rgba(0, 0, 0, 0.5);
}

/* Fix for Materialize's container class */
@media only screen and (min-width: 993px) {
  .container {
    width: 90%;
  }
}

/* Accessibility */
:focus {
  outline: 3px solid rgba(46, 125, 50, 0.4);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--text-light);
  padding: var(--space-xs) var(--space-sm);
  z-index: 100;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* Print styles */
@media print {
  nav, footer, #contact, .buttons-container {
    display: none;
  }
  
  body {
    color: black;
    background: white;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .card, .card-panel {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Animation Classes - FIXED to prevent disappearing content */
.card, .card-panel, h2, .flow-text, .svg-card-container, .funding-svg-container {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.card.visible, .card-panel.visible, h2.visible, .flow-text.visible, 
.svg-card-container.visible, .funding-svg-container.visible {
  opacity: 1;
}

/* Funding logos styling */
.funding-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  height: 100%;
  padding: var(--space-md);
}

.funding-logo {
  max-height: 120px;
  object-fit: contain;
  margin-bottom: var(--space-md);
}

/* Make sure the images don't break layout on smaller screens */
@media screen and (max-width: 600px) {
  .funding-logo {
    max-height: 100px;
  }
}

/* Email protection styling */
.email-protected {
    cursor: pointer;
    color: var(--primary-dark);
    border-bottom: 1px dashed var(--primary-dark);
    display: inline-block;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.email-protected:hover {
    color: var(--primary);
}

/* Contact details styling */
.contact-details p {
    margin: 16px 0;
    font-size: 1.1rem;
}

.contact-details .material-icons.tiny {
    vertical-align: middle;
    margin-right: 5px;
}

/* Add these more specific selectors to override Materialize defaults */
nav, nav .nav-wrapper, nav .nav-wrapper i, 
nav a.sidenav-trigger, nav a.sidenav-trigger i {
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
}

.page-footer, .page-footer .footer-copyright {
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
}
