/* CSS DOCUMENT */

:root {
    --primary-orange: #F2AE30;
    --primary-white: #f5f5f5;
    --primary-text: rgb(43, 58, 13);
}
*,
html {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: none;
}
body {
    scroll-behavior: smooth;
}
body, p {
    font-family: "mr-eaves-modern", sans-serif;
    color: rgb(43, 58, 13);
}
h1, h2 {
    color: rgb(43, 58, 13);
    font-family: "Rozha-One";
    font-weight: 400;
}
h2 {
    margin-bottom: .5em;
    flex-basis: 100%;
    text-align: center;
}
h3 {
    display: flex;
    align-items: center;
    justify-content: center;

}
h3::before {
        content: "➛ ";
        color: var(--primary-orange);
        font-size: 250%;
        margin-inline-end: 5px;
        margin-block-end: -6px;
}
img {
    max-width: 100%;
}
form {
    gap: 2vw;
}
main ul {
    margin-inline-start: 1em;
    padding-inline-start: 0;
}
/* LOGO STYLING */
.logo {
    max-height: 13vh;
}
.logo-full-home {
    max-height: 25vh;
}
.logo-full-about {
    max-height: 14vh;
}
.logo-full-contact {
    max-height: 14vh;    
}
.logo-card {
    max-height: 16vh;
    /* opacity: .8; */
}
/* FORM STYLING */
form > input {
    background-color: #f5f5f5;
    border-radius: 3px;
    color: rgb(43, 58, 13);
    font-family: "mr-eaves-modern", sans-serif; 
    outline: none;
    padding: 3px;
}
form input:focus {
    outline: 1px solid rgb(43, 58, 13);
}
form > label {
    color: rgb(43, 58, 13);
}
.submit {
    background-color: rgb(43, 58, 13);
    border-radius: 3px;
    color: #f5f5f5;
    font-family: "mr-eaves-modern", sans-serif; 
    font-size: 1.5rem;
    margin-top: 10px;
    padding: 5px;
}
.submit:hover {
    background-color: rgb(119, 140, 77);
}
.contact-form {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1.5rem;

    input:not(.submit) {
        color: black;
        display: block;
        font-size: 1.25rem;
        margin-top: 3px;
        padding: 0.25rem;
        width: 100%;
    }
    label {
        font-size: 1.25rem;
    }
}
/* CSS GRID */
body > div {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(50px, auto));
    grid-template-areas: 
        "nav"
        "section" 
        "main"
        "footer";
}
/* LAYOUTS */
.menus-layout {
    background-image: none;
    background-color: #f5f5f5;

}
.gallery-layout {
    background-image: none;
    background-color: #f5f5f5;
    /* grid-column-start: 1;
    grid-column-end: span 1; */
}
.ordering-layout {
    background-image: none;
    background-color: #f5f5f5;
    h2 {
        margin: 0;
    }
}
.services-layout {
    background-image: none;
    background-color: #f5f5f5;
    padding: 0 0 24px 0;
    display: unset; 
}
/* layouts: main areas */
main.services-layout {
    .contact-info {
     padding: 20px;
    }
}
main.about-layout {
    li {
        text-align: left;
    }
}
section, main, footer {
    padding: 20px;
}
/* HEADER AREA STYLING */
header {
    grid-area: nav;
    background-color: rgb(227, 239, 203);
    color: rgb(43, 58, 13);
    display: flex;
    align-items: flex-start;
    padding: 10px 20px;
    h1 {
        font-size: 2.0rem;
        letter-spacing: 2px;
        line-height: 1;
        text-transform: uppercase;
        @media screen and (min-width: 768px) {
            font-size: 2.75rem;
        }
    }
}
.banner {
    font-size: 1.25em;
    color: rgb(43, 58, 13);
}
.is-hidden {
    display: none;
}
nav {
    font-family: "mr-eaves-modern", sans-serif;
    right: 0;
    transition: all .15s ease;
    z-index: 2;
    ul {
        list-style: none;
        padding: 0;
    }
}
input:checked ~ nav {
    max-height: 500px;
}
a {
    /* bg color set to inherit parent bg color */
    /* to fix css bug on a:visited bg color */
    background-color: inherit;
    color: rgb(43, 58, 13);
    text-decoration: none;
}
/* HOME PAGE STYLING */
section {
    background: url(images/mojito.png);
    background-position: 50%;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    grid-area: section;
    text-align: center;
}
section:before {
    opacity: .2;
}
main { 
    background-color: rgb(130, 137, 116); /* for browsers not supporting color gradients */
    background-image: linear-gradient(to bottom,  rgb(79, 83, 70), rgb(130, 137, 116), rgb(179, 188, 160), rgb(227, 239, 203)); 
    display: flex;
    flex-direction: column;
    height: auto;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}
