/* ============================================
   Steady Compass - Mérnöki és Tanácsadói Iroda
   Main Stylesheet
   ============================================ */

/* --- Font Face: Sifonn Pro --- */
@font-face {
    font-family: 'Sifonn Pro';
    src: url('../assets/fonts/SIFONN_PRO.woff2') format('woff2'),
         url('../assets/fonts/SIFONN_PRO.woff') format('woff'),
         url('../assets/fonts/SIFONN_PRO.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- CSS Variables (Brand Colors) --- */
:root {
    --color-blue: #004A71;
    --color-blue-dark: #003353;
    --color-green: #005B52;
    --color-green-light: #007a6e;
    --color-light-gray: #E8EDEF;
    --color-white: #FFFFFF;
    --color-black: #1a1a1a;
    --color-dark: #0d2b3b;
    --color-text: #333333;
    --color-text-light: #666666;

    --font-header: 'Sifonn Pro', 'Georgia', serif;
    --font-body: 'Nunito', 'Segoe UI', sans-serif;

    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
    background: var(--color-dark);
    min-height: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-white);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.2rem; }

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-green);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.inline-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--color-blue);
    color: var(--color-white);
    border-color: var(--color-blue);
}

.btn-primary:hover {
    background: var(--color-blue-dark);
    border-color: var(--color-blue-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 113, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--color-blue);
    border-color: var(--color-blue);
}

.btn-outline:hover {
    background: var(--color-blue);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 113, 0.3);
}

.btn-green {
    background: var(--color-green);
    color: var(--color-white);
    border-color: var(--color-green);
}

.btn-green:hover {
    background: var(--color-green-light);
    border-color: var(--color-green-light);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 91, 82, 0.3);
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 43, 59, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(13, 43, 59, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo */
.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-img-texted {
    height: 40px;
    width: auto;
    display: block;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-list a {
    display: block;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-list a.active {
    background: var(--color-green-light);
    color: var(--color-white);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 24px 0;
    background: var(--color-light-gray);
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.hero-video-wrapper {
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 550 / 268;
}

.hero-video {
    width: 100%;
    max-width: 550px;
    height: 100%;
    display: block;
    object-fit: cover;
    margin: 0;
}


/* Screen-reader only (SEO h1) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   HERO BUTTONS
   ============================================ */
.hero-buttons {
    background: var(--color-light-gray);
    padding: 24px 0 48px;
    text-align: center;
}

.btn-hero-primary {
    background: var(--color-green);
    color: var(--color-white);
    border-color: var(--color-green);
}

.btn-hero-primary:hover {
    background: var(--color-green-light);
    border-color: var(--color-green-light);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 91, 82, 0.3);
}

.btn-hero-outline {
    background: transparent;
    color: var(--color-blue);
    border-color: var(--color-blue);
}

.btn-hero-outline:hover {
    background: var(--color-blue);
    color: var(--color-white);
    border-color: var(--color-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 74, 113, 0.3);
}

/* ============================================
   CONTACT LOGO
   ============================================ */
.contact-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 1.5rem;
    display: block;
}

/* Page Hero (inner pages) */
.page-hero {
    position: relative;
    padding: 140px 24px 60px;
    text-align: center;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-blue) 100%);
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../assets/images/hero-bg.webp') center/cover no-repeat;
    opacity: 0.1;
    z-index: 0;
}

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

.page-hero h1 {
    color: var(--color-white);
    font-size: 2.6rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--color-light-gray);
}

/* --- Homepage Service Preview Cards --- */
.service-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--color-white);
    border-radius: 12px;
    padding: 36px 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-blue);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
    background: var(--color-green);
    height: 5px;
}

.service-card-icon {
    width: 52px;
    height: 52px;
    background: var(--color-light-gray);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: inherit;
    flex-shrink: 0;
}

.service-card h3 {
    font-size: 1.3rem;
    margin: 0;
    line-height: 1.3;
    color: inherit;
}

.service-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.service-card .btn {
    font-size: 0.9rem;
    padding: 8px 24px;
}

/* --- About / Content Pages --- */
.content-page {
    max-width: 800px;
    margin: 0 auto;
}

.content-page h2 {
    margin-top: 2.5rem;
    color: var(--color-blue);
}

.content-page p {
    margin-bottom: 1.2rem;
    color: var(--color-text);
}

.content-page ul {
    margin: 1rem 0 1.5rem 1.5rem;
}

