/*
 Theme Name: Astra Child
 Template: astra
 Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body, .site {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === HEADER === */
.site-header, #masthead, .ast-primary-header-bar, .ast-desktop-header,
.ast-header-break-point, .ast-above-header-bar, .ast-below-header-bar,
.astra-header-sticky-support, [id*="masthead"] {
  background: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
  box-shadow: 0 1px 20px rgba(0,0,0,0.3) !important;
}
#masthead {
  position: sticky !important;
  top: 0 !important;
  z-index: 999 !important;
}
.site-header .site-title a, #masthead .site-title a, .site-title a {
  color: #fff !important;
  font-weight: 800 !important;
  font-size: 1.4rem !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
}
.main-header-menu .menu-item a, .main-navigation .menu-item a, #site-navigation .menu-item a {
  color: #94a3b8 !important;
  font-weight: 500 !important;
  font-size: 0.9rem !important;
  letter-spacing: 0.5px !important;
  transition: color 0.2s ease !important;
}
.main-header-menu .menu-item a:hover, .main-navigation .menu-item a:hover,
.main-header-menu .current-menu-item>a, .main-navigation .current-menu-item>a {
  color: #fff !important;
}

/* === FOOTER === */
.site-footer, #colophon {
  background: #0f172a !important;
  color: #64748b !important;
  border-top: 1px solid #1e293b !important;
  padding: 32px 0 !important;
}
.site-footer .ast-footer-copyright, .site-footer p, #colophon p {
  color: #64748b !important;
  font-size: 0.85rem !important;
}
.ast-footer-copyright a[href*="astra"], .ast-footer-copyright a[href*="wpastra"],
.site-footer a[href*="astra"], .site-footer a[href*="wordpress.org"],
.ast-footer-copyright .ast-right-footer {
  display: none !important;
}

/* === PAGE TITLE HIDE === */
.page .ast-page-header, .page .entry-header,
.page h1.entry-title, .page .page-title {
  display: none !important;
}

/* === HERO COVER === */
.wp-block-cover.alignfull {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}
.wp-block-cover.hero-section {
  min-height: 380px !important;
  border-bottom: 3px solid #0f172a !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}
.page:not(.home) .wp-block-cover.alignfull:not(.hero-section),
.page:not(.home) .wp-block-cover.hero-section {
  min-height: 55vh !important;
}
.wp-block-cover__inner-container {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  padding: 40px 24px !important;
  max-width: 900px !important;
  margin: 0 auto !important;
}

/* === HOMEPAGE CARDS === */
.wp-block-columns { align-items: stretch !important; }
.wp-block-columns .wp-block-column {
  display: flex !important;
  flex-direction: column !important;
}
.wp-block-column .wp-block-image img, .wp-block-column figure img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1/1 !important;
  object-fit: cover !important;
  display: block !important;
}
.wp-block-column .wp-block-button { margin-top: auto !important; }
.wp-block-column { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.wp-block-column:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1) !important;
}
.wp-block-button__link { transition: all 0.3s ease !important; }
.wp-block-button__link:hover { transform: translateY(-2px) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important; }

.wp-block-button.is-style-outline .wp-block-button__link {
  color: #0f172a !important;
  border-color: #0f172a !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: #0f172a !important;
  color: #fff !important;
  border-color: #0f172a !important;
}

.wp-block-column h1, .wp-block-column h2, .wp-block-column h3, .wp-block-column h4,
.project-card h2, .project-card h3,
.wp-block-column h1 a, .wp-block-column h2 a, .wp-block-column h3 a, .wp-block-column h4 a,
.project-card h2 a, .project-card h3 a {
  text-decoration: none !important;
}

/* === CONTENT AREA === */
.ast-plain-container.ast-no-sidebar #primary {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.ast-page-builder-template .site-content { padding-top: 0 !important; }