main.home-layout {
    grid-area: main;
}
.motto {
    max-width: 5.8em;
}
.motto, .motto2 {
    font-weight: 700;
    line-height: 1.25;
    margin: 0 auto;
}
.book-today {
    border-radius: 6px;
    color: #f5f5f5;
    background-color: rgb(43, 58, 13);
    font-family: "mr-eaves-modern", sans-serif;
    font-weight: 400;
    padding: 9px 12px;
}
.book-today:hover {
    background-color: rgb(119, 140, 77);
}
/* ABOUT PAGE STYLING */
/* card styling */
.card {
    width: 300px;
    height: 300px;
    perspective: 500px;
  }
  .content {
    position: absolute;
    width: 100%;
    height: 100%;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    transition: transform 1s;
    transform-style: preserve-3d;
  }
  .card:hover .content {
    transform: rotateY( 180deg ) ;
    transition: transform .75s;
  }
  .front,
  .back {
    position: absolute;
    height: 100%;
    width: 100%;
    background: white;
    line-height: 35px;
    color: #3b1015;
    text-align: center;
    font-size: 1.5em;
    border-radius: 4px;
    backface-visibility: hidden;
    padding: 20px;
  }
  .back {
      color: white;
      background:#F2AE30;
      transform: rotateY( 180deg );
      ::marker {
          content: "➛ ";
      }
  }
  .back li.staff {
      font-size: 2rem;
      text-align: center;
  }
  .back h2 {
      color: white;
  }
  .staff {
      color: var(--primary-text);
      font-variant: small-caps;
      font-family: "Rozha-One";
      font-size: 1.75rem;
      letter-spacing: 1px;
  }
/* GALLERY PAGE STYLING */
main.gallery-grid {
    position: relative;
    font-weight: 700;
    figure {
        border-bottom: 9px solid transparent;

        &:hover {
            border-bottom-color: var(--primary-orange);
        }
    }
    /* fix browser whitespace "bug" */
    img {
        display: block;
    }
}
main.gallery-grid input {
    position: absolute;
    z-index: 1;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0;
}
main.gallery-grid img {
    transition: all 250ms ease-in; cursor: pointer;
    object-fit: cover;
    object-position: 50% 50%;
    height: 150px;
    width: 150px;
}
main.gallery-grid input:checked + img {
    transform: rotateY(180deg);
    opacity: .5;
}
main.gallery-grid p {
    opacity: 0;
    transition: all 250ms ease-in;
    font-size: 1.5em;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    text-align: center;
    margin: 0 12px;
    padding: 0;
}
main.gallery-grid input:checked ~ p {
    /* transform: rotateY(180deg); */
    transition: all 200ms ease-in;
    opacity: 1;            
}
.gallery-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(2, 150px);
    justify-content: center;
}
figure {
    margin: 0;
    overflow: hidden;
    position: relative;
}
/* lightbox styling */
.lightbox {
    align-items: end;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    padding: 1.25rem;
    img {
        padding: .5em;
        width: 100px;
        &:hover {
            outline: 2px dotted var(--primary-text);
        }
    }
}
.gallery-lightbox {
    grid-area: gallery-lightbox;
}
dialog {
    margin: 0;
    /* `margin: auto;` is the default. */
    padding: 1.25rem;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    text-align: center;
    button {
        background-color: white;
        color: var(--primary-text);
        cursor: pointer;
        font-family: "mr-eaves-modern", sans-serif;
        padding: 6px 10px;
        text-decoration: none;
        font-size: 1em;
        width: 100%;
        margin-block: 1.25rem;

        &:focus {
            outline: none;
        }
    }
    img {
        display: block;
        margin: 1.25rem auto;
        max-height: 50vh;
    }
    p {
        font-size: 200%;
    }
}
 /* SERVICES PAGE STYLING */
