/*
Theme Name: Dec-Log Custom Theme
Theme URI: https://dec-log.com
Author: FD
Author URI: https://dec-log.com
Description: Tema custom per WordPress che ricrea fedelmente l'interfaccia, i colori, i componenti e la struttura di dec-log.com
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: declog
*/

:root {
  --color-primary: #0E54A3;
  --color-secondary: #6EC1E4;
  --color-accent: #61CE70;
  --color-green-overlay: #45A16B;
  --color-text: #7A7A7A;
  --color-dark: #54595F;
  --color-heading: #222222;
  --color-white: #ffffff;
  --font-main: 'Cairo', sans-serif;
  --container-width: 1200px;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  background-color: #ffffff;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--color-secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  color: var(--color-heading);
  font-weight: 400;
  margin-bottom: 0.5em;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Container & Layout */
.site-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background-color: #ffffff;
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo img {
  max-height: 70px;
  width: auto;
}

.header-banner img {
  max-height: 65px;
  width: auto;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
}

.main-navigation a {
  color: var(--color-dark);
  font-size: 15px;
  font-weight: 400;
  padding: 8px 12px;
  border-radius: 0;
  transition: background-color 0.3s, color 0.3s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation a.active {
  color: var(--color-primary);
  background-color: rgba(14, 84, 163, 0.08);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-dark);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 550px;
  background-image: url('https://dec-log.com/wp-content/uploads/2020/09/Screenshot-32.png');
  background-size: cover;
  background-position: center;
  border-top: 5px solid var(--color-primary);
  border-bottom: 5px solid var(--color-primary);
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.42);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-text-box {
  width: 50%;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.95);
  padding: 35px;
  border-radius: 0;
  border-left: 5px solid #609f69;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  position: relative;
  z-index: 10;
}

.hero-text-box h2 {
  color: var(--color-primary);
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 15px;
}

.hero-text-box h3 {
  color: var(--color-green-overlay);
  font-size: 1.4rem;
  font-weight: 400;
}

.hero-shape-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-shape-divider svg {
  position: relative;
  display: block;
  width: 100%;
  height: 200px;
  transform: scaleX(-1) scaleY(-1);
}

.hero-shape-divider .shape-fill {
  fill: #45A16BA1;
}

/* Page Banner Header */
.page-hero-banner {
  position: relative;
  background-image: url('https://dec-log.com/wp-content/uploads/2020/09/Screenshot-32.png');
  background-size: cover;
  background-position: center;
  padding: 60px 0;
  text-align: center;
}

.page-hero-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(69, 161, 107, 0.7);
}

.page-hero-title {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 2.8rem;
  font-weight: 400;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Content Section (Home intro) */
.section-padding {
  padding: 60px 0;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.intro-text-box p {
  font-size: 1.1rem;
  margin-bottom: 1.2em;
  color: #444;
}

/* CTA Cards Grid */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.cta-card {
  position: relative;
  height: 280px;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-decoration: none;
}

.cta-card-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
}

.cta-card:hover .cta-card-bg {
  transform: scale(1.1);
}

.cta-card-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.35);
  transition: background 0.3s ease;
}

.cta-card:hover .cta-card-overlay {
  background: rgba(14, 84, 163, 0.55);
}

.cta-card-title {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  padding: 0 20px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: #55a06a;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 0;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #2755a4;
  color: #ffffff;
}

/* Partner Cards / Image Boxes */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

.partner-card {
  background: #f9f9f9;
  border-radius: 0;
  padding: 25px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid #eee;
  transition: transform 0.3s, box-shadow 0.3s;
}

.partner-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

.partner-card img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.partner-card h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--color-dark);
}

/* Workshop Cards */
.workshop-card {
  background: #ffffff;
  border-radius: 0;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-left: 5px solid var(--color-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.workshop-info h3 {
  color: var(--color-primary);
  font-size: 1.4rem;
}

.workshop-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Media Card Grid */
.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 30px;
}

.media-card {
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  border: 1px solid #f0f0f0;
}

.media-card-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.media-card-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.media-card-body h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.media-card-body p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
}

/* Footer Section */
.footer-banner-contacts {
  position: relative;
  background-image: url('https://dec-log.com/wp-content/uploads/2020/09/Screenshot-32.png');
  background-size: cover;
  background-position: center;
  padding: 50px 0;
  text-align: center;
}

.footer-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(69, 161, 107, 0.85);
}

.footer-banner-title {
  position: relative;
  z-index: 2;
  color: #ffffff;
  font-size: 2.2rem;
}

.footer-main {
  background-color: #f7f9fa;
  padding: 60px 0;
  border-top: 1px solid #eaeaea;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer-col img {
  max-height: 65px;
  max-width: 250px;
  width: auto;
  height: auto;
  object-fit: contain;
  align-self: flex-start;
  margin-bottom: 10px;
}

.footer-col h2 {
  font-size: 1.3rem;
  color: var(--color-primary);
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-dark);
}

.contact-list i {
  color: var(--color-primary);
  width: 20px;
  text-align: center;
}

.site-copyright {
  background-color: #222222;
  color: #aaaaaa;
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

.site-copyright a {
  color: #ffffff;
  margin: 0 8px;
}

.site-copyright a:hover {
  color: var(--color-secondary);
}

/* Scroll To Top Float Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background-color: var(--color-primary);
  color: #ffffff;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.back-to-top:hover {
  background-color: #55a06a;
  color: #ffffff;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .header-container {
    flex-wrap: wrap;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-navigation {
    display: none;
    width: 100%;
    margin-top: 15px;
    background-color: #ffffff;
    padding: 10px 0;
    border-top: 1px solid #eeeeee;
  }
  
  .main-navigation.is-active {
    display: block;
  }
  
  .main-navigation ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid #f2f2f2;
  }

  .main-navigation li:last-child {
    border-bottom: none;
  }

  .main-navigation a {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    color: var(--color-dark);
  }

  .main-navigation a:hover,
  .main-navigation .current-menu-item > a,
  .main-navigation a.active {
    background-color: rgba(14, 84, 163, 0.08);
    color: var(--color-primary);
  }
  
  .grid-2-col, .cta-grid, .partner-grid, .media-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-text-box {
    width: 100%;
  }
}
