/*
Theme Name: EYDİ Otomasyon
Theme URI: https://eydiotomasyon.com
Author: EYDİ Otomasyon Elektrik Sanayi ve Ticaret Limited Şirketi
Description: EYDİ Otomasyon kurumsal web sitesi. pief.tr ile aynı mimari — tamamen WordPress blok editörü üzerinden düzenlenebilir bir tema, sayfa içerikleri koda gömülü değildir.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: eydi-otomasyon
*/

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); line-height: 1.15; color: var(--c-heading); }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); overflow: hidden; height: 1px; width: 1px; }

/* ---------- Brand tokens (logodan: turkuaz + turuncu) ---------- */
:root {
	--c-bg: #ffffff;
	--c-bg-alt: #f6f8fb;
	--c-surface: #ffffff;
	--c-heading: #14181c;
	--c-text: #3a4650;
	--c-text-muted: #67757f;
	--c-border: #e1e7ea;
	--c-brand: #1E9680;
	--c-brand-dark: #156b5c;
	--c-accent: #F6851F;
	--c-ink: #14181c;
	--c-ink-alt: #262f36;
	--c-radius: 16px;
	--c-shadow: 0 20px 50px rgba(20,24,28,.14);
	--font-heading: 'Sora', sans-serif;
	--font-body: 'Inter', sans-serif;
	--wrap: 1200px;
	--wrap-pad: 24px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--wrap-pad); }

/* ---------- Site chrome ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-border); }
.site-header.is-scrolled { box-shadow: 0 12px 30px rgba(20,24,28,.08); }
.topline { background: var(--c-ink); color: #cfd8dc; font-size: 13px; }
.topline .wrap { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.topline a { text-decoration: none; }
.topline__contacts { display: flex; gap: 22px; flex-wrap: wrap; }
.topline__right { display: flex; align-items: center; gap: 16px; }

/* Logo and icon cluster are pulled out of normal flow (absolutely positioned at the
   row's own left/right edges) so the search box — the only normal-flow child left —
   gets centered by plain auto-margins, independent of how wide either side is.
   NOTE: an absolutely positioned child's containing block is the padding BOX, so
   left:0/right:0 land flush with .wrap's own padding, not inset by it — hence
   left/right are set to --wrap-pad (matching .wrap's padding) instead of 0. */
.header-main { position: relative; min-height: 110px; display: flex; align-items: center; justify-content: center; }
.brand {
	position: absolute; left: var(--wrap-pad, 24px); top: 50%; transform: translateY(-50%);
	display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; text-decoration: none; color: var(--c-heading);
	overflow: hidden;
}
.brand img { height: 54px; width: auto; display: block; }

/* Logo üstünde periyodik parlama efekti — pief.tr ile aynı teknik. */
.brand::after {
	content: "";
	position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
	background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.75) 45%, transparent 90%);
	transform: skewX(-20deg);
	pointer-events: none;
	animation: eydi-logo-shine 3.2s ease-in-out infinite;
}
.brand:hover::after { animation-duration: .85s; animation-iteration-count: 1; }
@keyframes eydi-logo-shine {
	0% { left: -60%; }
	18% { left: 130%; }
	100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
	.brand::after { display: none; }
}

/* Search box — centered on the row, independent of the logo/icon zone widths. */
.eydi-search { flex: 0 0 auto; width: 100%; max-width: 560px; display: flex; align-items: stretch; }
.eydi-search input {
	flex: 1; min-width: 0; border: 1px solid var(--c-border); border-right: none; border-radius: 8px 0 0 8px;
	padding: 0 16px; font: inherit; font-size: 14px; background: var(--c-bg-alt); color: var(--c-text); height: 44px;
}
.eydi-search input:focus { outline: none; border-color: var(--c-brand); background: #fff; }
.eydi-search button {
	display: flex; align-items: center; gap: 6px; border: 0; border-radius: 0 8px 8px 0; padding: 0 18px;
	background: var(--c-brand); color: #fff; font-weight: 800; font-size: 13.5px; cursor: pointer; height: 44px;
	transition: background .2s ease;
}
.eydi-search button:hover { background: var(--c-brand-dark); }

.header-actions {
	position: absolute; left: calc(100% - var(--wrap-pad, 24px)); top: 50%; transform: translate(-100%, -50%);
	display: flex; align-items: center; gap: 12px;
}
.header-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--c-bg-alt); color: var(--c-heading); flex-shrink: 0; }
.header-icon:hover { background: var(--c-brand); color: #fff; }
.header-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--c-brand); color: #fff; padding: 11px 20px; border-radius: 8px; font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .2s ease, transform .2s ease; }
.header-cta:hover { background: var(--c-brand-dark); transform: translateY(-2px); }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--c-heading); }