iframe {
    height: 100%;
    width: 100%;
}
.services-video {
    /* height: 0;
    margin: 0 0 24px 0;
    position: relative;
    padding: 56.25%; */
    height: auto;
    width: 100%;
}
.seahorse-video {
    aspect-ratio: 16 / 9;
    /* border: 0;
    height: 100%;
    left: 0; 
    position: absolute;
    top: 0;
    width: 100%; */
 }
.services-wrapper {
    margin: 2rem 1rem;
    h2 {
        color: var(--primary-text);
        font-family: "Rozha-One";
        letter-spacing: 1px;
    }
}
.services-box {
    padding: 1em;
    text-align: center;
    + & {
        border-top: 3px solid var(--primary-orange); 
    }
    h2 {
        margin-bottom: 9px;
        line-height: 1; 
    }
    p {
        margin-bottom: .5rem;
    }
    li {
        text-align: left;
        &::marker {
            content: "➛ ";
            color: var(--primary-orange);
        }
    }
    img {
        width: 50%;
    }
    .services-box + .services-box::before {
        content: "";
        background-color: var(--primary-orange);
        height: 2px; 
        width: 75%;
        display: block;
        margin: 0 auto 1.5rem;
    }
}
/* This attribute selector matches any element 
   that has a class beginning with 'menu' */
[class^="menu-"] {
    background-color: rgb(227, 239, 203);
    border: 1px solid rgb(119, 140, 77);
    border-radius: 3px;
    width: 14em;
    padding: 20px;

    h2 {
        color: var(--primary-text);
        font-variant: small-caps;
        font-family: "Rozha-One";
        font-size: 1.75rem;
        letter-spacing: 1px;
    }

    li {
        line-height: 1.25;
        /* "&" is replaced with the parent selector */
        &::marker {
            content: "➛ ";
        }
    }
}
/* ORDERING PAGE STYLING */
/* table styling */
table {
    border: 0; 
    border-radius: 4px;
    border-spacing: 0; /*removes distance between borders of adjacent cells */
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    margin: 20px auto 40px auto;
    overflow: hidden;  /* prevents background color from extending past rounded corners */
    padding: 0;
}
th {
    background: var(--primary-text);
    color: #f5f5f5;
    font-weight: bold;
    text-align: left;
}
th, td {
    padding: 8px 18px;
}   
tr:nth-child(even) {
    color: #f5f5f5;
    background-color: rgb(119, 140, 77);
}
/* CONTACT PAGE STYLING */
.contact-layout {
    background-image: none;
    background-color: #f5f5f5;
 }
 .contact-form {
     background-color: rgb(227, 239, 203);
     border: 1px solid rgb(119, 140, 77);
     border-radius: 3px;
     padding: 20px;
 }
