/* Canfield Contracting LLC - Main Styles */

:root {
    --primary: #1a1a1a;
    --accent: #F7C600;
    --accent-dark: #D4A900;
    --accent-light: #FFF3B8;
    --gray-dark: #333;
    --gray-mid: #666;
    --gray-light: #f5f5f5;
    --white: #ffffff;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--gray-dark);
    line-height: 1.6;
}

/* ========== HEADER / NAV ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #3a2f26;
    color: #ffffff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 90px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
    padding: 5px 0;
}

.logo img {
    height: 54px;
    width: 54px;
    object-fit: contain;
    background: #f5f0e8;
    border: 2px solid #d6c7b2;
    border-radius: 999px;
    padding: 6px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
    margin: 0;
    display: block;
}

/* Floating Logo */
.floating-logo,
#floatingLogo,
#logoWrapper {
    position: fixed !important;
    top: 10px;
    left: 213px;
    width: fit-content !important;
    height: fit-content !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0;
    margin: 0;
    z-index: 2000;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    pointer-events: auto;
    cursor: pointer;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Logo edit mode */
.logo-editing {
    outline: 2px dashed rgba(247, 198, 0, 0.8);
    cursor: move;
}

.logo-resize-handle {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border: 2px solid #3a2f26;
    border-radius: 50%;
    cursor: nwse-resize;
    display: none;
    z-index: 10;
}

.logo-editing .logo-resize-handle {
    display: block;
}

.floating-logo img,
#floatingLogo img,
#logoWrapper img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    background: transparent;
    border: none;
    border-radius: 50%;
    padding: 0;
    box-shadow: none;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    pointer-events: none;
    display: block;
}

nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    flex-wrap: nowrap;
    margin-left: auto;
    text-align: right;
}

nav a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #f2ede4;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #f7c600;
}

.nav-cta {
    background: var(--accent);
    color: var(--primary) !important;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 12px;
    transition: all 0.3s ease !important;
}

.nav-cta:hover {
    background: var(--accent-dark) !important;
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 28px;
    height: 3px;
    background: var(--white);
    transition: all 0.3s ease;
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    background-color: #1a1a1a;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.7)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(247,198,0,0.3);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 30px;
}

.hero-badge svg {
    width: 20px;
    height: 20px;
}

