/* ===========================
   General Reset & Typography
=========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

/* ===========================
   Header & Navigation
=========================== */
header {
    background-color: #2f3c92;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

header .logo {
    font-size: 2rem;
    margin-bottom: 10px;
}

header .tagline {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 20px;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.navbar .nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar .nav-links li a:hover {
    color: #ffdd59;
}

/* ===========================
   Section Styling
=========================== */
.section {
    background-color: white;     
    padding: 40px 20px;      
    margin: 30px auto;       
    border-radius: 10px;   
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
    max-width: 1000px;  
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ===========================
   Projects Grid
=========================== */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center; 
    padding-left: 0;
}

.project-card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 100%; 
    max-width: 700px;
    box-shadow: 0 3px 8px rgba(30, 52, 137, 0.4);
    text-align: center;
}

.project-card img {
    max-width: 100%;
    height: auto;
    margin-top: 15px;
    border-radius: 5px;
}

/* ===========================
   Contact Form
=========================== */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0;
}

form input[type="text"],
form input[type="email"],
form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

form input[type="submit"] {
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: #a0a6ad;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

form input[type="submit"]:hover {
    background-color: #357abd;
}

/* Contact form feedback messages with fade */
.form-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    display: none;
    opacity: 0;
    font-weight: bold;
    text-align: center;
    transition: opacity 0.5s ease;
}

.form-message.success {
    background-color: #4caf50;
    color: white;
}

.form-message.error {
    background-color: #f44336;
    color: white;
}

/* Highlight invalid input/textarea */
input.error-border, textarea.error-border {
    border: 2px solid #f44336 !important;
    box-shadow: 0 0 5px #f44336;
}

/* ===========================
   Footer
=========================== */
footer {
    background-color: #2f3c92;
    color: white;
    text-align: center;
    padding: 20px;
}

/* ===========================
   Responsive Design
=========================== */
@media (max-width: 768px) {
    .projects-grid {
        flex-direction: column;
        align-items: center;
    }

    .navbar .nav-links {
        flex-direction: column;
        gap: 15px;
    }
}

/* ===========================
   JS Feature Styling (Greeting Message)
=========================== */
#greeting-message {
    margin-top: 10px;
    font-size: 1.0rem;
    font-weight: bold;
    color: #ffdd59;
}

/* Temporary confirmation message */
.temp-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffdd59;
    color: #333;
    padding: 10px 20px;
    border-radius: 5px;
    display: none;
    font-weight: bold;
    z-index: 1001;

    /* Fade-in/out */
    opacity: 0;
    transition: opacity 1.0s ease;
}


/* Modal Background */
.modal {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

/* Modal Box */
.modal-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    width: 300px;
    animation: fadeIn 0.4s ease;
}

/* Input */
.modal-content input {
    padding: 8px;
    width: 90%;
    margin-top: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Button */
.modal-content button {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #2f3c92;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: #1e2a6b;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.close-btn:hover {
    color: red;
}

/* Needed so X positions correctly */
.modal-content {
    position: relative;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== Change Name Button Styling ===== */
#change-name-btn {
    margin-left: 10px;
    padding: 8px 16px;
    background-color: #ffdd59;
    color: #2f3c92;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#change-name-btn:hover {
    background-color: #2f3c92;
    color: #ffdd59;
}

/* ===========================
   Quote Section
=========================== */
#quote-box {
    background-color: #f0f4ff;
    border-left: 5px solid #2f3c92;
    padding: 20px 25px;
    border-radius: 8px;
    max-width: 700px;
}

#quote-text {
    font-size: 1.2rem;
    font-style: italic;
    color: #333;
    margin-bottom: 10px;
}

#quote-author {
    font-size: 1rem;
    font-weight: bold;
    color: #2f3c92;
    margin-bottom: 15px;
}

#new-quote-btn {
    padding: 10px 20px;
    background-color: #2f3c92;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

#new-quote-btn:hover {
    background-color: #ffdd59;
    color: #2f3c92;
}

/* ===== Visit Timer ===== */
#visit-timer {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: bold;
    color: #ffdd59;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox.active {
  display: flex;
}

#lightbox-img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(255,255,255,0.1);
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.8rem;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
}