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

:root {
    --primary: #1e3a5f;
    --primary-dark: #142a47;
    --accent: #d97706;
    --accent-dark: #b45309;
    --light: #f5f7fa;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --dark: #1f2937;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --tap-target: 44px;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 8px;
    background: var(--accent);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 4px;
    z-index: 2000;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 8px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

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

/* ===== Header ===== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 800;
}

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

.nav-list a {
    color: var(--dark);
    font-weight: 500;
    padding: 6px 0;
    position: relative;
    transition: var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--accent);
}

.nav-list a.active::after,
.nav-list a:hover::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--primary);
    width: var(--tap-target);
    height: var(--tap-target);
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    background-color: var(--light);
}

.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="false"] .icon-close { display: none; }

/* ===== Hero ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9), rgba(20, 42, 71, 0.85)),
                url('../images/placeholder-hero.jpg') center/cover no-repeat;
    background-color: var(--primary);
    color: var(--white);
    padding: 120px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    max-width: 720px;
    margin: 0 auto 30px;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    min-height: var(--tap-target);
    background-color: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    margin-left: 10px;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* ===== Page Header (interior pages) ===== */
.page-header {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.9), rgba(20, 42, 71, 0.85)),
                url('../images/placeholder-header.jpg') center/cover no-repeat;
    background-color: var(--primary);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

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

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    margin: 12px auto 0;
}

.section-title p {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== Services Grid ===== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: center;
}

.service-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.service-card .placeholder-img {
    height: 200px;
    background: linear-gradient(135deg, #94a3b8, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

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

.service-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--gray);
    margin-bottom: 16px;
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: var(--accent);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
    font-weight: 700;
}

/* ===== About / Two-column ===== */
.about-text h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 20px;
}

.about-text h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent);
    margin-top: 12px;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--gray);
}

.about-text ul {
    list-style: none;
    margin-top: 20px;
}

.about-text ul li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    color: var(--dark);
}

