/*
Theme Name: Osyat
Author: Osmaniye Yatırım A.Ş.
Description: Osmaniye Yatırım A.Ş. kurumsal web sitesi teması. Tam ekran ana sayfa videosu, açılır menü, Projeler bölümü ve Contact Form 7 uyumlu iletişim sayfası.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Update URI: false
Text Domain: osyat
*/
/* ---------- Base ---------- */
:root {
    --color-primary: #0b2545;
    --color-accent: #c8a15a;
    --color-text: #222;
    --color-muted: #6b7280;
    --color-bg-light: #f5f6f8;
    --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--color-text);
    line-height: 1.6;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

.section { padding: 64px 0; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    color: var(--color-primary);
}

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

.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Links and dropdown buttons share the same box so they line up */
.main-nav a,
.dropdown-toggle {
    display: inline-block;
    margin: 0;
    line-height: 1.6;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active,
.dropdown-toggle:hover,
.dropdown-toggle.active {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* ---------- Dropdown ---------- */
.has-dropdown { position: relative; }

.dropdown-toggle {
    background: none;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    font: inherit;
    font-weight: 500;
    color: inherit;
    cursor: pointer;
}

.dropdown-toggle::after {
    content: "▾";
    margin-left: 6px;
    font-size: 0.8em;
}

.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 200px;
    padding: 8px 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--color-accent);
}

.has-dropdown.open > .dropdown { display: block; }

.dropdown a {
    display: block;
    padding: 10px 16px;
    border-bottom: 0;
    white-space: nowrap;
}

.dropdown a:hover,
.dropdown a.active { background: var(--color-bg-light); }

@media (hover: hover) and (min-width: 901px) {
    .has-dropdown:hover > .dropdown { display: block; }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    }

    .main-nav.open { display: block; }

    .main-nav > ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 16px 16px;
    }

    .main-nav a,
    .dropdown-toggle { display: block; width: 100%; text-align: left; padding: 12px 0; }

    .dropdown {
        position: static;
        min-width: 0;
        padding: 0 0 8px 16px;
        box-shadow: none;
        border-top: 0;
    }

    .dropdown a { padding: 10px 0; }
    .dropdown a:hover,
    .dropdown a.active { background: none; }
}

/* ---------- Page hero ---------- */
.page-hero {
    background: var(--color-primary);
    color: #fff;
    padding: 80px 0;
}

.page-hero h1 { margin: 0; font-size: 2.5rem; }

.page-hero p {
    margin: 12px 0 0;
    max-width: 720px;
    font-size: 1.125rem;
    color: #cbd5e1;
}

/* Page with a banner photo (featured image or Banner Media cover image) */
.page-hero {
    position: relative;
    overflow: hidden;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero.has-banner {
    padding: 160px 0 72px;
}

.page-hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero.has-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(11, 37, 69, 0.85) 0%, rgba(11, 37, 69, 0.45) 55%, rgba(11, 37, 69, 0.25) 100%);
}

.page-hero.has-banner p { color: #e2e8f0; }

@media (max-width: 900px) {
    .page-hero.has-banner { padding: 110px 0 48px; }
}

/* ---------- Home page video ---------- */
.video-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 80px);
    min-height: calc(100svh - 80px);
    overflow: hidden;
    background: var(--color-primary);
    color: #fff;
}

.video-hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Darkens the video so the text stays readable */
.video-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 37, 69, 0.75) 0%, rgba(11, 37, 69, 0.35) 60%, rgba(11, 37, 69, 0.15) 100%);
}

.video-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.video-hero-content h1 {
    max-width: 800px;
    margin: 0;
    font-size: clamp(2.25rem, 5vw, 4rem);
    line-height: 1.1;
}

.video-hero-content p {
    max-width: 600px;
    margin: 20px 0 0;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: #e2e8f0;
}

.scroll-down {
    position: absolute;
    z-index: 1;
    bottom: 32px;
    left: 50%;
    width: 28px;
    height: 46px;
    margin-left: -14px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
}

