/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h2 {
    padding-left: 20px;
}

.full-width-footer {
    width: 100%;
    background: #333;
    color: #fff;
    text-align: center;
    padding: 15px 20px;
    margin-top: 60px;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333;
    font-size: 16px;
    background: #f7f7f7;
    transition: background 0.3s, color 0.3s;
    padding-top: 60px;
}

body.dark-mode {
    background: #121c26;
    color: #eaeaea;
}

body.dark-mode nav {
    background: #333;
}

body.dark-mode a {
    color: #3da9fc
}

body.dark-mode #dark-mode-toggle {
    color: #eaeaea;
}

body.dark-mode #menu-toggle {
    color: #eaeaea
}

body.dark-mode #menu-toggle:hover {
    color: #ffffff
}

body.dark-mode nav ul {
    background: #333;
    color: #eaeaea;
}

body.dark-mode nav ul li a {
    color: #eaeaea
}

header {
    text-align: center;
    padding: 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

nav {
    display: flex;
    justify-content: space-between; /* Ensures left and right elements stay apart */
    align-items: center;
    padding: 15px 20px;
    background: #EAEAEA;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0 auto; /* Centers the list on desktop */
    display: flex;
    gap: 20px;
}

nav ul li {
    display: inline-block;
}

nav ul.show {
    display: flex;
}

nav a {
    text-decoration: none;
    color: #333;
    /* margin: 0 10px; */
    font-weight: bold;
    font-size: 1rem;
    padding: 10px;
    transition: color 0.3s;
}

nav a:hover {
    color: #686868
}

/* Light mode */
nav a.active {
    color: #3da9fc;
    text-decoration: none;
}
  
  /* Dark mode */
body.dark-mode nav a.active {
    color: #ff6f61; 
    font-weight: bold;
    text-decoration: none;
}
  
body.dark-mode nav a:hover{
    color: #a3a3a3
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

button {
    /* padding: 12px 16px; */
    font-size: 1rem;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}

/* .portal-card {
    background-color: #ccc; 
    background-size: cover;
    background-position: center;
    height: 500px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    display: block;
    transition: transform 0.3s ease;
} */

.portal-card {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: unset;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.65), rgba(255,255,255,0.25));
    /* border: 1px solid rgba(124, 197, 178, 0.28); */
    border: none;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.portal-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.portal-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
}

body.dark-mode .portal-card {
    background:
        linear-gradient(135deg, rgba(18,28,38,0.75), rgba(18,28,38,0.35));
    border: 1px solid rgba(255, 111, 97, 0.22);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

#portal {
    padding: 60px 20px 80px;
    /* background:
        radial-gradient(circle at top left, rgba(124, 197, 178, 0.16), transparent 35%),
        radial-gradient(circle at bottom right, rgba(61, 169, 252, 0.10), transparent 40%); */
        
}

/* body.dark-mode #portal {
    background:
        radial-gradient(circle at top left, rgba(61, 169, 252, 0.18), transparent 35%),
        radial-gradient(circle at bottom right, rgba(255, 111, 97, 0.10), transparent 40%);
} */

.portal-card:hover .card-image {
    transform: scale(1.04);
    opacity: 0.95;
}

/* .overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 20px;
    text-align: center;
    transition: top 0.3s ease-in-out;
}

.portal-card:hover .overlay {
    top: 0;
} */

.overlay {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    top: auto;
    background: rgba(255, 255, 255, 0.68);
    color: #1f2933;
    padding: 20px;
    text-align: left;
    /* border-radius: 18px; */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    /* border: 1px solid rgba(255,255,255,0.35); */
    transition: transform 0.3s ease, background 0.3s ease;
    z-index: 2;
}

body.dark-mode .overlay {
    background: rgba(18, 28, 38, 0.72);
    color: #eaeaea;
    border: 1px solid rgba(255,255,255,0.10);
}

.portal-card:hover .overlay {
    transform: translateY(-4px);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 600px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
    }
}

@media (min-width: 768px) {
    #menu-toggle {
        display: none;
    }
    nav ul {
        display: flex;
        position: static;
        flex-direction: row;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    #menu-toggle {
        display: block; /* Now appears on mobile */
        order: -1; /* Ensures it's on the left */
        margin-right: auto; /* Pushes it to the left */
    }

    body {
        padding-top: 70px;
    }

    nav {
        padding: 10px 15px;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background: white;
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        text-align: center;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        padding: 10px 0;
    }

    #dark-mode-toggle {
        order: 1; /* Ensures it's always last */
    }

    /* .portal-card{
        height: 280px;
    } */
}

