/* Portfolio Styles */

/* Global Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Scrollbar styling to match home page */
::-webkit-scrollbar {
    width: 1px;
}

html {
    font-size: 14pt;
}

@media screen and (max-width: 1680px) {
    html {
        font-size: 12pt;
    }
}

@media screen and (max-width: 736px) {
    html {
        font-size: 11pt;
    }
}

@media screen and (max-width: 360px) {
    html {
        font-size: 9pt;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: "M PLUS Rounded 1c", sans-serif;
    color: #fff;
    background-color: #000;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('https://diigima.es/images/bg.jpg') bottom center/cover no-repeat fixed;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

body.bg-loaded::before {
    opacity: 1;
}

@supports (-webkit-overflow-scrolling: touch) {
    body::before {
        background-attachment: scroll;
    }
}

/* Wrapper with no bottom padding */
#wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 0 2rem;
    box-sizing: border-box;
    background: transparent;
}

/* Header styling */
header {
    text-align: center;
    margin-bottom: 2rem;
}

header img {
    max-width: 150px;
    width: 100%;
    height: auto;
    margin: 20px auto;
    display: block;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 600px) {
    header img {
        max-width: 100px;
    }

    header h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
}

@media (min-width: 981px) {
    #wrapper {
        padding-top: 8rem;
    }
    header img {
        display: none;
    }
}

/* Intermediate Desktop Breakpoint to prevent wrapping */
@media screen and (min-width: 981px) and (max-width: 1350px) {
    #wrapper {
        padding-top: 5rem !important;
    }
}

header p.header-lead {
    font-size: 1rem;
    color: #fff;
    max-width: 700px;
    margin: 0 auto 1rem auto;
    line-height: 1.4;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (max-width: 600px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

.portfolio-item {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.03);
}

.media-wrapper {
    position: relative;
    padding-top: 56.25%;
}

.media-wrapper media-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.info {
    padding: 1rem;
}

.info h2 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
    text-transform: uppercase;
}

.info p {
    font-size: 0.9rem;
    color: #ccc;
    margin: 0;
}

footer {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #333;
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.6);
}
