
/* =========================================
   YBY ENGINEERING CONSULTANCY PLC
   CORPORATE WEBSITE STYLESHEET
========================================= */

/* GENERAL SETTINGS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #172746;
    background: #ffffff;
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    transition: 0.3s ease;
}

/* =========================================
   HEADER AND CORPORATE LOGO
========================================= */

header {
    width: 100%;
    min-height: 82px;
    background: #071d49;
    color: #ffffff;
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 180px;
    height: 64px;
    overflow: hidden;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    display: block;
    width: 180px;
    height: 64px;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
}

/* NAVIGATION */

nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 18px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

nav a:hover {
    color: #f2b632;
}

/* =========================================
   HERO SECTION
========================================= */

.hero {
    min-height: 580px;
    background:
        linear-gradient(
            90deg,
            rgba(4, 22, 57, 0.96),
            rgba(8, 65, 125, 0.80)
        ),
        url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1800")
        center / cover no-repeat;

    display: flex;
    align-items: center;
    padding: 70px 8%;
    color: #ffffff;
}

.hero-content {
    max-width: 750px;
}

.tagline {
    color: #f2b632;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: 55px;
    line-height: 1.2;
    margin: 25px 0;
}

.hero-content > p:not(.tagline) {
    font-size: 19px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: #f2b632;
    color: #071d49;
    padding: 13px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    margin: 5px;
}

.btn:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
}

/* =========================================
   GENERAL SECTIONS
========================================= */

.section {
    padding: 75px 8%;
    text-align: center;
}

.section h2 {
    color: #071d49;
    font-size: 32px;
    margin-bottom: 25px;
}

.section > p {
    max-width: 850px;
    margin: 12px auto;
    color: #59677d;
}

/* =========================================
   SERVICES AND INFORMATION CARDS
========================================= */

.services {
    background: #f3f6fa;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.card {
    background: #ffffff;
    padding: 30px 22px;
    border-radius: 7px;
    border-bottom: 4px solid #f2b632;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.card h3 {
    color: #07529c;
    margin-bottom: 15px;
}

.card p {
    color: #657187;
    font-size: 14px;
}

/* =========================================
   INFORMATION TECHNOLOGY
========================================= */

.technology {
    background: #071d49;
    color: #ffffff;
}

.technology h2,
.technology h3 {
    color: #f2b632;
}

.technology p {
    color: #e0e9f5;
    margin: 15px auto;
}

/* =========================================
   CONTACT SECTION
========================================= */

.contact {
    background: #f3f6fa;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.contact-cards .card {
    padding: 28px 22px;
    text-align: center;
}

.contact-cards .card h3 {
    color: #07529c;
    font-size: 19px;
    margin-bottom: 12px;
}

.contact-cards .card p {
    color: #59677d;
    font-size: 14px;
    margin: 7px 0;
    overflow-wrap: anywhere;
}

.contact-cards .card strong {
    color: #071d49;
}

.contact-cards .card a {
    color: #07529c;
    text-decoration: none;
    font-weight: bold;
}

.contact-cards .card a:hover {
    color: #d99b16;
    text-decoration: underline;
}

/* =========================================
   CORPORATE FOOTER
========================================= */

footer {
    background: #04132f;
    color: #ffffff;
    text-align: center;
    padding: 40px 15px 25px;
}

footer h3 {
    color: #f2b632;
    margin-bottom: 10px;
    font-size: 20px;
}

footer p {
    font-size: 13px;
    margin: 7px;
}

.footer-contact {
    margin: 20px auto;
    line-height: 1.9;
}

.footer-contact p {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.footer-contact a {
    color: #f2b632;
    text-decoration: none;
    font-weight: bold;
}

.footer-contact a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 15px;
    margin-top: 20px;
    color: #c5d0df;
}

/* =========================================
   TABLET RESPONSIVENESS
========================================= */