/* Second row: primary nav, full width, under the logo/search/icons row */
.header-nav-row { border-top: 1px solid var(--c-border); }
.primary-nav { display: flex; }
.primary-menu { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; font-size: 14.5px; font-weight: 700; min-height: 48px; }
.primary-menu a { text-decoration: none; position: relative; padding: 6px 0; }
.primary-menu a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--c-brand); transition: right .3s cubic-bezier(.16,.84,.44,1); }
.primary-menu a:hover::after, .primary-menu .current-menu-item > a::after { right: 0; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--c-brand); }

/* ---------- "Ürün Grupları" mega-menü ---------- */
.primary-menu > li { position: relative; }
.eydi-mega-menu {
	/* Tetikleyici öğenin altına, SOLA hizalı açılıyor (ortalanmış değil) — merkezleme,
	   satırın sol tarafına yakın bir öğede paneli ekranın solundan taşırıyordu. */
	position: absolute; top: 100%; left: 0; transform: translateY(8px);
	width: min(720px, 92vw); background: #fff; border-radius: var(--c-radius); box-shadow: var(--c-shadow); border: 1px solid var(--c-border);
	padding: 30px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, transform .2s ease, visibility .2s;
	z-index: 60; display: flex; gap: 30px;
}
.primary-menu > li:hover > .eydi-mega-menu, .primary-menu > li:focus-within > .eydi-mega-menu {
	opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.eydi-mega-menu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; flex: 1; min-width: 0; }
.eydi-mega-menu__col-title {
	display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
	color: var(--c-heading); text-decoration: none; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--c-brand);
}
.eydi-mega-menu__col-title svg { flex-shrink: 0; color: var(--c-brand); }
.eydi-mega-menu__col-title:hover { color: var(--c-brand); }
.eydi-mega-menu__col ul { list-style: none; margin: 0; padding: 0; }
.eydi-mega-menu__col li { margin: 0; }
.eydi-mega-menu__col a {
	display: flex; align-items: center; justify-content: space-between; gap: 8px; border-radius: 7px;
	padding: 7px 8px; margin: 0 -8px; font-size: 13.5px; font-weight: 600; color: var(--c-text); text-decoration: none;
	transition: background .15s ease, color .15s ease;
}
.eydi-mega-menu__col a::after { content: "→"; opacity: 0; transform: translateX(-4px); transition: opacity .15s ease, transform .15s ease; color: var(--c-brand); flex-shrink: 0; }
.eydi-mega-menu__col a:hover { background: var(--c-bg-alt); color: var(--c-brand); }
.eydi-mega-menu__col a:hover::after { opacity: 1; transform: translateX(0); }