.scroll-down::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: #fff;
    animation: scroll-down 1.8s ease-in-out infinite;
}

@keyframes scroll-down {
    0%   { transform: translateY(0); opacity: 1; }
    80%  { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-down::before { animation: none; }
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* ---------- Editable content (from the admin editor) ---------- */
.content > :first-child { margin-top: 0; }
.content > :last-child { margin-bottom: 0; }
.content h2, .content h3, .content h4 { color: var(--color-primary); line-height: 1.3; }
.content img { height: auto; border-radius: 4px; }
.content a { color: var(--color-primary); }

.content table {
    width: 100%;
    border-collapse: collapse;
}

.content td, .content th {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
}

/* ---------- Projects ---------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.project-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.project-body { padding: 20px; }

.project-body h3 {
    margin: 0 0 8px;
    color: var(--color-primary);
}

.project-body p { margin: 0; color: var(--color-muted); }

/* ---------- Contact details ---------- */
.contact-details {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.contact-details li { margin-bottom: 8px; }
.site-footer .contact-details { margin-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-primary);
    color: #cbd5e1;
    margin-top: 64px;
}

.site-footer .logo { color: #fff; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-top: 56px;
    padding-bottom: 40px;
}

.site-footer h4 {
    color: #fff;
    margin: 0 0 16px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--color-accent); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    font-size: 0.875rem;
}

.footer-bottom .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
}

.site-footer .legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.site-footer .legal-links li { margin: 0; }

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Contact form ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 48px;
}

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

.form-row { margin-bottom: 20px; }

.form-row label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font: inherit;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.error { color: #b91c1c; }

.alert {
    padding: 14px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success { background: #ecfdf5; color: #065f46; }
.alert-error   { background: #fef2f2; color: #991b1b; }


.btn {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    border: 0;
    padding: 14px 32px;
    font: inherit;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover { background: var(--color-accent); }

/* ---------- WordPress ---------- */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.skip-link:focus {
    z-index: 1000;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 12px 16px;
    clip: auto;
    background: #fff;
    color: var(--color-primary);
}

/* Keep the sticky header below the admin bar when logged in */
.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
    .admin-bar .site-header { top: 46px; }
}

@media (max-width: 600px) {
    .admin-bar .site-header { top: 0; }
}

.content .alignleft { float: left; margin: 0 24px 16px 0; }
.content .alignright { float: right; margin: 0 0 16px 24px; }
.content .aligncenter { margin-left: auto; margin-right: auto; }
.content figure { margin: 0 0 24px; }
.content figcaption { font-size: 0.875rem; color: var(--color-muted); }
.content::after { content: ""; display: table; clear: both; }

.muted { color: var(--color-muted); }

.post-list article + article { margin-top: 40px; }
.post-list h2 { margin: 0 0 4px; }
.post-list h2 a { text-decoration: none; color: var(--color-primary); }

/* ---------- Project cards and detail page ---------- */
.project-card a {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.project-card { transition: box-shadow 0.2s, transform 0.2s; }

.project-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.project-single { max-width: 900px; }

.project-single-image {
    width: 100%;
    height: auto;
    margin-bottom: 32px;
    border-radius: 6px;
}

.back-link { margin-top: 40px; }
.back-link a { color: var(--color-primary); }

/* ---------- Contact Form 7 ---------- */
.wpcf7-form-control-wrap { display: block; }

.wpcf7 .form-row select,
.wpcf7 .form-row input,
.wpcf7 .form-row textarea { width: 100%; }

.wpcf7-not-valid-tip {
    display: block;
    margin-top: 4px;
    font-size: 0.875rem;
    color: #b91c1c;
}

.wpcf7 form .wpcf7-response-output {
    margin: 20px 0 0;
    padding: 14px 16px;
    border: 0;
    border-radius: 4px;
}

.wpcf7 form.sent .wpcf7-response-output { background: #ecfdf5; color: #065f46; }

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output { background: #fef2f2; color: #991b1b; }

.wpcf7-spinner { vertical-align: middle; }