/* Pinshape Flask - Base Styles */

/* CSS Variables */
:root {
    --pinshape-primary: #667eea;
    --pinshape-primary-rgb: 102, 126, 234;
    --pinshape-secondary: #764ba2;
    --pinshape-dark: #2c3e50;
    --pinshape-light: #f8f9fa;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--pinshape-light);
}

/* Navbar Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    background: linear-gradient(45deg, var(--pinshape-primary), var(--pinshape-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 16px !important; /* 16px spacing between all items */
    margin-left: 16px !important; /* 16px from left edge */
}

/* Remove default container padding */
.navbar .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.navbar-nav {
    margin-left: 0 !important;
}

.navbar-nav .nav-item {
    margin-right: 16px; /* 16px spacing between all items */
}

.navbar-nav .nav-item:last-child {
    margin-right: 16px; /* 16px margin on last item too */
}

/* Adjust navbar padding for larger logo */
.navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Ensure Join Free button is always visible */
.navbar-nav .nav-item.d-none.d-md-block {
    display: block !important;
}

@media (max-width: 767px) {
    .navbar-nav .nav-item:last-child {
        margin-right: 0;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--pinshape-primary), var(--pinshape-secondary));
    padding: 2rem 0;
    color: white;
}

/* Footer */
.footer {
    background-color: var(--pinshape-dark);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer .text-muted {
    color: #6c757d !important;
}

/* Compact Homepage Spacing */
.container.mt-5 {
    margin-top: 2rem !important;
}

/* Homepage Banner Styles */
.homepage-banner {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.banner-fallback {
    background: linear-gradient(135deg, #007bff, #6610f2);
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 100%;
}

.carousel-indicators {
    z-index: 3;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 3;
}

/* Breadcrumb Styles */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--pinshape-primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Pinshape Logo Container - JS will handle sizing */
.pinshape-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin: 0 auto;
}

/* Layout Stability & Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Image Loading Placeholders */
.item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f8f9fa;
    transition: opacity 0.3s ease;
}

.item-image[src=""] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Hero Section Skeleton */
.hero-skeleton {
    height: 400px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Banner Section Loading */
.banner-section {
    height: 400px;
    background-color: #f8f9fa;
}

.banner-section .loading-skeleton {
    height: 100%;
    border-radius: 8px;
}

/* Content Section Spacing */
.section-compact {
    padding: 2rem 0;
    min-height: 300px;
}

/* Card Loading States */
.card-loading {
    height: 100%;
    min-height: 300px;
}

.card-loading .card-img-top {
    height: 200px;
    background: #f0f0f0;
}

.card-loading .card-body {
    padding: 1rem;
}

.card-loading .skeleton-title {
    height: 20px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    width: 80%;
}

.card-loading .skeleton-text {
    height: 14px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.card-loading .skeleton-text:nth-child(2) { width: 100%; }
.card-loading .skeleton-text:nth-child(3) { width: 60%; }

/* Prevent cumulative layout shift */
.container {
    contain: layout style;
}

.card {
    contain: layout style;
}

/* Logo Loading */
.navbar-brand img {
    height: 40px;
    width: auto;
    min-width: 120px;
    background-color: #f8f9fa;
}

/* Browse Sentence Dropdown */
.browse-sentence {
    position: relative;
}

.sentence-dropdown {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    padding: 0 12px 0 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--pinshape-primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23667eea' viewBox='0 0 16 16'%3e%3cpath d='M8 11L3 6h10l-5 5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: calc(100% - 1px) center;
    background-size: 8px;
}

.sentence-dropdown:focus {
    outline: none;
    text-decoration-color: var(--pinshape-secondary);
}

.sentence-dropdown:hover {
    text-decoration-color: var(--pinshape-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 1rem 0;
    }
    
    .homepage-banner, .hero-skeleton {
        height: 250px;
        margin-bottom: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
        margin-right: 8px !important;
        margin-left: 8px !important;
    }
    
    .navbar-nav .nav-item {
        margin-right: 8px;
    }
    
    .navbar-nav .nav-item:last-child {
        margin-right: 8px;
    }
    
    .item-image {
        height: 150px;
    }
    
    .section-compact {
        padding: 1.5rem 0;
        min-height: 250px;
    }
} 