/* ============================================
   What Phil Thinks - Brand Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0d0628;
    --bg-secondary: #1a0a3e;
    --bg-card: #1e1045;
    --bg-card-hover: #2a1560;
    --accent-gold: #FFD700;
    --accent-orange: #FF8C00;
    --accent-green: #00D084;
    --accent-green-light: #2EE89E;
    --accent-neon: #00E5FF;
    --text-primary: #ffffff;
    --text-secondary: #b8b0d0;
    --text-muted: #8a80a8;
    --gradient-brand: linear-gradient(135deg, #FFD700, #FF8C00);
    --gradient-green: linear-gradient(135deg, #00D084, #2EE89E);
    --gradient-neon: linear-gradient(135deg, #00E5FF, #7B2FFF, #FFD700);
    --shadow-glow: 0 0 20px rgba(255, 215, 0, 0.15);
    --shadow-green-glow: 0 0 20px rgba(0, 208, 132, 0.2);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 24px;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-green);
}

/* --- Navbar --- */
.navbar {
    background: rgba(13, 6, 40, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    padding: 0.5rem 0;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13, 6, 40, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-logo {
    height: 50px;
    width: auto;
}

.navbar-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent-gold);
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--gradient-green);
    border-radius: 1px;
}

.dropdown-menu {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--radius-sm);
}

.dropdown-item {
    color: var(--text-secondary);
    padding: 0.5rem 1.5rem;
}