.content-page li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

/* --- Responsive table wrapper --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

/* --- Services Detail Page --- */
.service-detail {
    padding: 40px 0;
    border-bottom: 1px solid var(--color-light-gray);
    scroll-margin-top: 80px;
}

.service-detail:last-child {
    border-bottom: none;
}

.service-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.service-detail-icon {
    width: 56px;
    height: 56px;
    background: var(--color-light-gray);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: inherit;
    flex-shrink: 0;
}

.service-card-icon svg,
.service-detail-icon svg {
    width: 26px;
    height: 26px;
}

.service-detail.section-alt .service-detail-icon {
    background: var(--color-white);
}

.service-detail.section-alt > p {
    color: #4a4a4a;
}

.service-detail.section-alt .service-list li {
    background: var(--color-white);
}

.service-detail h2 {
    margin-bottom: 0.2rem;
    color: inherit;
}

.service-detail > p {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.service-detail h3 {
    font-size: 1.1rem;
    color: var(--color-green);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.service-list li {
    padding: 10px 16px;
    background: var(--color-light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
}

.service-list li::before {
    content: '✓';
    color: var(--color-green);
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================
   QUOTE FORM
   ============================================ */
.quote-form {
    max-width: 640px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--color-blue);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-light-gray);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: var(--transition);
    background: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(0, 74, 113, 0.1);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group .required {
    color: #e74c3c;
    margin-left: 2px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

.form-submit {
    width: 100%;
    padding: 14px 32px;
    font-size: 1.05rem;
}

.form-success {
    display: none;
    text-align: center;
    padding: 40px;
    background: var(--color-light-gray);
    border-radius: 12px;
}

.form-success h3 {
    color: var(--color-green);
    margin-bottom: 0.5rem;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-info {
    padding: 0;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    background: var(--color-light-gray);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--color-blue);
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 22px;
    height: 22px;
}

.contact-info-item h3 {
    font-size: 0.9rem;
    color: var(--color-blue);
    margin-bottom: 2px;
}

.contact-info-item p {
    color: var(--color-text);
    font-size: 0.95rem;
}

.contact-map {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-light-gray);
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 350px;
    border: none;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 50px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-brand p {
    font-size: 0.9rem;
    margin-top: 12px;
    max-width: 320px;
    line-height: 1.7;
}

.footer-logo-img {
    height: 42px;
    width: auto;
}

.site-footer h4 {
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--color-green-light);
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-contact a:hover {
    color: var(--color-green-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a:hover {
    color: var(--color-white);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    /* Hamburger */
    .hamburger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(13, 43, 59, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px 0;
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-list {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .nav-list a {
        padding: 14px 16px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        margin: 0 12px;
        border-radius: 8px;
    }

    .nav-list a:last-child {
        border-bottom: none;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 64px 0 0;
        background: var(--color-light-gray);
    }

    .hero-content {
        max-width: 100%;
        padding: 0;
    }

    .hero-video-wrapper {
        width: 100%;
        aspect-ratio: 550 / 268;
    }

    .hero-video {
        max-width: 100%;
        width: 100%;
        height: 100%;
        margin: 0;
        object-fit: cover;
    }

    .page-hero h1 {
        font-size: 2rem;
    }

    /* Sections */
    .section {
        padding: 50px 0;
    }

    .service-preview-grid {
        grid-template-columns: 1fr;
    }

    .service-list {
        grid-template-columns: 1fr;
    }

    .quote-form {
        padding: 24px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .inline-buttons {
        flex-direction: column;
        align-items: center;
    }

    .inline-buttons .btn {
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }

    .service-card {
        padding: 24px 20px;
    }

    .service-detail-header {
        gap: 12px;
    }

    .container {
        padding: 0 16px;
    }
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 9999;
    background: rgba(13, 43, 59, 0.9);
    border-top: 2px solid var(--color-green);
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    overflow: hidden;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    overflow: hidden;
}

.cookie-banner-inner p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    flex: 1 1 300px;
}

.cookie-banner-inner p a {
    color: var(--color-green-light);
    text-decoration: underline;
}

.cookie-banner-inner p a:hover {
    color: var(--color-white);
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.btn-outline-dark {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-dark:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-color: var(--color-white);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .cookie-banner-inner p {
        font-size: 0.85rem;
        flex: unset;
    }

    .cookie-banner-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .cookie-banner-buttons .btn {
        width: 100%;
        text-align: center;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}