@media (max-width: 900px) {

    header {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 3%;
    }

    .logo {
        justify-content: center;
        width: 170px;
        height: 58px;
    }

    .logo img {
        width: 170px;
        height: 58px;
        object-position: center;
    }

    nav {
        justify-content: center;
        gap: 14px;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero h1 {
        font-size: 42px;
    }
}

/* =========================================
   MOBILE RESPONSIVENESS
========================================= */

@media (max-width: 600px) {

    header {
        flex-direction: column;
        padding: 10px 3%;
        gap: 8px;
    }

    .logo {
        width: 155px;
        height: 52px;
    }

    .logo img {
        width: 155px;
        height: 52px;
    }

    nav {
        justify-content: center;
        gap: 10px 14px;
    }

    nav a {
        font-size: 11px;
    }

    .cards,
    .contact-cards {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 450px;
        padding: 55px 6%;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-content > p:not(.tagline) {
        font-size: 16px;
    }

    .section {
        padding: 50px 6%;
    }

    .section h2 {
        font-size: 27px;
    }

    footer h3 {
        font-size: 17px;
    }
}

/* =========================================
   ACCESSIBILITY AND SMALL SCREEN IMPROVEMENTS
========================================= */

html {
    scroll-padding-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* =========================================
   RESPONSIVE DESIGN
   Desktop, Laptop, Tablet and Mobile
========================================= */

/* Prevent horizontal overflow */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    width: 100%;
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* General responsive containers */
.container,
section,
.section {
    width: 100%;
    max-width: 100%;
}

section,
.section {
    padding-left: 5%;
    padding-right: 5%;
}

/* Header and navigation */
header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px 5%;
}

.logo img {
    width: 180px;
    max-width: 100%;
    height: 64px;
    object-fit: contain;
}

nav {
    max-width: 100%;
}

nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    padding: 0;
    margin: 0;
    list-style: none;
}

nav a {
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;
}

/* Hero section */
.hero {
    min-height: 480px;
    padding: 100px 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero h1 {
    font-size: clamp(30px, 5vw, 55px);
    line-height: 1.2;
}

.hero p {
    font-size: clamp(15px, 2vw, 20px);
    line-height: 1.7;
}

/* Responsive cards and service grids */
.cards,
.contact-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.card {
    min-width: 0;
    height: auto;
    overflow-wrap: anywhere;
}

.card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Buttons */
button,
.btn,
.button {
    max-width: 100%;
    cursor: pointer;
}

/* Contact details */
.contact-cards a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Footer */
footer {
    width: 100%;
    padding: 35px 5%;
}

.footer-contact {
    overflow-wrap: anywhere;
}

/* =========================================
   TABLETS
========================================= */

@media screen and (max-width: 1024px) {

    header {
        justify-content: center;
        text-align: center;
    }

    .logo img {
        width: 170px;
        height: 58px;
    }

    nav ul {
        gap: 14px;
    }

    .cards,
    .contact-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        min-height: 400px;
        padding: 75px 5%;
    }

    section,
    .section {
        padding-top: 55px;
        padding-bottom: 55px;
    }
}

/* =========================================
   MOBILE PHONES
========================================= */

@media screen and (max-width: 600px) {

    header {
        flex-direction: column;
        align-items: center;
        padding: 12px 4%;
        gap: 10px;
    }

    .logo img {
        width: 155px;
        height: 52px;
    }

    nav {
        width: 100%;
    }

    nav ul {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 14px;
    }

    nav li {
        margin: 0;
    }

    nav a {
        font-size: 13px;
        padding: 5px 2px;
    }

    .hero {
        min-height: 350px;
        padding: 65px 5%;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 15px;
    }

    section,
    .section {
        padding: 40px 5%;
    }

    section h2,
    .section h2 {
        font-size: 25px;
        line-height: 1.3;
    }

    .cards,
    .contact-cards {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card {
        width: 100%;
        padding: 20px;
    }

    .card h3 {
        font-size: 19px;
    }

    .card p {
        font-size: 14px;
        line-height: 1.7;
    }

    button,
    .btn,
    .button {
        width: 100%;
        text-align: center;
    }

    footer {
        padding: 30px 5%;
        text-align: center;
    }
}

/* Small mobile phones */
@media screen and (max-width: 360px) {

    .logo img {
        width: 140px;
        height: 48px;
    }

    nav a {
        font-size: 12px;
    }

    .hero h1 {
        font-size: 26px;
    }

    section h2,
    .section h2 {
        font-size: 22px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================
   YBY RESPONSIVE HAMBURGER MENU
===================================== */

.site-header {
    position: relative;
    z-index: 1000;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 40px;
    padding: 7px;
    border: none;
    border-radius: 5px;
    background: #07529c;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 4px auto;
    background: white;
    border-radius: 3px;
    transition: 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Tablet and mobile navigation */

@media screen and (max-width: 768px) {

    .site-header {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
        flex-shrink: 0;
    }

    .site-header nav {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        background: #ffffff;
        box-shadow: 0 5px 12px rgba(0,0,0,0.12);
        transition: max-height 0.35s ease,
                    opacity 0.25s ease,
                    visibility 0.25s ease;
    }

    .site-header nav.open {
        max-height: 450px;
        visibility: visible;
        opacity: 1;
    }

    .site-header nav ul {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 20px;
        margin: 0;
        list-style: none;
    }

    .site-header nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eeeeee;
    }

    .site-header nav ul li:last-child {
        border-bottom: none;
    }

    .site-header nav ul li a {
        display: block;
        padding: 13px;
        color: #123456;
        text-decoration: none;
        font-size: 15px;
    }
}

/* Desktop navigation */

@media screen and (min-width: 769px) {

    .nav-toggle {
        display: none;
    }

    .site-header nav {
        position: static;
        max-height: none;
        visibility: visible;
        opacity: 1;
        overflow: visible;
        background: transparent;
        box-shadow: none;
    }

    .site-header nav ul {
        display: flex;
        flex-direction: row;
    }
}