.about-text ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.placeholder-img-large {
    width: 100%;
    min-height: 400px;
    background: linear-gradient(135deg, #94a3b8, #475569);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
}

/* ===== Stats ===== */
.stats {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stats-grid.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stat-item h3 {
    font-size: 2.8rem;
    color: var(--accent);
    margin-bottom: 6px;
}

.stat-item p {
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* ===== Gallery (Works page) ===== */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.gallery-item .placeholder-img {
    height: 260px;
    background: linear-gradient(135deg, #94a3b8, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    transition: var(--transition);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(30, 58, 95, 0.9), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-overlay h4 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== Filter buttons (Works page) ===== */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 22px;
    background-color: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    color: var(--dark);
}

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

/* ===== Contact ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
}

.contact-info {
    background-color: var(--primary);
    color: var(--white);
    padding: 40px;
    border-radius: 8px;
}

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.contact-item-icon {
    width: 44px;
    height: 44px;
    background-color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
}

.contact-item-text strong {
    display: block;
    margin-bottom: 2px;
}

.contact-item-text {
    font-size: 0.95rem;
    opacity: 0.95;
    word-break: break-word;
}

.contact-item-text a {
    color: var(--white);
    transition: var(--transition);
}

.contact-item-text a:hover {
    color: var(--accent);
}

/* ===== Form ===== */
.contact-form {
    background-color: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    min-height: var(--tap-target);
    border: 1px solid var(--gray-light);
    border-radius: 6px;
    font-size: 16px; /* prevent iOS auto-zoom on focus */
    font-family: inherit;
    transition: var(--transition);
    background-color: var(--white);
    color: var(--dark);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

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

.form-privacy {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray);
}

.form-privacy input {
    width: auto;
    margin-top: 4px;
}

.form-message {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* ===== CTA ===== */
.cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 70px 0;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.cta p {
    margin-bottom: 24px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark);
    color: var(--gray-light);
    padding: 60px 0 20px;
}

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

.footer-col h4 {
    color: var(--white);
    margin-bottom: 18px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 8px;
}

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

.footer-col p,
.footer-col li {
    color: #9ca3af;
    font-size: 0.92rem;
    margin-bottom: 8px;
}

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

.footer-col ul li a {
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent);
}

.footer-fiscal {
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-fiscal strong {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* ===== Legal pages ===== */
.legal-content {
    max-width: 860px;
    margin: 0 auto;
}

.legal-content h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 36px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-light);
}

.legal-content h3 {
    color: var(--primary-dark);
    font-size: 1.15rem;
    margin: 22px 0 10px;
}

.legal-content p {
    margin-bottom: 14px;
    color: var(--dark);
}

.legal-content ul {
    list-style: disc;
    padding-left: 22px;
    margin-bottom: 16px;
    color: var(--dark);
}

.legal-content ul li {
    margin-bottom: 6px;
}

.legal-content a {
    color: var(--accent);
    text-decoration: underline;
    word-break: break-word;
}

.legal-content a:hover {
    color: var(--accent-dark);
}

/* ===== Cookie bar ===== */
.cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1500;
    background-color: var(--dark);
    color: var(--white);
    padding: 18px 22px;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    max-width: 980px;
    margin: 0 auto;
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.cookie-bar.visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-bar p {
    flex: 1 1 320px;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #e5e7eb;
}

.cookie-bar p a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 600;
}

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

.cookie-bar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-bar .btn {
    padding: 10px 22px;
    min-height: auto;
    font-size: 0.85rem;
    margin: 0;
}

.cookie-bar .btn-secondary {
    background-color: transparent;
    border: 2px solid var(--gray-light);
    color: var(--white);
}

.cookie-bar .btn-secondary:hover {
    background-color: var(--white);
    color: var(--dark);
    border-color: var(--white);
}

/* ===== Responsive ===== */

/* Tablet landscape & below */
@media (max-width: 960px) {
    .container {
        padding: 0 18px;
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid,
    .stats-grid.stats-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .section {
        padding: 70px 0;
    }
}

/* Tablet portrait / large phone */
@media (max-width: 720px) {
    .header-inner {
        padding: 14px 0;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 16px 20px;
        gap: 4px;
        box-shadow: var(--shadow);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-list.open {
        display: flex;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-list a {
        display: block;
        padding: 14px 8px;
        min-height: var(--tap-target);
        border-bottom: 1px solid var(--gray-light);
    }

    .nav-list a::after {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .grid-2,
    .contact-grid,
    .form-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .grid-3,
    .gallery,
    .stats-grid,
    .stats-grid.stats-grid-3,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 70px 0;
    }

    .hero h1 {
        font-size: 1.9rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        padding: 14px 24px;
    }

    .btn + .btn {
        margin-left: 0;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        margin-bottom: 36px;
    }

    .section-title h2,
    .page-header h1 {
        font-size: 1.7rem;
    }

    .contact-info,
    .contact-form {
        padding: 24px;
    }

    .gallery-item .placeholder-img {
        height: 220px;
    }

    .placeholder-img-large {
        min-height: 280px;
    }

    .stat-item h3 {
        font-size: 2.2rem;
    }

    .stats {
        padding: 50px 0;
    }

    .cta {
        padding: 50px 0;
    }

    .cta h2 {
        font-size: 1.6rem;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .cookie-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 16px 18px;
    }

    .cookie-bar-actions {
        width: 100%;
    }

    .cookie-bar .btn {
        flex: 1;
        width: auto;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }
    .logo {
        font-size: 1.2rem;
    }
    .logo-icon {
        width: 36px;
        height: 36px;
    }
    .hero {
        padding: 56px 0;
    }
    .hero h1 {
        font-size: 1.6rem;
    }
    .hero p {
        font-size: 0.95rem;
    }
    .page-header {
        padding: 60px 0;
    }
    .page-header h1 {
        font-size: 1.5rem;
    }
    .section-title h2 {
        font-size: 1.5rem;
    }
    .filter-buttons {
        gap: 8px;
    }
    .filter-btn {
        padding: 9px 16px;
        font-size: 0.9rem;
    }
    .gallery {
        gap: 14px;
    }
    .gallery-item .placeholder-img {
        height: 180px;
    }
    .service-card-content {
        padding: 20px;
    }
    .contact-info,
    .contact-form {
        padding: 20px;
    }
    .contact-info h3,
    .contact-form h3 {
        font-size: 1.25rem;
    }
}

/* Print */
@media print {
    .header,
    .menu-toggle,
    .footer,
    .cta,
    .filter-buttons,
    .form-privacy,
    .contact-form button {
        display: none !important;
    }
    .hero,
    .page-header {
        background: none !important;
        color: var(--dark) !important;
        padding: 20px 0;
    }
    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    body {
        color: #000;
    }
}
