/*
Theme Name: Gantar
Theme URI: http://avgantar.com
Description: Modern, fully responsive, and optimized theme for AV Gantar. Built with a mobile-first responsive layout, custom typography, and CSS variables. Compatible with PHP 8.x and WordPress 6.x/7.0.
Version: 2.1.0
Author: AVGantar
License: GNU General Public License v2 or later
Tags: translation-ready, custom-menu, custom-logo, featured-images, responsive-layout
Text Domain: gantar
*/

/* --- CSS Variables & Design Tokens --- */
:root {
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette - Modernized Brand Colors */
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text-primary: #0c3240;
  --color-text-muted: #4b5563;
  --color-accent: #79770B;
  --color-accent-hover: #5d5c08;
  --color-border: #e2e8f0;
  --color-card-shadow: rgba(12, 50, 64, 0.06);
  --color-card-hover-shadow: rgba(12, 50, 64, 0.12);
  --color-white: #ffffff;
  --color-dark: #07222c;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

/* --- CSS Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.6;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.25;
}

/* --- Layout Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -1rem;
}

.col {
  padding: 1rem;
  flex: 1;
}

/* Responsive grid helpers */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2.5rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  flex-grow: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo img {
  height: 50px;
  width: auto;
}

/* Desktop Navigation Menu */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-menu a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: var(--transition-smooth);
  transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after {
  width: 80%;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: var(--color-accent);
}

/* Dropdowns in Navigation */
.menu-item-has-children {
  position: relative;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border-radius: 8px;
  list-style: none;
  min-width: 220px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 100;
}

.menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sub-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.sub-menu a::after {
  display: none;
}

.sub-menu a:hover {
  background-color: var(--color-bg);
}

/* Mobile elements hidden on desktop by default */
.mobile-nav-overlay,
.mobile-menu-drawer {
  display: none !important;
}

/* Language Toggler */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.lang-btn {
  background: none;
  border: 1px solid var(--color-border);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
}

.lang-btn.active,
.lang-btn:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1100;
}

.mobile-nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--color-text-primary);
  margin: 5px 0;
  transition: var(--transition-smooth);
}

/* Hamburger state */
.mobile-nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.mobile-nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Responsive Mobile Navigation */
@media (max-width: 991px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  .mobile-nav-overlay {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(12, 50, 64, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
  }
  
  .mobile-nav-overlay.open {
    opacity: 1;
    visibility: visible;
  }
  
  .mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background-color: var(--color-surface);
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 1060;
    padding: 6rem 2rem 2rem;
    display: flex !important;
    flex-direction: column;
    gap: 2rem;
    transition: var(--transition-smooth);
  }
  
  .mobile-menu-drawer.open {
    right: 0;
  }
  
  .mobile-menu-drawer .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
  }
  
  .mobile-menu-drawer .nav-menu li {
    width: 100%;
  }
  
  .mobile-menu-drawer .nav-menu a {
    display: block;
    font-size: 1.1rem;
    padding: 0.5rem 0;
    width: 100%;
  }
  
  .mobile-menu-drawer .sub-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    border: none;
    box-shadow: none;
    padding-left: 1.5rem;
    background: transparent;
  }
  
  .mobile-menu-drawer .lang-switcher {
    margin-left: 0;
    margin-top: 1rem;
  }
}

/* --- Hero Section --- */
.hero-section {
  padding: 5rem 0;
  background: radial-gradient(circle at top right, rgba(121, 119, 11, 0.05), transparent 60%),
              radial-gradient(circle at bottom left, rgba(12, 50, 64, 0.04), transparent 50%);
  border-bottom: 1px solid var(--color-border);
}

