/* ============================================================
   ARPHATECH — Base Stylesheet
   ============================================================ */

:root {
    /* Palette */
    --bg:            rgba(219, 219, 219, 0.452);
    --bg-secondary:  #F3F1EE;
    --surface:       #FFFFFF;
    --surface-alt:   #F7F5F2;
    --surface-hover: #EFEEEB;

    --text-primary:   #292D30;
    --text-secondary: #596168;
    --text-muted:     #858B8F;

    --border:       #E3E0DB;
    --border-light: #ECEAE6;

    --primary:       #3d5769;
    --primary-hover: #304550;
    --primary-soft:  #E9EEF0;

    --accent:       #D43A38;
    --accent-hover: #B92F2D;
    --accent-soft:  #F9E8E7;

    --success: #54805E;
    --warning: #B98232;
    --danger:  #C83B38;

    /* Layout */
    --navbar-height: 70px;
    --container-pad: clamp(1rem, 4vw, 2rem);
    --section-pad:   clamp(2rem, 6vw, 4rem);

    /* Motion */
    --transition: 0.2s ease;

    /* --------------------------------------------------------
       Typographic Scale
       -------------------------------------------------------- */
    --font-2xs:  0.75rem;   /* 12px */
    --font-xs:   0.8rem;    /* 12.8px */
    --font-sm:   0.875rem;  /* 14px */
    --font-base: 1rem;      /* 16px */
    --font-md:   1.125rem;  /* 18px */
    --font-lg:   1.25rem;   /* 20px */
    --font-xl:   1.5rem;    /* 24px */
    --font-2xl:  2rem;      /* 32px */
    --font-3xl:  2.5rem;    /* 40px */
}

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 56px;
    height: 56px;

    color: #FFFFFF;
    background-color: #25D366;
    border-radius: 50%;

    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;

    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                background-color 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08) translateY(-2px);
    background-color: #20BD5A;
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.55);
    color: #FFFFFF;
}

.whatsapp-float:active {
    transform: scale(0.96);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
}

.whatsapp-float::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: #25D366;
    opacity: 0.55;
    z-index: -1;
    animation: whatsappPulse 2s ease-out infinite;
}

@keyframes whatsappPulse {
    0%   { transform: scale(1);   opacity: 0.55; }
    70%  { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body.site-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    font-size: var(--font-base); /* Base font size */
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition);
}

a:hover { color: var(--primary-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   Navbar
   ============================================================ */
.site-navbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding-block: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: box-shadow var(--transition);
}

.site-navbar.is-scrolled {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.site-navbar__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: var(--font-lg); /* Was 1.25rem */
    color: var(--primary);
}

.site-navbar__logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}


/* Override Bootstrap's default dark toggler icon on light bg */
.site-navbar__toggler {
    border: 1px solid var(--border);
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    transition: background var(--transition);
}

.site-navbar__toggler:hover { background: var(--surface-hover); }

.site-navbar__toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.site-navbar__toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23292D30' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.site-navbar__links .nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-base); /* Standardized */
    padding: 0.5rem 0.9rem;
    background: transparent;
    position: relative;
    transition: color var(--transition);
}

.site-navbar__links .nav-link::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0.25rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
}

.site-navbar__links .nav-link:hover::after,
.site-navbar__links .nav-link.active::after {
    transform: scaleX(1);
}

.site-navbar__links .nav-link:hover,
.site-navbar__links .nav-link:focus,
.site-navbar__links .nav-link.active {
    color: var(--accent);
    background: transparent;
}

/* ============================================================
   Main Content
   ============================================================ */
.site-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
    padding-block: 0.5rem;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding-block: clamp(2rem, 4vw, 3rem) 1rem;
    color: var(--text-secondary);
    font-size: var(--font-sm); /* Was 0.9rem */
}

/* ---------- Grid layout ---------- */
.site-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ---------- Brand column ---------- */
.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-width: 320px;
}

.site-footer__logo {
    display: inline-block;
    transition: opacity var(--transition);
}

.site-footer__logo:hover { opacity: 0.85; }

.site-footer__logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.site-footer__tagline {
    font-size: var(--font-sm); /* Was 0.875rem */
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* ---------- Link columns ---------- */
.site-footer__col {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-footer__heading {
    font-size: var(--font-xs); /* Was 0.8rem */
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
}

.site-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.site-footer__list a {
    color: var(--text-secondary);
    font-size: var(--font-sm); /* Was 0.875rem */
    font-weight: 500;
    transition: color var(--transition), padding-left var(--transition);
}

.site-footer__list a:hover {
    color: var(--primary);
    padding-left: 4px;
}

/* ---------- Social icons ---------- */
.site-footer__social {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.site-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    background-color: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-secondary);

    transition: color var(--transition),
                background-color var(--transition),
                border-color var(--transition),
                transform 0.15s ease;
}

.site-footer__social a:hover {
    color: var(--surface);
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.site-footer__social svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ---------- Bottom bar ---------- */
.site-footer__bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    text-align: center;
}

.site-footer__copy {
    font-size: var(--font-xs); /* Was 0.8rem */
    color: var(--text-muted);
    margin: 0;
}

/* ============================================================
   Responsive — Tablet & below (≤ 991.98px)
   ============================================================ */
@media (max-width: 991.98px) {

    .site-navbar__links {
        padding-top: 1rem;
        gap: 0.25rem;
    }

    .site-navbar__links .nav-link {
        padding: 0.65rem 0.85rem;
    }

    /* Mobile dropdown card feel */
    .site-navbar .navbar-collapse {
        background: var(--surface);
        border-radius: 10px;
        margin-top: 0.5rem;
        padding: 0.5rem;
        border: 1px solid var(--border-light);
    }

    /* Footer — tablet landscape */
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.5rem;
    }

    .site-footer__brand {
        grid-column: 1 / -1;   /* brand takes full row */
        max-width: 100%;
    }
}

/* ============================================================
   Responsive — Tablet portrait (≤ 767.98px)
   ============================================================ */
@media (max-width: 767.98px) {

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem 1.25rem;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

/* ============================================================
   Responsive — Mobile (≤ 575.98px)
   ============================================================ */
@media (max-width: 575.98px) {

    .site-navbar__logo { height: 36px; }

    /* Footer — single column, centered */
    .site-footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.75rem;
    }

    .site-footer__brand {
        align-items: center;
        margin-inline: auto;
    }

    .site-footer__col {
        align-items: center;
    }

    .site-footer__social {
        justify-content: center;
    }

    .site-footer__list a:hover {
        padding-left: 0;
    }
    
    .whatsapp-float {
        bottom: 18px;
        right: 18px;
        width: 52px;
        height: 52px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .whatsapp-float::before {
        animation: none;
    }
    .whatsapp-float {
        transition: none;
    }
}