/* Custom CSS for Psychology Tas Website */

:root {
    /* Bright Logo inspired palette */
    --primary-color: #0e5ba9;      /* deep blue from logo */
    --secondary-color: #26a0da;    /* bright cyan/blue accent */
    --accent-color: #f4b942;       /* warm accent from logo tones */
    --text-dark: #1e2a36;
    --text-light: #6c757d;
    --text-blue: #7c7e7b;          /* custom blue text color RGB(124, 126, 123) */
    --bg-light: #f7fbff;
    --white: #ffffff;
    --footer-gray: #f7f8fa; /* lighter modern gray for footer */
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Logo Animation Preloader */
.logo-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoPreloaderFade 2.5s ease-in-out forwards;
}

.logo-animation {
    width: 80vw;
    height: 80vh;
    max-width: 800px;
    max-height: 800px;
    object-fit: contain;
    animation: logoFadeOut 4s ease-in-out forwards;
    animation-delay: 0.5s;
}

@keyframes logoFadeOut {
    0% {
        width: 80vw;
        height: 80vh;
        max-width: 800px;
        max-height: 800px;
        opacity: 1;
        transform: scale(1);
    }
    20% {
        width: 80vw;
        height: 80vh;
        max-width: 800px;
        max-height: 800px;
        opacity: 1;
        transform: scale(1);
    }
    100% {
        width: 80vw;
        height: 80vh;
        max-width: 800px;
        max-height: 800px;
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes logoPreloaderFade {
    0% {
        opacity: 1;
        visibility: visible;
    }
    80% {
        opacity: 1;
        visibility: visible;
    }
    100% {
        opacity: 0;
        visibility: hidden;
    }
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
    background: #ffffff !important; /* Match Bright Logo background */
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--text-blue) !important;
}

.brand-logo {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: none;
}

.brand-text {
    font-size: 1.35rem;
    color: var(--text-dark);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f7fbff 0%, #e7f3ff 100%);
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Reusable light hero background for other sections */
.bg-hero {
    background: linear-gradient(135deg, #f7fbff 0%, #e7f3ff 100%) !important;
}

.hero-image-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.hero-image-container img {
    transition: transform 0.3s ease;
    border: 4px solid var(--white);
}

.hero-image-container:hover img {
    transform: scale(1.02);
}

/* Typography */
.display-4, .display-5 {
    color: var(--text-dark);
    font-weight: 700;
}

.text-brand { color: var(--primary-color); }
.text-blue { color: var(--text-blue); }

.lead {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1e3f5f;
    border-color: #1e3f5f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-primary {
    color: var(--text-blue);
    border-color: var(--text-blue);
}

.btn-outline-primary:hover {
    background-color: var(--text-blue);
    border-color: var(--text-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-light {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--white);
}

.btn-light:hover {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* Cards */
.card {
    border-radius: 15px;
    transition: all 0.3s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--text-dark);
}

/* Sections */
section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--bg-light) !important;
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* About Section */
.about-image-container {
    position: relative;
}

.about-image-container img {
    transition: transform 0.3s ease;
}

.about-image-container:hover img {
    transform: scale(1.05);
}

/* Contact Section */
.contact-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.contact-item a:hover {
    text-decoration: underline !important;
}

/* Footer */
footer {
    background-color: var(--footer-gray) !important;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding-top: 100px;
    }
    .brand-logo { width: 48px; height: 48px; }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-image-container {
        margin-top: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Image transitions */
img {
    transition: opacity 0.3s ease;
}

/* Uniform hero image sizing (portrait and landscape) */
.hero-portrait {
    width: 520px;
    max-width: 100%;
    aspect-ratio: 1 / 1; /* square frame for consistent footprint */
    object-fit: cover;
    object-position: center;
}

@media (max-width: 992px) {
    .hero-portrait { width: 440px; }
}

@media (max-width: 576px) {
    .hero-portrait { width: 320px; }
}

/* Loading animation for images */
img[data-src] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero-section {
        padding-top: 0;
        min-height: auto;
    }
}