.hero-grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  text-align: left;
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-subtitle {
  font-family: var(--font-heading);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 3rem;
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero-separator {
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.hero-image-col {
  position: relative;
  min-width: 0;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(12, 50, 64, 0.1);
  border: 4px solid var(--color-white);
  outline: 1px solid var(--color-border);
  transition: var(--transition-smooth);
  object-fit: cover;
}

.hero-image:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(12, 50, 64, 0.15);
  border-color: var(--color-accent);
}

@media (max-width: 991px) {
  .hero-grid-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .hero-text-col {
    align-items: center;
  }
  .hero-image-col {
    max-width: 500px;
    margin: 0 auto;
  }
  .hero-desc {
    text-align: center !important;
  }
  .hero-separator {
    margin: 0 auto 2rem !important;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
  .hero-section {
    padding: 3.5rem 0;
  }
}

/* --- Service Cards Section --- */
.services-section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
}

.service-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--color-card-shadow);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--color-card-hover-shadow);
  border-color: rgba(121, 119, 11, 0.2);
}

.service-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.service-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.service-card:hover .service-image-wrapper img {
  transform: scale(1.05);
}

.service-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.service-desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.service-link {
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  color: var(--color-accent);
  margin-top: auto;
}

.service-link::after {
  content: '→';
  margin-left: 0.4rem;
  transition: var(--transition-smooth);
}

.service-link:hover::after {
  transform: translateX(4px);
}

/* --- Features Block ("Why choose us") --- */
.why-us-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px var(--color-card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  height: 100%;
}

.why-us-logo {
  height: 60px;
  width: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

.why-us-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
}

.features-list {
  list-style: none;
  width: 100%;
  margin-bottom: 2rem;
  text-align: left;
}

.features-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.features-list li::before {
  content: '✓';
  position: absolute;
  left: 0.5rem;
  color: var(--color-accent);
  font-weight: 800;
}

.btn-primary {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-white);
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px rgba(121, 119, 11, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(121, 119, 11, 0.3);
}

/* --- Inner Page Styles --- */
.page-container {
  padding: 4rem 0;
  flex-grow: 1;
}

.page-header {
  margin-bottom: 3rem;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.page-content-wrapper {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 4px 20px var(--color-card-shadow);
}

@media (max-width: 768px) {
  .page-content-wrapper {
    padding: 1.5rem;
  }
}

.page-content {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

.page-content p {
  margin-bottom: 1.5rem;
}

.page-image {
  margin: 2.5rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  max-width: 600px;
}

/* --- Gallery Page --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: 0 4px 15px var(--color-card-shadow);
  cursor: pointer;
  border: 1px solid var(--color-border);
  transition: var(--transition-smooth);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(12, 50, 64, 0.8), transparent 70%);
  opacity: 0;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  transition: var(--transition-smooth);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay-text {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Lightbox modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 34, 44, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox-modal.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: var(--color-white);
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: var(--color-white);
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  transition: var(--transition-smooth);
}

.lightbox-close:hover {
  color: var(--color-accent);
}

/* --- Contact Page & Form --- */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

@media (max-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
}

.contact-info-list {
  list-style: none;
  margin: 1.5rem 0;
}

.contact-info-list li {
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  font-size: 1rem;
  align-items: center;
}

.contact-info-list strong {
  color: var(--color-text-primary);
  min-width: 90px;
}

/* Interactive Leaflet Map Wrapper */
.map-container {
  height: 300px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin-top: 2rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
}

.form-control {
  font-family: var(--font-body);
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 0.95rem;
  background-color: var(--color-bg);
  transition: var(--transition-smooth);
  color: var(--color-text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(121, 119, 11, 0.1);
  background-color: var(--color-white);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
  margin-top: auto;
  border-top: 3px solid var(--color-accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-widget h4 {
  color: var(--color-white);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-widget h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--color-accent);
}

.footer-widget ul {
  list-style: none;
}

.footer-widget ul li {
  margin-bottom: 0.8rem;
}

.footer-widget a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-widget a:hover {
  color: var(--color-white);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-accent);
  color: var(--color-white);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-accent-hover);
  color: var(--color-white);
  transform: translateY(-3px);
}

/* --- WordPress Compatibility --- */
.aligncenter {
  display: block;
  margin: 1.5rem auto;
}
.alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1.5rem 0;
}
.alignright {
  float: right;
  margin: 0.5rem 0 1.5rem 1.5rem;
}
.wp-caption {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 0.5rem;
  border-radius: 6px;
  text-align: center;
  max-width: 100%;
}
.wp-caption-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
