/*
Theme Name: AI-Tietoportaali Teema
Theme URI: https://esimerkkisivustosi.fi/ai-tietoportaali-teema
Author: Sinun Nimesi
Author URI: https://esimerkkisivustosi.fi
Description: Futuristinen teema tekoälyaiheiselle tietoportaalille. Suunniteltu selkeäksi ja informatiiviseksi.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: tekoäly, futurismi, teknologia, tietoportaali, tumma teema, moderni, responsiivinen
Text Domain: ai-tietoportaali-teema
*/

/*
/*:root {
/*  --wp--preset--gradient--midnight: linear-gradient(135deg, rgb(2, 3, 129) 0%, rgb(0, 145, 255) 100%);
/*}  */


/*:root {
/*  --wp--preset--gradient--midnight: linear-gradient(135deg, rgb(60, 90, 200) 0%, rgb(140, 200, 255) 100%);
/*}  */

:root {
  --wp--preset--gradient--midnight: linear-gradient(135deg, rgb(60, 90, 200) 0%, rgb(180, 220, 255) 100%);
}



/* === Perustyyli === */
body {
  font-family: 'Exo 2', sans-serif;
  background-color: #0a0f18;
  color: #e0e0e0;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* === Header === */
header.site-header {
  background-color: rgba(16, 24, 40, 0.8);
  /*padding: 5px 0;                        */
  border-bottom: 1px solid #1a2c47;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header.site-header .site-title a {
  font-size: 1.8em;
  color: #00ffff;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
}

/* === Main Navigation Default Styles (Affects both mobile and desktop before media queries/toggled state) === */
nav.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav.main-navigation ul li {
  margin: 0;
}

nav.main-navigation ul li a {
  text-decoration: none;
  color: #c0c0c0;
  font-weight: 400;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  display: block;
  padding: 10px 15px;
  text-align: center;
}

nav.main-navigation ul li a:hover,
nav.main-navigation ul li.current-menu-item > a,
nav.main-navigation ul li.current_page_item > a {
  color: #00ffff;
  background-color: #101828;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.7);
}

/* === Menu Toggle Button (Always visible) === */
.menu-toggle {
  display: block; /* Always display the hamburger button */
  background: none;
  border: none;
  font-size: 2rem;
  
  /*position: absolute; /* Position relative to the header */
  position: margin-left; /* Position relative to the header */
  
  
  top: 20px;
  right: 20px;
  z-index: 100; /* Ensure it's above other elements */
  cursor: pointer;
  color: #00ffff; /* Added color for visibility */
}

/* === Hamburger Icon Styles === */
.hamburger-icon {
  display: block;
  width: 30px;
  height: 3px;
  background-color: #00ffff;
  position: relative;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 75%;
  height: 3px;
  background-color: #00ffff;
  transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
}

.hamburger-icon::before {
  top: 0px;
}

.hamburger-icon::after {
  top: 0px;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon {
  background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::after {
  transform: rotate(-45deg);
  top: 0;
}


/* === Mobile-specific styles (max-width: 768px) === */
@media screen and (max-width: 768px) {
  /* On mobile, navigation is hidden by default */
  nav.main-navigation {
    /* display: none;         /*  haviaa  kokonaan  mobiilikokoisella */
    
    display: flex-direction;
    flex-direction: column;
    background-color: transparent;
    position: left; /* Reset positioning from mobile styles */
    background-color: transparent; /* Reset background from mobile styles */
    width: auto; /* Reset width from mobile styles */
  }  
  

  /* When toggled on mobile, display navigation */
  nav.main-navigation.toggled {
    display: flex;
  }

  /* Ensure menu items stack vertically when toggled on mobile */
  nav.main-navigation.toggled ul {
    display: none;                                /*  TAMA  PIILOITTAA  AI  MENUN   KUN TOGGLE PAALLA.. tai POIS */
    flex-direction: column;
  }

}



/* === Desktop navigation (min-width: 769px) === */
@media screen and (min-width: 769px) {
  /* On desktop, main navigation is visible by default (horizontal) */
  nav.main-navigation {
    display: flex; /* Display navigation normally on desktop */
    flex-direction: row; /* Horizontal alignment */
    position: right; /* Reset positioning from mobile styles */
    background-color: transparent; /* Reset background from mobile styles */
    width: auto; /* Reset width from mobile styles */
  }

  /* On desktop, ul is also horizontal by default */
  nav.main-navigation ul {
    display: flex;
    flex-direction: row;
  }

  nav.main-navigation ul li {
    margin-left: 25px;
  }

  nav.main-navigation ul li a {
    padding: 0;
    text-align: left;         /*  tarkoittaa  valikon teksteja,  ei valikon paikkaa  */
  }

  /* When toggled on desktop, it acts like mobile menu (overlay/vertical) */
  nav.main-navigation.toggled {
    display: flex; /* Show the navigation container                     JOS  NAPPIA PAINETAAN  NAYTETAANKO  TEKSIT  SILTI   */          
    
    flex-direction: column; /* Stack items vertically */
    position: absolute; /* Make it an overlay */
    top: 70px; /* Adjust as needed */
    left: 0;
    width: 20%;
    /*background-color: #0a0f18; /* Dark background for overlay */
    /*z-index: 999;  */
  }

  nav.main-navigation.toggled ul {
    display: flex;
    flex-direction: column; /* Stack items vertically */
  }
}

/* === Hero Section === */
.hero {
  background: linear-gradient(rgba(13, 10, 27, 0.5), rgba(13, 10, 27, 0.65)), url('https://tekoalyopas.com/wp-content/uploads/2025/07/ai_tulevaisuus.png') no-repeat center center/cover;
/*background: linear-gradient(rgba(10, 15, 24, 0.85), rgba(10, 15, 24, 0.95)), url('https://tekoalyopas.com/wp-content/uploads/2025/07/ai_tulevaisuus.png') no-repeat center center/cover;  */
  color: #ffffff;
  padding: 70px 0;
  text-align: center;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h2 {
  font-size: 2.8em;
  margin-bottom: 15px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.hero p {
  font-size: 1.1em;
  margin-bottom: 25px;
  max-width: 650px;
}

.cta-button {
  display: inline-block;
  background-color: #00ffff;
  color: #0a0f18;
  padding: 12px 25px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.cta-button:hover {
  background-color: #00e0e0;
  transform: translateY(-2px);
}

/* === Content === */
.content-area {
  padding: 50px 0;
}

.content-area h3.section-title {
  font-size: 2em;
  color: #00ffff;
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.grid-item {
  background-color: rgba(26, 44, 71, 0.5);
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #1a2c47;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 255, 255, 0.15);
}

.grid-item h4 {
  font-size: 1.4em;
  color: #00ffff;
  margin-bottom: 15px;
}

.grid-item p {
  font-size: 0.95em;
  color: #b0b0b0;
  flex-grow: 1;
  margin-bottom: 20px;
}

.grid-item .learn-more {
  color: #00ffff;
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
  transition: color 0.3s ease;
}

.grid-item:hover .learn-more {
  color: #ffffff;
  text-decoration: underline;
}

/* === Footer === */
footer.site-footer {
  background-color: #080c14;
  color: #888;
  text-align: center;
  padding: 30px 0;
  border-top: 1px solid #1a2c47;
  font-size: 0.9em;
}