:root{
    --firstColor: #424242;
    --secondColor: #eaeaea;
    --thirdColor: #5097ca;
    --fourthColor: rgba(80, 151, 202, 0.7);
}

body{
    background: var(--firstColor);
    color: var(--secondColor);
    font-family: Rubik, serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}
h1{
    font-size: xx-large;
    font-weight: 425;
    text-align: center;
}
h2{
    font-size: x-large;
    font-weight: normal;
    text-align: center;
    margin-bottom: 5px;
    margin-top: 5px;
}

h3.category-header {
    font-size: large;
    font-weight: normal;
    text-align: center;
    margin-bottom: 5px;
    margin-top: 20px;
    color: var(--secondColor);
}
.social-links{
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    margin: 10px;
    width: 90%;
}

div button-subcontainer{
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 15px;
}

button{
    font-family: inherit;
    font-optical-sizing: inherit;
    font-size: large;
    font-weight: inherit;
    color: var(--secondColor);
    background-color: var(--thirdColor);
    border: none;
    padding: 5px;
    text-align: center;
    text-decoration: none;
    margin: 4px 2px;
    border-radius: 5px;
    @media (pointer: none), (pointer: coarse) {
        font-size: 50px;
        border-radius: 10px;
    }
    transition: 0.3s;
    cursor: pointer;
}

button:hover {background-color: var(--fourthColor);}

.projectButtons{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}
.centeredFlex{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.grid-container {
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 60%;
    width: fit-content;
    background: var(--firstColor);
    mask-image:
            linear-gradient(to top, transparent, black 25px),
            linear-gradient(to bottom, transparent, black 25px),
            linear-gradient(to left, transparent, black 25px),
            linear-gradient(to right, transparent, black 25px);
    mask-composite: intersect;
    padding: 15px;
    line-height: 30px;
}
.grid-container div{
    padding: 5px 5px 5px;
    text-align: center;
    border-radius: 10px;
    min-width: 100px;
}

.grid-container i{
    font-size: 90px;
}

canvas{
    margin: 0;
    padding: 0;
    border: 3px solid var(--thirdColor);
}

.headerFlex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    position: relative;
}

/* Services Container Styles */
.services-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Service Category Styles */
.service-category {
    margin-bottom: 3rem;
}

.service-category h2 {
    color: var(--secondColor);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondColor);
}

/* Services Row Styles */
.services-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    width: 100%;
}

/* Responsive Design - Enhanced for mobile detection */
/* Portrait orientation - 2 columns regardless of device */
@media (orientation: portrait) {
    .services-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.75rem;
    }
}

/* Large tablet breakpoint */
@media (max-width: 1100px) and (orientation: landscape) {
    .services-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
}

/* Small tablet breakpoint */
@media (max-width: 850px) and (orientation: landscape) {
    .services-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile breakpoint - using multiple conditions for better detection */
@media (max-width: 600px),
       (hover: none) and (pointer: coarse) and (max-width: 850px) {
    .services-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Substantially increased font sizes for mobile */
    body {
        font-size: 22px;
    }

    h1 {
        font-size: 3.2rem;
    }

    h2 {
        font-size: 2.8rem;
    }

    h3 {
        font-size: 2.4rem;
    }

    .service-category h2 {
        font-size: 2.8rem;
    }

    .service-card h3 {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .service-card p {
        font-size: 1.7rem;
        line-height: 1.8;
        margin-top: 5px
    }

    .service-price {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }

    .service-price-note {
        font-size: 1.1rem; /* reduced from 1.5rem to make notes smaller on mobile */
    }

    button {
        font-size: 1.8rem;
        padding: 12px 20px;
    }

    .submit-button, .contact-button {
        font-size: 1.1rem;
        padding: 8px 14px;
    }

    .form-group label {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1.1rem;
        padding: 8px;
    }

    .contact-form {
        max-width: 95vw;
        padding: 10px;
    }

    .about-me p,
    .contact-info p {
        font-size: 1.7rem;
        line-height: 1.8;
    }

    .contact-method h4 {
        font-size: 1.2rem;
    }

    .contact-method p {
        font-size: 1.6rem;
    }

    .contact-link {
        font-size: 1.2rem;
    }

    .contact-form-container h3{
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .contact-form-container{

    }
}

/* Service Card Styles */
.service-card {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.service-card h3 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.service-price {
    color: #4da6ff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.service-card p {
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
    flex-grow: 1;
}


/* Header Flex Styles (if not already defined) */
.headerFlex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.headerFlex h1 {
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}
.headerFlex div{
    display: flex;
    flex-direction: row;
    gap: 15px;
}
.backgroundCanvas{
    margin: 0;
    padding: 0;
    position: fixed;
    z-index: -1;
    top: 0;
    left: 0;
    border: 0;
}
.eventTable{
    table-layout: fixed;
    border-collapse: collapse;
    border: 2px solid var(--thirdColor);
}
.eventTable th, td {
    border: 1px solid var(--thirdColor);
    collapse: collapse;
}
input{
    margin: 5px;
}
.loader {
    width: 30px;
    aspect-ratio: 2;
    --_g: no-repeat radial-gradient(circle closest-side,var(--secondColor) 90%,#0000);
    background:
            var(--_g) 0%   50%,
            var(--_g) 50%  50%,
            var(--_g) 100% 50%;
    background-size: calc(100%/3) 50%;
    animation: l3 1s infinite linear;
}
@keyframes l3 {
    20%{background-position:0%   0%, 50%  50%,100%  50%}
    40%{background-position:0% 100%, 50%   0%,100%  50%}
    60%{background-position:0%  50%, 50% 100%,100%   0%}
    80%{background-position:0%  50%, 50%  50%,100% 100%}
}
.horizontalFlex{
    display: flex;
    flex-direction: row;
    align-items: center;
}