#menu-toggle {
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    /* display: none; Hidden on desktop */
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    transition: color 0.3s;
}

#dark-mode-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
    margin-left: auto; /* Pushes to the right */
}

footer {
    width: 100%;
    margin-top: 0px;
    text-align: center;
    padding: 10px;
    background: #333;
    color: #fff;
}

.full-width-footer {
    background: #333;
    color: #fff;
    margin-top: 60px;
}
  
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 20px;
    text-align: center;
}
  
  /* Dark Mode Overrides */
.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border-radius: inherit;
    /* border-top-left-radius: 10px;
    border-top-right-radius: 10px; */
}

/* Toggle container */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
  
  /* Hide the default checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
  
  /* The slider track */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}
  
  /* The slider knob */
.slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
  
  /* When the toggle is checked */
input:checked + .slider {
    background-color: #2196F3;
}
  
input:checked + .slider::before {
    transform: translateX(24px);
}

a.button {
    background-color: #7CC5B2;
    color: #0f0f0f;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-decoration: none;
    line-height: 1.2;
    height: auto;
    display: inline-block;
    min-height: 40px;
}
  
a.button:hover {
    background-color: #4BAF93;
    color: #0f0f0f;
}

body.dark-mode a.button {
    background-color: #ff6f61;
    color: #0F0F0F;
}

body.dark-mode a.button:hover {
    background-color: #DB8780;
    color: #0f0f0f;
}

.fidelity figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

 .prototype-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem; 
    margin-top: 1.5rem;
    justify-content: center;
}
  
.prototype-buttons .button {
    text-align: center;
    min-width: 140px;
    max-width: 220px;
    padding: 0.75em 1.25em;
    font-size: 1rem;
    line-height: 1.4;
    min-height: 44px;
    height: auto;
    box-sizing: border-box;
    margin-bottom: 1rem;
} 

@media (max-width: 500px) {
    .prototype-buttons {
        flex-direction: column;
        align-items: center;
    }

    .prototype-buttons .button {
        width: 90%;
        max-width: 300px;
        margin: 0 auto;
        font-size: 1rem;
        padding: 0.5em 1em;
        line-height: 1.2;
        height: auto;
        min-height: 40px;
    }
} 

.information {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    line-height: 1.8;
}

.information h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.information p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
  
.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
  
.contact-button i {
    font-size: 1.2rem;
}
  
  /* Light mode */
.contact-button {
    background-color: #7CC5B2;
    color: #0f0f0f;
}
  
.contact-button:hover {
    background-color: #4BAF93;
    color: #0f0f0f;
}
  
  /* Dark mode overrides */
body.dark-mode .contact-button {
    background-color: #FF6F61;
    color: #0f0f0f;
}
  
body.dark-mode .contact-button:hover {
    background-color: #DB8780;
    color: #0f0f0f;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #EAEAEA;
    border-radius: 10px;
    padding: 0.5rem 0;
    list-style: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1001;
}

.dropdown-menu li {
    display: block;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    color: #4BAF93;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    display: block;
}

body.dark-mode .dropdown-menu {
    background: #333;
}

body.dark-mode .dropdown-menu a {
    color: #eaeaea;
}

body.dark-mode .dropdown-menu a:hover {
    color: #ff6f61;
}

.portal-quote {
    text-align: center;
    margin-top: 3rem;
    padding-bottom: 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.8;
}

body.home-page {
    background:
        radial-gradient(circle at top left, rgba(124, 197, 178, 0.24), transparent 35%),
        radial-gradient(circle at bottom right, rgba(61, 169, 252, 0.16), transparent 40%),
        #f7f7f7;
}

body.home-page.dark-mode {
    background:
        radial-gradient(circle at top left, rgba(61, 169, 252, 0.18), transparent 35%),
        radial-gradient(circle at bottom right, rgba(255, 111, 97, 0.10), transparent 40%),
        #121c26;
}

header,
.hero,
#portal {
    background: transparent;
}