.dropdown-item:hover {
    background: var(--bg-card);
    color: var(--accent-gold);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 76px;
    background: var(--bg-primary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(123, 47, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-title .highlight {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 3px solid var(--accent-green);
    box-shadow: 0 0 30px rgba(0, 208, 132, 0.25), 0 0 60px rgba(0, 208, 132, 0.1);
    filter: drop-shadow(0 0 20px rgba(0, 208, 132, 0.15));
}

/* --- Buttons --- */
.btn-accent {
    background: var(--gradient-brand);
    color: var(--bg-primary);
    font-weight: 600;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
    color: var(--bg-primary);
}

.btn-outline-accent {
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-accent:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

/* --- Section Styles --- */
.section {
    padding: 6rem 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title .highlight {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 700px;
}

/* --- Service Cards --- */
.service-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.08);
    border-radius: var(--radius);
    padding: 2rem;
    height: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 208, 132, 0.3);
    box-shadow: var(--shadow-green-glow);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.service-card .card-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent-gold);
    font-weight: 500;
    font-size: 0.9rem;
}

.service-card .card-link:hover {
    color: var(--accent-green);
}

/* --- Stacked cards fix (prevents overlap when cards are in a single column) --- */
.service-card + .service-card,
.mb-4 > .service-card {
    height: auto;
}

.col-lg-4 .service-card {
    height: auto;
}

.cms-content .service-card {
    height: auto;
}

.cms-content .row {
    display: flex;
    flex-wrap: wrap;
}

.cms-content .col-lg-4,
.cms-content .col-lg-8 {
    display: flex;
    flex-direction: column;
}

.cms-content .col-lg-4 .service-card {
    flex: 0 0 auto;
}

/* --- Case Study --- */
.case-study {
    background: var(--bg-card);
    border: 1px solid rgba(0, 208, 132, 0.15);
    border-left: 3px solid var(--accent-green);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-top: 2rem;
}

.case-study h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.case-study .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tag {
    background: rgba(0, 208, 132, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(0, 208, 132, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- Image Gallery / Placeholders --- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.image-placeholder {
    background: var(--bg-card);
    border: 2px dashed rgba(0, 208, 132, 0.2);
    border-radius: var(--radius);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.image-placeholder:hover {
    border-color: rgba(0, 208, 132, 0.4);
}

.image-placeholder i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.gallery-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 215, 0, 0.1);
}

/* --- Page Header --- */
.page-header {
    padding: 8rem 0 4rem;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(123, 47, 255, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    position: relative;
}

.page-header .lead {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 700px;
    position: relative;
}

/* --- CMS Content --- */
.cms-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.cms-content h2 {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.cms-content h3 {
    color: var(--accent-gold);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.cms-content p {
    margin-bottom: 1rem;
}

.cms-content ul, .cms-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.cms-content li {
    margin-bottom: 0.5rem;
}

.cms-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1rem 0;
}

.cms-content a {
    color: var(--accent-gold);
    text-decoration: underline;
}

/* --- Contact Form --- */
.contact-form {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: var(--radius);
    padding: 2.5rem;
}

.form-control, .form-select {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 215, 0, 0.15);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus {
    background: var(--bg-secondary);
    border-color: var(--accent-gold);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* --- Alerts --- */
.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
    color: #7dcea0;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.3);
    color: #f1948a;
}

/* --- Footer --- */
.site-footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 2px solid rgba(0, 208, 132, 0.2);
}

.footer-logo {
    height: 60px;
    width: auto;
}

.footer-heading {
    color: var(--accent-green);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.text-light-muted {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-divider {
    border-color: rgba(255, 215, 0, 0.08);
    margin: 2rem 0;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* --- About Page --- */
.about-portrait {
    max-width: 100%;
    border-radius: var(--radius);
    border: 3px solid rgba(255, 215, 0, 0.2);
    box-shadow: var(--shadow-glow);
}

.qualification-list {
    list-style: none;
    padding: 0;
}

.qualification-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.08);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qualification-list li i {
    color: var(--accent-green);
    font-size: 1.2rem;
}

/* --- Admin Styles --- */
.admin-wrapper {
    padding-top: 76px;
    min-height: 100vh;
}

.admin-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
    padding: 1rem 0;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.admin-table {
    color: var(--text-secondary);
}

.admin-table th {
    color: var(--accent-gold);
    border-color: rgba(255, 215, 0, 0.1);
    font-weight: 600;
}

.admin-table td {
    border-color: rgba(255, 215, 0, 0.08);
    vertical-align: middle;
}

.badge-unread {
    background: var(--accent-orange);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

.message-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.08);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.message-card.unread {
    border-left: 3px solid var(--accent-gold);
}

.message-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* --- Login Page --- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-card h1 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

/* --- Responsive --- */

/* Tablet */
@media (max-width: 991px) {
    .hero {
        min-height: auto;
        padding: 7rem 0 4rem;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content .d-flex {
        justify-content: center;
    }

    .hero-image {
        max-width: 70%;
        margin-top: 2rem;
    }

    .service-card {
        height: auto;
    }

    .cms-content .row {
        flex-direction: column;
    }

    .cms-content .col-lg-4 {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .cms-content .col-lg-4 .service-card {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 250px;
    }

    .cms-content .col-lg-4 .service-card.mb-4 {
        margin-bottom: 0 !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 3rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-image {
        max-width: 80%;
    }

    .section {
        padding: 3.5rem 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .page-header {
        padding: 5.5rem 0 2.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header .lead {
        font-size: 1rem;
    }

    .image-gallery {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .nav-logo {
        height: 40px;
    }

    .btn-accent, .btn-outline-accent {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .about-portrait {
        max-width: 250px;
        margin: 0 auto 2rem;
        display: block;
    }

    .footer-logo {
        height: 45px;
    }

    .service-card {
        height: auto;
        padding: 1.5rem;
    }

    .service-card .icon {
        font-size: 2rem;
    }

    .service-card h3 {
        font-size: 1.15rem;
    }

    .case-study {
        padding: 1.5rem;
    }

    .case-study h3 {
        font-size: 1.15rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .cms-content .col-lg-4 {
        flex-direction: column;
    }

    .cms-content .col-lg-4 .service-card {
        flex: 1 1 100%;
        min-width: 0;
    }
}

/* Small mobile */
@media (max-width: 576px) {
    .hero {
        padding: 5rem 0 2.5rem;
    }

    .hero-title {
        font-size: 1.7rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-image {
        max-width: 90%;
        border-radius: 16px;
    }

    .section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .page-header {
        padding: 5rem 0 2rem;
    }

    .page-header h1 {
        font-size: 1.7rem;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    .case-study ul {
        padding-left: 1rem;
    }

    .tags {
        gap: 0.4rem;
    }

    .tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }

    .contact-form {
        padding: 1.25rem;
    }

    .qualification-list li {
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }

    .site-footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }
}