/* === ENERGY PAGE === */
.energy-card {
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.04);
  padding: 50px;
  margin-bottom: 60px;
  border: 1px solid rgba(0,0,0,0.02);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.energy-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.06);
}
.energy-card figure { border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08); margin: 0; }
.energy-card figure img { 
  transition: transform 0.7s ease; 
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4/3 !important;
  object-fit: cover !important;
}
.energy-card:hover figure img { transform: scale(1.03); }
h3.energy-stage-title { color: #1a202c !important; font-weight: 800 !important; font-size: 2rem !important; }
.energy-card p { color: #4a5568 !important; line-height: 1.7 !important; font-size: 1.15rem !important; }
.energy-card .wp-block-column { transition: none !important; }
.energy-card .wp-block-column:hover { transform: none !important; box-shadow: none !important; }
@media (max-width: 768px) {
  .energy-card { padding: 30px; border-radius: 20px; text-align: center; }
}

/* === PROJECT CARDS (HOME) === */
.project-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  background: #fff;
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}
.project-card figure { margin: 0 !important; overflow: hidden; flex-shrink: 0; }
.project-card figure img {
  aspect-ratio: 1/1 !important;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: 16px 16px 0 0 !important;
  transition: transform 0.6s ease;
}
.project-content {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  padding: 24px 20px !important;
}
.project-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.5em;
}
.project-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.project-card:hover figure img { transform: scale(1.1); }

/* === MANUFACTURING PAGE === */
.manufacturing-section .wp-block-column,
.manufacturing-card .wp-block-column {
  transition: none !important;
}
.manufacturing-section .wp-block-column:hover,
.manufacturing-card .wp-block-column:hover {
  transform: none !important;
  box-shadow: none !important;
}

.manufacturing-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.04);
  padding: 48px;
  margin-bottom: 40px;
  border: 1px solid rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.manufacturing-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.07);
}

.manufacturing-divider {
  width: 80px;
  height: 3px;
  background: #2563eb;
  margin: 0 auto 40px auto;
  border-radius: 2px;
}

.manufacturing-section-alt {
  background-color: #f8fafc !important;
}

/* Gallery images - natural proportions */
.manufacturing-gallery img,
.manufacturing-section .manufacturing-gallery img {
  aspect-ratio: auto !important;
  max-height: 300px !important;
  object-fit: cover !important;
  width: 100% !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
  transition: transform 0.5s ease !important;
}
.manufacturing-gallery img:hover {
  transform: scale(1.03) !important;
}

/* Video blocks */
.manufacturing-section .wp-block-video,
.manufacturing-card .wp-block-video {
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
  margin-bottom: 8px !important;
}
.manufacturing-section .wp-block-video video,
.manufacturing-card .wp-block-video video {
  border-radius: 16px !important;
  width: 100% !important;
  display: block !important;
}

/* Vertical video wrapper - centered, constrained */
.video-portrait {
  max-width: 280px !important;
  margin: 0 auto !important;
}
.video-portrait .wp-block-video video {
  max-height: 420px !important;
}

/* Video in 2-column layouts - uniform height */
.video-row-uniform .wp-block-columns {
  align-items: flex-start !important;
}

.manufacturing-section figcaption,
.manufacturing-card figcaption {
  display: block !important;
  text-align: center !important;
  margin-top: 10px !important;
  font-size: 0.85rem !important;
  color: #64748b !important;
}

.manufacturing-section h2[id] {
  scroll-margin-top: 80px;
}

@media (max-width: 768px) {
  .manufacturing-card { padding: 24px; border-radius: 16px; }
  .video-portrait { max-width: 100% !important; }
}

/* === SCROLL TO TOP === */
#ast-scroll-top {
  background-color: #0f172a !important;
  color: #fff !important;
  border-radius: 8px !important;
  transition: background-color 0.3s ease !important;
}
#ast-scroll-top:hover {
  background-color: #2563eb !important;
}

/* === GALLERY IMAGES === */
.wp-block-gallery.is-cropped .wp-block-image img {
  height: 250px !important;
  object-fit: cover !important;
}

/* === CUPCORN ECO DARK BLOCKS === */
.wp-block-group.has-white-color p, 
.wp-block-group.has-white-color h1, 
.wp-block-group.has-white-color h2, 
.wp-block-group.has-white-color h3, 
.wp-block-group.has-white-color h4,
.wp-block-group.has-white-color li, 
.wp-block-group.has-white-color strong {
  color: #ffffff !important;
}
