/* ============================================
   MESOTYS — Public Showcase Styles
   Brand: #2B4C7E / #D72638 / Lato
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700;900&display=swap');

/* ===== Brand Tokens ===== */
:root {
    --brand: #2B4C7E;
    --brand-light: #3A6298;
    --brand-dark: #1E3A5F;
    --cta: #D72638;
    --cta-hover: #C01F30;
    --text-main: #1C1C1C;
    --text-muted: #555;
    --bg-main: #FFFFFF;
    --bg-light: #F8F9FA;
    --border-light: #E5E7EB;
    --font-public: 'Lato', sans-serif;
}

/* ===== Public Site Reset ===== */
#public-site {
    font-family: var(--font-public);
    color: var(--text-main);
    background: var(--bg-main);
    line-height: 1.7;
    font-size: 16px;
}

#public-site * {
    box-sizing: border-box;
}

/* ===== Public Header ===== */
.pub-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pub-header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--brand);
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.pub-header-logo img {
    height: 36px;
    width: auto;
}

.pub-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pub-nav a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.pub-nav a:hover,
.pub-nav a.active {
    color: var(--brand);
    background: rgba(43, 76, 126, 0.06);
}

.pub-nav-cta {
    background: var(--cta) !important;
    color: white !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    margin-left: 0.5rem !important;
    transition: background 0.2s, transform 0.2s !important;
}

.pub-nav-cta:hover {
    background: var(--cta-hover) !important;
    transform: translateY(-1px) !important;
}

.pub-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-main);
}

/* ===== Mobile Nav ===== */
@media (max-width: 768px) {
    .pub-nav {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .pub-nav.open {
        transform: translateY(0);
    }

    .pub-nav a {
        width: 100%;
        padding: 0.75rem 1rem;
    }

    .pub-mobile-toggle {
        display: block;
    }
}

/* ===== Public Content ===== */
.pub-content {
    padding-top: 72px;
    min-height: 100vh;
}

/* ===== Container ===== */
.pub-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Hero ===== */
.pub-hero {
    padding: 7rem 2rem 5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.pub-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.pub-hero h1 {
    font-size: 2.75rem;
    font-weight: 900;
    max-width: 700px;
    margin: 0 auto 1.25rem;
    letter-spacing: -1px;
    line-height: 1.15;
}

.pub-hero p {
    font-size: 1.15rem;
    opacity: 0.85;
    max-width: 500px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

.pub-hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.pub-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-family: var(--font-public);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.pub-btn-cta {
    background: var(--cta);
    color: white;
}

.pub-btn-cta:hover {
    background: var(--cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(215, 38, 56, 0.3);
}

.pub-btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.pub-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

.pub-btn-dark {
    background: var(--brand);
    color: white;
}

.pub-btn-dark:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
}

/* ===== Section ===== */
.pub-section {
    padding: 5rem 0;
}

.pub-section-alt {
    background: var(--bg-light);
}

.pub-section-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--brand);
    margin: 0 0 0.5rem;
    letter-spacing: -0.5px;
}

.pub-section-sub {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0 0 3rem;
    max-width: 600px;
}

.pub-section-center {
    text-align: center;
}

.pub-section-center .pub-section-sub {
    margin-left: auto;
    margin-right: auto;
}

/* ===== Cards Grid ===== */
.pub-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.pub-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.pub-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.pub-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0 0 0.5rem;
}

.pub-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* ===== Why Us Grid ===== */
.pub-why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .pub-why-grid {
        grid-template-columns: 1fr;
    }
}

.pub-why-item {
    text-align: center;
    padding: 2rem;
}

.pub-why-item .why-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--brand);
    color: white;
    font-weight: 900;
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}

.pub-why-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}

.pub-why-item p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== CTA Band ===== */
.pub-cta-band {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.pub-cta-band h2 {
    font-size: 1.75rem;
    font-weight: 900;
    margin: 0 0 0.75rem;
}

.pub-cta-band p {
    font-size: 1rem;
    opacity: 0.85;
    margin: 0 0 2rem;
    font-weight: 300;
}

/* ===== Alternating Sections (Services) ===== */
.pub-alt-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 0;
}

.pub-alt-section.reverse {
    direction: rtl;
}

.pub-alt-section.reverse>* {
    direction: ltr;
}

.pub-alt-img {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--brand);
}

.pub-alt-text h3 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--brand);
    margin: 0 0 1rem;
}

.pub-alt-text p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 0.75rem;
}

@media (max-width: 768px) {
    .pub-alt-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pub-alt-section.reverse {
        direction: ltr;
    }
}

/* ===== Gallery ===== */
.pub-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .pub-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pub-gallery {
        grid-template-columns: 1fr;
    }
}

