/* ==========================================================================
   Project: URIAB Photography Portfolio - Main Stylesheet
   Version: 1.0
   Description: This file contains global styles and styles for Home, 
                About, and Contact pages. Gallery styles are in gallery.css.
   ========================================================================== */

/* ==========================================================================
   1. Global & Base Styles
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #0a0a0a;
    color: #e0e0e0;
    margin: 0;
    line-height: 1.6;
}

a {
    color: #fff;
    text-decoration: none;
}

/* ==========================================================================
   2. Common Header & Navigation
   ========================================================================== */
.main-nav {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}
/* For pages other than homepage, the header gets a background and becomes sticky */
body:not(:has(.homepage-hero)) .main-nav {
    position: sticky;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
}

.logo a { 
    display: block; 
}
.logo img { 
    height: 40px; 
    width: auto; 
    display: block; 
}

.main-nav nav ul { 
    list-style: none; 
    display: flex; 
    margin: 0; 
    padding: 0; 
    gap: 10px;
}
.main-nav nav ul li a { 
    padding: 10px 15px; 
    border-radius: 5px; 
    transition: background-color 0.3s, color 0.3s; 
}
.main-nav nav ul li a:hover { 
    background-color: rgba(255, 255, 255, 0.1); 
}
.main-nav nav ul li a.active { 
    color: #888; /* Or any other style for active link */
    background-color: transparent;
}


/* ==========================================================================
   3. Page-Specific Styles (Homepage, About, Contact)
   ========================================================================== */

/* --- Homepage Styles --- */
.homepage-hero {
    height: 100vh;
    width: 100vw;
    background-image: url('../images/homepage-background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1;
}

.welcome-text, .category-boxes {
    position: relative;
    z-index: 2;
    text-align: center;
}

.welcome-text { margin-bottom: 40px; }
.welcome-text h2 { font-size: 3.5rem; margin-bottom: 10px; font-weight: 700; color: #fff; }
.welcome-text p { font-size: 1.2rem; color: #eee; opacity: 0.9; }

.category-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.category-box {
    width: 250px; height: 180px;
    overflow: hidden; position: relative;
    border-radius: 8px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* For vertical alignment of text */
    justify-content: center;
    align-items: flex-end; /* Align text to the bottom */
}
.category-box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.category-box img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.category-box:hover img { 
    transform: scale(1.08); 
}
/* New overlay for better text readability */
.box-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 60%);
    transition: background 0.4s ease;
}

.category-box:hover .box-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.1) 70%);
}