.hero-badge span {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    word-break: break-word;
    overflow-wrap: break-word;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
    margin-bottom: 35px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 16px 36px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(247,198,0,0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ========== SECTIONS ========== */
section {
    padding: 100px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.accent-line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 0 auto 20px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.section-header p {
    color: var(--gray-mid);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== SERVICES ========== */
.services {
    background: var(--gray-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.service-icon svg {
    width: 36px;
    height: 36px;
    stroke: var(--accent-dark);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 15px;
    text-transform: uppercase;
}

.service-card p {
    color: var(--gray-mid);
    font-size: 0.95rem;
}

/* ========== ABOUT ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--accent);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.about-badge .years {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--primary);
    line-height: 1;
}

.about-badge span {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.about-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 25px;
    text-transform: uppercase;
}

.about-content p {
    color: var(--gray-mid);
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-feature svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: var(--accent);
    border-radius: 50%;
    padding: 5px;
}

.about-feature span {
    font-size: 0.95rem;
    color: var(--gray-dark);
    font-weight: 500;
}

/* ========== GALLERY PREVIEW (Homepage) ========== */
.gallery {
    background: var(--primary);
    padding: 100px 20px;
}

.gallery .section-header h2 {
    color: var(--white);
}

.gallery .section-header p {
    color: rgba(255,255,255,0.7);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 20px;
    margin-bottom: 40px;
}

a.gallery-item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--accent);
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
}

.gallery-item:hover .gallery-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.gallery-cta {
    text-align: center;
}

/* ========== TESTIMONIALS ========== */
.testimonials {
    background: var(--gray-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.stars {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.testimonial-card p {
    color: var(--gray-mid);
    font-style: italic;
    margin-bottom: 25px;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 600;
}

.author-info strong {
    display: block;
    color: var(--primary);
    font-size: 1rem;
}

.author-info span {
    color: var(--gray-mid);
    font-size: 0.85rem;
}

/* ========== CONTACT ========== */
.contact {
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.contact-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--gray-mid);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
    flex-shrink: 0;
    margin-top: 3px;
}

.contact-item div strong {
    display: block;
    color: var(--primary);
    margin-bottom: 5px;
}

.contact-item div span,
.contact-item div a {
    color: var(--gray-mid);
    text-decoration: none;
}

.contact-item div a:hover {
    color: var(--accent-dark);
}

.contact-form {
    background: var(--primary);
    padding: 50px;
    border-radius: 8px;
}

.contact-form h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 30px;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full {
    grid-column: span 2;
}

.form-group label {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--primary);
    color: var(--white);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
}

/* ========== FOOTER ========== */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 80px 20px 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.footer-about .logo {
    margin-bottom: 25px;
    display: inline-block;
}

.footer-about .logo img,
.footer-logo img {
    height: 100px;
    width: 100px;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    border-radius: 50%;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.footer-social {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-social svg {
    width: 22px;
    height: 22px;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.footer-contact a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.footer-contact a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-bottom .footer-slogan {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent);
    letter-spacing: 1px;
    margin: 0;
}

.footer-slogan-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-social-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease;
}

.footer-social-inline:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-social-inline svg {
    width: 20px;
    height: 20px;
}

.footer-bottom .footer-description {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
    margin: 0 0 25px 0;
}

.footer-bottom .footer-copyright {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin: 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: var(--accent);
    text-decoration: none;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .about-badge {
        right: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 200px);
    }

    .gallery-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 90px;
        left: 0;
        right: 0;
        margin-left: 0;
        text-align: left;
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    
    nav a {
        color: var(--gray-dark);
    }

    nav.active {
        transform: translateY(0);
    }

    .mobile-toggle {
        display: flex;
    }

    .floating-logo,
    #floatingLogo,
    #logoWrapper {
        top: 6px !important;
        left: 10px !important;
        transform: none !important;
        margin: 0 !important;
        width: 110px !important;
        height: 110px !important;
    }

    .floating-logo img,
    #floatingLogo img,
    #logoWrapper img {
        width: 110px !important;
        height: 110px !important;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 60px 20px;
    }

    .section-header h2 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .gallery-item,
    .gallery-item:first-child {
        grid-column: span 1;
        grid-row: span 1;
        height: 250px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: span 1;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}

/* Desktop: header navigation right-aligned */
@media (min-width: 993px) {
    .header-inner {
        justify-content: flex-end;
    }
}

/* ========== ADMIN MODAL ========== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #1a1a1a;
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-small {
    max-width: 450px;
}

.modal-screen {
    padding: 30px;
}

.modal h2 {
    color: var(--accent);
    margin-bottom: 10px;
}

.modal p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 20px;
}

.modal input[type="text"],
.modal input[type="password"],
.modal select,
.modal textarea {
    width: 100%;
    padding: 12px 15px;
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons .btn {
    flex: 1;
}

.btn-secondary {
    background: #333;
    color: #fff;
    border: 1px solid #444;
}

.btn-secondary:hover {
    background: #444;
}

.btn-danger {
    background: #b33;
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: #c44;
}

.btn-full {
    width: 100%;
}

.error-message {
    color: #f66;
    font-size: 0.9rem;
    margin-top: 10px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #333;
}

.admin-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: #fff;
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    padding: 0 30px;
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    padding: 15px 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
    padding: 25px 30px;
}

.tab-content.active {
    display: block;
}

.admin-section {
    margin-bottom: 20px;
}

.admin-section h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.small-muted {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.admin-divider {
    border: none;
    border-top: 1px solid #333;
    margin: 25px 0;
}

.save-status {
    font-size: 0.9rem;
    margin-top: 10px;
    min-height: 20px;
}

.save-status.success {
    color: #5c5;
}

.save-status.error {
    color: #f66;
}

/* Admin Gallery Grid */
.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.gallery-admin-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.gallery-admin-item:hover {
    border-color: var(--accent);
}

.gallery-admin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-admin-item .category-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    right: 5px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 6px;
    border-radius: 4px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Categories List */
.categories-list {
    background: #222;
    border-radius: 8px;
    overflow: hidden;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: grab;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:active {
    cursor: grabbing;
    background: #2a2a2a;
}

.category-item .drag-handle {
    color: #666;
    margin-right: 12px;
}

.category-item .category-name {
    flex: 1;
    color: #fff;
}

.category-item .category-slug {
    color: #666;
    font-size: 0.8rem;
    margin-left: 10px;
}

.category-item .category-actions {
    display: flex;
    gap: 8px;
}

.category-item .category-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    font-size: 0.85rem;
}

.category-item .category-actions button:hover {
    color: var(--accent);
}

.category-item .category-actions .delete-btn:hover {
    color: #f66;
}

/* Photo Edit Modal */
.photo-edit-preview {
    width: 100%;
    max-height: 200px;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-edit-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

/* Mobile Admin Styles */
@media (max-width: 768px) {
    .modal {
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-screen {
        padding: 20px;
    }
    
    .admin-header {
        padding: 15px 20px;
    }
    
    .admin-tabs {
        padding: 0 15px;
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 12px 15px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .gallery-admin-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}
/* Mobile logo position override - force left alignment on small screens */
@media (max-width: 768px) {
    .floating-logo,
    #floatingLogo,
    #logoWrapper {
        left: 12px !important;
        top: 10px !important;
    }

    .mobile-toggle {
        display: flex !important;
        margin-left: auto !important;
    }

    .header-inner {
        justify-content: flex-end !important;
    }
}