.pub-gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pub-gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.pub-gallery-item .gallery-icon {
    font-size: 2.5rem;
    color: var(--brand);
    transition: transform 0.3s;
}

.pub-gallery-item:hover .gallery-icon {
    transform: scale(1.1);
}

.pub-gallery-item .gallery-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ===== Form ===== */
.pub-form {
    max-width: 640px;
    margin: 0 auto;
}

.pub-form-group {
    margin-bottom: 1.25rem;
}

.pub-form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.pub-form-input,
.pub-form-select,
.pub-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    font-family: var(--font-public);
    font-size: 0.92rem;
    color: var(--text-main);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.pub-form-input:focus,
.pub-form-select:focus,
.pub-form-textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(43, 76, 126, 0.1);
}

.pub-form-textarea {
    min-height: 120px;
    resize: vertical;
}

.pub-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .pub-form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== About / Approach Steps ===== */
.pub-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .pub-steps {
        grid-template-columns: 1fr;
    }
}

.pub-step {
    padding: 2rem;
    border-left: 4px solid var(--brand);
    background: var(--bg-light);
    border-radius: 0 12px 12px 0;
}

.pub-step .step-num {
    display: inline-block;
    background: var(--brand);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    text-align: center;
    line-height: 32px;
    font-weight: 900;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.pub-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 0.5rem;
}

.pub-step p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

/* ===== Quote Block ===== */
.pub-quote-block {
    background: var(--brand);
    color: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    margin: 3rem 0;
}

.pub-quote-block p {
    font-size: 1.2rem;
    font-weight: 300;
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== Footer ===== */
.pub-footer {
    background: #1C1C1C;
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 2rem;
}

.pub-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .pub-footer-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.pub-footer h4 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.pub-footer p {
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
    line-height: 1.6;
}

.pub-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.pub-footer a:hover {
    color: white;
}

.pub-footer-bottom {
    max-width: 1120px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
}

@media (max-width: 768px) {
    .pub-footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ===== Admin Link ===== */
.pub-admin-link {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s;
}

.pub-admin-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .pub-hero h1 {
        font-size: 1.75rem;
    }

    .pub-hero p {
        font-size: 1rem;
    }

    .pub-hero {
        padding: 5rem 1.5rem 3.5rem;
    }

    .pub-section {
        padding: 3rem 0;
    }

    .pub-section-title {
        font-size: 1.5rem;
    }

    .pub-cards {
        grid-template-columns: 1fr;
    }

    .pub-container {
        padding: 0 1.25rem;
    }
}

/* ===== Scroll Reveal ===== */
.pub-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.pub-reveal.pub-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Dark Mode Toggle Button ===== */
.pub-theme-btn {
    background: none;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    cursor: pointer;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    margin-left: 0.5rem;
}

.pub-theme-btn:hover {
    background: var(--bg-light);
}

/* ===== Dark Mode ===== */
[data-theme="dark"] #public-site {
    --text-main: #E4E4E7;
    --text-muted: #A1A1AA;
    --bg-main: #0F1117;
    --bg-light: #1A1C25;
    --border-light: #2A2D38;
}

[data-theme="dark"] .pub-header {
    background: rgba(15, 17, 23, 0.97);
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] .pub-nav a {
    color: var(--text-main);
}

[data-theme="dark"] .pub-nav a:hover,
[data-theme="dark"] .pub-nav a.active {
    background: rgba(43, 76, 126, 0.15);
}

[data-theme="dark"] .pub-card {
    background: var(--bg-light);
    border-color: var(--border-light);
}

[data-theme="dark"] .pub-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .pub-alt-img {
    background: var(--bg-light);
    border-color: var(--border-light);
}

[data-theme="dark"] .pub-step {
    background: var(--bg-light);
}

[data-theme="dark"] .pub-gallery-item {
    background: var(--bg-light);
    border-color: var(--border-light);
}

[data-theme="dark"] .pub-gallery-item:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .pub-form-input,
[data-theme="dark"] .pub-form-select,
[data-theme="dark"] .pub-form-textarea {
    background: var(--bg-light);
    border-color: var(--border-light);
    color: var(--text-main);
}

[data-theme="dark"] .pub-footer {
    background: #0A0B0E;
}

[data-theme="dark"] .pub-theme-btn {
    border-color: var(--border-light);
    color: var(--text-main);
}

[data-theme="dark"] .pub-theme-btn:hover {
    background: var(--bg-light);
}

/* Mobile nav dark mode */
@media (max-width: 768px) {
    [data-theme="dark"] .pub-nav {
        background: var(--bg-main);
        border-color: var(--border-light);
    }
}