/* contact page logo area styling */
.contact-p {
    margin-inline-start: 43px;
    margin-block-start: -17px;
}
.contact-info {
    color: var(--primary-text);
    flex: 1 100%;
}
/* FOOTER AREA STYLING */
footer {
    background-color: rgb(43, 58, 13);
    grid-area: footer;
    text-align: center;
}
.social {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;

    a {
        margin: 10px;
        padding: 0;
    }

    img {
        display: block;
        height: 20px;
    }
}
.copyright {
    color: #f5f5f5;
}
/* MEDIA QUERIES */
@media screen and (max-width: 959px) {
    header {
        justify-content: space-between;
    }

    div.nav {
        position:relative;

        label {
            cursor: pointer;
            display: inline-block;
            font-size: 2.5rem;
            line-height: 1;
            transition: all .15s ease;
        }
        input:checked + label {
            color: var(--primary-orange);
        }
    }
    nav {
        max-height: 0;
        overflow: hidden;
        position: absolute;

        ul {
            border: 1px solid #cecfd5;
            border-radius: 6px;
            list-style: none;
            margin: 8px 0 0 0;
            overflow: hidden; /* Prevents a background-color from 'bleeding' past rounded ul corners */
            padding: 0;
            width: 100px;
        }
        
        li {
            background-color: #fff;
            border-bottom: 1px solid #cecfd5;
            
            > a {
                display: block;
                padding: 6px 12px;            
            
                &:hover {
                    color:#FAF9F6;
                    background-color: rgb(87, 105, 50); /* for browsers not supporting color gradients */
                    background-color: rgb(119, 140, 77);      
                }
            }
        }
        li:last-child {
            border-bottom: 0;
        }
    }
    main.about-layout {
        /* on the about page, the main
           element should occupy the
           "section" area as well as 
           the main area
        */
        grid-row: 2 / span 2;
    }
    main.contact-layout {
        grid-row: 2 / span 2;
        display: flex;
        flex-direction: column;
        grid-area: main;
        height: auto;
        align-items: center;
        overflow: hidden;
        grid-row: 2 / span 2;
    }
    main.menus-layout {
        /* display: flex; */
        flex-direction: row;
        flex-wrap: wrap;
        /* grid-area: main; */
        grid-row: 2 / span 2;
        /* height: auto; */
        justify-content: center;
        /* overflow: hidden; */
    }
    main.ordering-layout {
        display: block;
        /* display: flex; */
        flex-direction: row;
        flex-wrap: wrap;
        /* grid-area: main; */
        grid-row: 2 / span 2;
        /* height: auto; */
        justify-content: center;
        /* overflow: hidden; */
    }
    main {
        &.gallery-layout, &.services-layout {
            grid-row: 2 / span 2;
        }
    }
    section {
        background-position: center;
    }
}
@media screen and (min-width: 960px) {
    body > div {
        display: grid;
        gap: 0;
        grid-template-columns: 1fr 30% 60% 1fr;
        grid-template-rows: repeat(3, minmax(100px, auto));
        grid-template-areas: 
            ". nav nav ."
            /* ". aside aside ." */
            ". section main ." 
            /* ". main main ." */
            ". footer footer .";
    }
    header {
        align-items: center;
        justify-content: space-between;

        h1 {
            margin-inline-start: 4vw;
        }
    }
    div.nav {
        margin-left:auto;

        label {
            display: none;
        }    
    }
    nav {
        ul {
            display: flex;
            gap: 1.5rem;
        }
        li {
            border-bottom-color: transparent;
            border-bottom-style: solid;
            border-bottom-width: 3px;
            font-size: 1.25rem;
            padding-block-end: 0.15rem;
    
            &.active {
                border-bottom-color: var(--primary-orange);
                font-weight: 600;
                a {
                    color: var(--primary-orange);
                }
            }
            &:not(.active):hover {
                border-bottom-color: var(--primary-text);
            }
        }
    }
    main.about-layout {
        flex-direction: row;
        justify-content: space-evenly;
        /* on the about page, the main
           element should occupy the
           "section" area as well as 
           the main area
        */
        grid-column-start: 2;
        grid-column-end: span 2;
        /* or in "shorthand" syntax:
        grid-column: 2 / span 2;
        */
    }
    body.gallery-page{
        margin-inline: auto;
        width: 90%
    }
    main.gallery-grid {
        gap: 40px;
        grid-template-columns: repeat(2, 200px);

        img {
            height: 200px;
            width: 200px;
        }
    }
    main.contact-layout {
        align-items: stretch;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 40px;
        padding: 40px;
        .contact-map {
            flex: 2;
        }
        .contact-info {
            flex: 1 100%;
        }
        a {
            text-decoration: underline;
        }
        a:hover {   
            color: var(--primary-orange);
        
        }
    }
    main.menus-layout {
        align-items: stretch;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 40px;
        grid-column-start: 2;
        grid-column-end: span 2;
        justify-content: center;
        padding: 40px;
    }
    main.ordering-layout {
            align-items: stretch;
            display: block;
            flex-direction: row;
            flex-wrap: wrap;
            gap: 40px;
            grid-column-start: 2;
            grid-column-end: span 2;
            justify-content: center;
            padding: 40px;
    }
    main {
        &.gallery-layout, &.services-layout, &.contact-layout {
            grid-column: 2 / span 2;
        }
    } 
    .services-wrapper {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    .services-box {
        border: 3px solid var(--primary-orange);
        border-radius: 2px;    
    }
    .services-box:nth-child(even) {
        border: 5px dotted var(--primary-orange);
    }
}