/* Container for all text elements */
.box-text {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.box-title {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
}

.box-tagline {
    font-size: 0.9rem;
    color: #ccc;
    margin: 5px 0 0 0;
    opacity: 0; /* Hidden by default */
    transform: translateY(10px); /* Start slightly lower */
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Reveal the tagline on hover */
.category-box:hover .box-tagline {
    opacity: 1;
    transform: translateY(0);
}

/* --- Content Page Styles (About, Contact) --- */
.content-page {
    padding: 120px 40px 60px;
    min-height: 80vh;
}
.page-container {
    max-width: 960px;
    margin: 0 auto;
}
.page-container h1 {
    font-size: 3rem; font-weight: 700; margin-bottom: 20px;
    text-align: center; color: #fff;
}
.page-container .subtitle {
    text-align: center; font-size: 1.1rem; color: #aaa;
    margin-top: -15px; margin-bottom: 50px;
}

.about-content { display: flex; align-items: center; gap: 50px; }
.about-photo { flex-basis: 40%; }
.about-photo img { width: 100%; border-radius: 8px; }
.about-text { flex-basis: 60%; }
.about-text h1 { text-align: left; }
.about-text p { font-size: 1.1rem; color: #ccc; line-height: 1.8; }

.contact-details { display: flex; justify-content: center; gap: 40px; margin-bottom: 50px; font-size: 1.1rem; }
.contact-item { display: flex; align-items: center; gap: 10px; }
.contact-item a { color: #ccc; transition: color 0.3s ease; }
.contact-item a:hover { color: #fff; }
.contact-item i { color: #888; }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form .form-group { display: flex; gap: 20px; }
.contact-form input, .contact-form textarea {
    width: 100%; background: #1c1c1c; border: 1px solid #444;
    color: #fff; padding: 15px; border-radius: 5px;
    font-size: 1rem; font-family: inherit; box-sizing: border-box;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #fff; }
.contact-form button {
    background-color: #fff; color: #111; border: none;
    padding: 15px 30px; font-size: 1rem; font-weight: bold;
    cursor: pointer; border-radius: 5px; align-self: center;
    transition: background-color 0.3s ease;
}
.contact-form button:hover { background-color: #ccc; }
.form-notice { text-align: center; font-size: 0.9rem; color: #777; margin-top: 15px; }


/* ==========================================================================
   4. Main Responsive Styles
   ========================================================================== */
@media (max-width: 992px) {
    .main-nav { padding: 20px; }
    .welcome-text h2 { font-size: 2.5rem; }
    .category-boxes { gap: 20px; }
    .category-box { width: 200px; height: 150px; }
}

@media (max-width: 768px) {
    .main-nav { flex-direction: column; gap: 20px; position: relative; padding: 20px; }
    body:not(:has(.homepage-hero)) .main-nav { position: static; }
    .about-content { flex-direction: column; text-align: center; }
    .about-text h1 { text-align: center; }
    .contact-form .form-group { flex-direction: column; }
    .contact-details { flex-direction: column; align-items: center; gap: 20px; }
}

@media (max-width: 576px) {
    .welcome-text h2 { font-size: 1.8rem; }
    .category-boxes { flex-direction: column; align-items: center; gap: 15px; }
    .category-box { width: 90%; max-width: 300px; height: 180px; }
}

/* ==========================================================================
   5. About Page Specific Styles
   ========================================================================== */

.about-grid {
    display: grid;
    /* Create two columns: the first is twice as wide as the second */
    grid-template-columns: 2fr 1fr;
    gap: 60px; /* Space between the two columns */
    align-items: start; /* Align items to the top of their grid area */
}

.about-main .about-photo {
    width: 100%;
    border-radius: 8px;
    overflow: hidden; /* Ensures the image respects the border-radius */
    margin-bottom: 30px;
}

.about-main .about-photo img {
    width: 100%;
    display: block;
}

.about-main h1 {
    text-align: left; /* Override the centered h1 from .page-container */
    font-size: 2.5rem;
    margin-top: 0;
}

.about-main .about-intro {
    font-size: 1.2rem;
    color: #e0e0e0; /* A slightly brighter color for the intro */
    line-height: 1.7;
}

.about-main p {
    font-size: 1.1rem;
    color: #ccc;
    line-height: 1.8;
}

/* Sidebar Styles */
.about-sidebar {
    background-color: #1a1a1a; /* A slightly different background */
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #333;
    position: sticky; /* Makes the sidebar stick on scroll */
    top: 120px; /* Distance from top (adjust based on header height) */
}

.about-sidebar h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

.about-sidebar .timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-sidebar .timeline li {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    position: relative;
}

/* Remove border from the last item */
.about-sidebar .timeline li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.about-sidebar .timeline li strong {
    display: block;
    color: #fff;
    font-weight: 600;
    margin-bottom: 5px;
}

.about-sidebar .timeline li span {
    display: block;
    color: #aaa;
    font-size: 0.95rem;
}


/* --- Responsive Adjustments for About Page --- */
@media (max-width: 992px) {
    .about-grid {
        /* Switch to a single column layout */
        grid-template-columns: 1fr;
    }

    .about-sidebar {
        /* Un-stick the sidebar on smaller screens */
        position: static;
        margin-top: 40px;
    }
}
/* ==========================================================================
   6. Contact Page Specific Styles
   ========================================================================== */

.contact-grid {
    display: grid;
    /* Create two equal columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 30px; /* Space between the cards */
    margin-top: 60px;
}

.contact-card {
    display: flex;
    align-items: center;
    background-color: #1a1a1a;
    border: 1px solid #333;
    padding: 30px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    background-color: #222;
    border-color: #555;
}

.contact-icon {
    font-size: 2.5rem; /* Icon size */
    margin-right: 25px;
    color: #aaa;
    transition: color 0.3s ease;
}

.contact-card:hover .contact-icon {
    color: #fff;
}

.contact-text h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: #fff;
}

.contact-text p {
    margin: 0;
    font-size: 1rem;
    color: #888;
    transition: color 0.3s ease;
}

.contact-card:hover .contact-text p {
    color: #aaa;
}


/* --- Responsive Adjustments for Contact Page --- */
@media (max-width: 768px) {
    .contact-grid {
        /* Switch to a single column layout on smaller screens */
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Admin Panel Specific Styles
   ========================================================================== */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: #1c1c1c;
    border-bottom: 1px solid #444;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}
.admin-nav span {
    font-weight: bold;
    color: #888;
}

.admin-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 15px;
}
.admin-nav ul a {
    color: #ccc;
    text-decoration: none;
}
.admin-nav ul a:hover {
    color: #fff;
}
/* ==========================================================================
   Admin Tag Suggestion Styles
   ========================================================================== */
.existing-tags-container {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #1c1c1c;
    border: 1px solid #444;
    border-radius: 5px;
}
.existing-tags-container label {
    display: block;
    margin-bottom: 10px;
    color: #aaa;
    font-weight: bold;
}
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-suggestion {
    display: inline-block;
    background-color: #444;
    color: #eee;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.tag-suggestion:hover {
    background-color: #555;
}
.tag-suggestion.used {
    background-color: #2ecc71;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.7;
}