/*
Theme Name: Mauritius Bites Active
Text Domain: mauritius-bites
Version:5.0
Description: A modern, responsive theme for showcasing food spots in Mauritius.
Author: Ridj Bissessur
Author URI: https://ridj.uk
*/

/* Css Reset */
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* MY STYLE */

/* FONTS USED 

=======HEADINGS=======
Font Family: Baloo 2

=======TEXT=======
Font Family: Open Sans

*/

/* COLOUR SCHEME 

=======LIGHT MODE: ========
Background | Coconut Cream |	#FFF8F0 (light beige)
Heading/Text | Charcoal Black |	#333333
Accent Color 1	| Papaya Orange | #FF7F3F
Accent Color 2	| Lime Green |	#A5D615
CTA Button | Coral Red | #FF4D4D


=======DARK MODE: ========
Background | Deep Charcoal | #1C1C1C
Heading/Text | Coconut White |	#F5F5F5
Accent Color 1 | Mango Orange | #FF914D
Accent Color 2 | Lime Green |	#B2FF59
CTA Button | Sunset Red	| #FF6B6B

*/

/* ROOTS */

:root {
     --background-color: #fffaef;
    --heading-color: #333333;
    --text-color: #333333;
    --accent-color1:#a5d615;
    --accent-color2: #dc5f2e;
    --CTA-button-color: #ff7f3f;
    --card-background-color: #fffaef;
    --card-border-color: #e0e0e0;
    --card-hover-color: #fff0e5;
    --card-box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.dark-theme {
    --background-color: #1c1c1c;
    --heading-color: #f5f5f5;
    --text-color: #f5f5f5;
    --accent-color1: #ff914d;
    --accent-color2: #b2ff59;
    --CTA-button-color: #ff6b6b;
    --card-background-color: #1f1f1f;
    --card-border-color: #3c3c3c;
    --card-hover-color: #252424;
    --card-box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* GLOBAL STYLES */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 30px;
    transition: all 0.7s ease;
}

main {
    max-width: 1100px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6, a {
    font-family: 'Baloo 2', cursive;
    color: var(--heading-color);
    font-weight: 600;
}

h1, h2 {
    margin: 50px 0 30px 0;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
}

h3, h4, h5, h6 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 20px 0;
}

p, li, button, textarea, span, tr, td {
    font-family: 'Open sans', sans-serif;
    color: var(--text-color);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 2.2rem;
}

li::marker {
  font-size: 1.2em;
  color: var(--accent-color1);
}

a, a:link{
    text-decoration: none;
    padding: 12px;
}

a:hover, a:active, a:focus-visible,  a:focus {
    color: var(--accent-color2);
    transition: color 0.3s ease;
}

/* =============================ELEMENTS============================= */

/* SWITCH LM/DM */

.switch {
  display: block;
  --width-of-switch: 3.5em;
  --height-of-switch: 2em;
  --size-of-icon: 1.4em;
  --slider-offset: 0.3em;
  position: relative;
  width: var(--width-of-switch);
  height: var(--height-of-switch);
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #303136;
  transition: .4s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: var(--size-of-icon,1.4em);
  width: var(--size-of-icon,1.4em);
  border-radius: 20px;
  left: var(--slider-offset,0.3em);
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(40deg,#ff914d,#ff4d4d 70%);
  ;
  transition: .4s;
}

input:checked + .slider {
  background-color: #303136;
}

input:checked + .slider:before {
  left: calc(100% - (var(--size-of-icon,1.4em) + var(--slider-offset,0.3em)));
  background: #303136;
  box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #a3dafb;
}

/* Button */

.button-style {
  padding: 1.3em 3em;
  font-size: 14px;
  letter-spacing: 2.5px;
  font-weight: 600;
  color: var(--text-color);
  background-color: var(--CTA-button-color);
  border: none;
  border-radius: 45px;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease 0s;
  cursor: pointer;
  outline: none;
  margin: 20px auto;
  max-width: 150px;
}

.button-style:hover {
  background-color: var(--accent-color2);
  box-shadow: 0px 15px 20px rgba(5, 111, 69, 0.258);
  color: var(--background-color);
  transform: translateY(-3px);
}

.button-style:active {
  transform: translateY(3px);
}

/* CARD */

.cards, article {
    background-color: var(--card-background-color);
    border: 1px solid var(--card-border-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-box-shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

.card-hover:hover, article:hover {
    background-color: var(--card-hover-color);
    transition: all 0.3s ease-in-out;
    transform: translateY(-5px);
}

.card-image {
    margin: auto;
}

.card-image:hover {
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
}

/* =============================HEADER =============================*/

header {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 20px;
    gap: 10px;
}

.logo {
    width: clamp(80px, 20vw, 120px);
    height: auto;
}

.primary-nav ul {
    display: flex;
    gap: 20px;
}

/* =============================LANDING PAGE =============================*/

.intro {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    gap: 20px;
    max-width: 1100px;
}

.welcome {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome h1 {
    text-align: center;
}

.welcome p {
    max-width: 500px;
}

.image-hero img {
    display: block;
    margin: 20px auto;
    width: clamp(300px, 50vw, 500px);
    height: auto;
}

.food-heroimg img {
    display: block;
    margin: 20px auto;
    width: clamp(300px, 50vw, 500px);
    height: auto;
    border-radius: 50%;
}

/* =============================FOOD NAVIGATION============================= */

.food-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5%;
    flex-wrap: wrap;
}

.food-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: clamp(120px, 30vw, 200px);
    height: auto;
}

.food-icon-image {
    width: clamp(60px, 30vw, 120px);
    height: clamp(60px, 30vw, 120px);
    border-radius: 50%;
    margin-bottom: 10px;
}

.search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
}

/* =============================TRENDING============================= */

.trending-food {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px auto;
}
.foods{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    gap: 20px;
    max-width: 310px;
} 
.card-image {
    width: 200px;
    height: 200px;
    border-radius: 10px;    
}

/* =============================FOOTER =============================*/

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.footer-content h2,.footer-content ul,.footer-content li,.footer-content a,.footer-content p {
    font-size: clamp(1rem, 2vw, 1.3rem);
}

.footer-content ul li{
    padding: 9px;
}

.copyright {
    font-size: 1.0rem;
    text-align: center;
}

/* =============================ERROR PGE =============================*/

#error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap:20px;
    padding: 50px;
}

#error-page img {
    width: clamp(300px, 50vw, 600px);
    height: auto;
    margin: 30px auto;
}

/* =============================MEDIA QUERIES =============================*/
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 20px 110px;
    }
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 50px;
    }
}