.eydi-mega-menu__aside { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.eydi-mega-menu__promo { background: var(--c-brand); color: #fff; border-radius: calc(var(--c-radius) - 6px); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.eydi-mega-menu__promo-tag { font-size: 15px; font-weight: 800; }
.eydi-mega-menu__promo p { margin: 0; font-size: 13px; color: rgba(255,255,255,.9); }
.eydi-mega-menu__promo-btn { margin-top: auto; background: #fff; color: var(--c-brand-dark); font-weight: 800; font-size: 13px; padding: 9px 14px; border-radius: 8px; text-decoration: none; text-align: center; }
.eydi-mega-menu__promo-btn:hover { background: var(--c-ink); color: #fff; }

.eydi-mega-menu__feature { position: relative; display: block; height: 170px; border-radius: calc(var(--c-radius) - 6px); overflow: hidden; text-decoration: none; background: #f3f5f4; }
.eydi-mega-menu__feature img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.eydi-mega-menu__feature:hover img { transform: scale(1.07); }
.eydi-mega-menu__feature-strip {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
	background: rgba(30,150,128,.9); backdrop-filter: blur(2px);
	padding: 9px 12px 10px; display: flex; flex-direction: column; gap: 2px;
}
.eydi-mega-menu__feature-strip b { color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.eydi-mega-menu__feature-strip span { color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.25; }

@media (max-width: 860px) {
	.eydi-search, .header-cta { display: none; }
	.nav-toggle { display: block; }
	.header-nav-row {
		position: absolute; top: 100%; left: 0; right: 0; background: #fff; box-shadow: var(--c-shadow); border-top: none;
		opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all .25s ease; pointer-events: none;
		max-height: calc(100vh - 100%); overflow-y: auto;
	}
	.primary-menu { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 24px 20px; }
	.primary-menu a { display: block; padding: 10px 0; }
	.site-header.menu-open .header-nav-row { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
	.topline__contacts a { display: none; }
	.topline__right span { display: none; }

	/* Ürün Grupları mega-menüsü: masaüstündeki hover panelinden farklı olarak, mobil
	   slide-down menüde her zaman açık, tek sütunlu, akordeon olmayan bir liste. */
	.eydi-mega-menu {
		position: static; opacity: 1; visibility: visible; pointer-events: auto; transform: none;
		box-shadow: none; border: none; border-top: 1px solid var(--c-border); border-radius: 0;
		margin: 6px 0 10px; padding: 14px 0 4px; display: block;
	}
	.eydi-mega-menu__grid { display: block; }
	.eydi-mega-menu__col { margin-bottom: 16px; }
	.eydi-mega-menu__aside { width: auto; margin-top: 4px; }
	.eydi-mega-menu__feature { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--c-ink); color: #b7c1c6; padding: 64px 0 26px; margin-top: 90px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; margin: 0 0 16px; font-size: 15px; letter-spacing: .02em; }
.site-footer ul { list-style: none; }
.site-footer li { margin: 10px 0; font-size: 14px; }
.site-footer a { text-decoration: none; color: #b7c1c6; }
.site-footer a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand img { height: 36px; width: auto; background: #fff; border-radius: 8px; padding: 6px 10px; }
.footer-desc { font-size: 14px; color: #8b979c; max-width: 320px; margin: 0 0 18px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--c-brand); }
.footer-note { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */
.eydi-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.eydi-reveal.in-view { opacity: 1; transform: none; }

/* =========================================
   EYDİ OTOMASYON - MARKALAR
   ========================================= */

.eydi-brand-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 40px 0;
}

.eydi-brand-tile {
    min-height: 120px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e8ebef;
    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.eydi-brand-tile:hover {
    transform: translateY(-4px);
    border-color: #d5dce3;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.eydi-brand-tile img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 65px;
    object-fit: contain;
}

.eydi-brand-tile span {
    font-size: 20px;
    font-weight: 700;
    color: #222;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 1100px) {

    .eydi-brand-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }

}


/* =========================================
   MOBİL
   ========================================= */

@media (max-width: 767px) {

    .eydi-brand-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 25px 0;
    }

    .eydi-brand-tile {
        min-height: 90px;
        padding: 15px;
        border-radius: 10px;
    }

    .eydi-brand-tile img {
        max-height: 50px;
    }

}


/* =========================================
   ÇOK KÜÇÜK MOBİL
   ========================================= */

@media (max-width: 380px) {

    .eydi-brand-grid {
        gap: 10px;
    }

    .eydi-brand-tile {
        min-height: 80px;
        padding: 10px;
    }

}
