/* Page Specific Styles */

/* CSS Custom Properties for Consistency */
:root {
    --primary-color: #0066FF;
    --secondary-color: #3399FF;
    --background-color: #F0F8FF;
    --text-color: #003366;
    --border-color: #66B3FF;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --shadow-light: 0 2px 10px rgba(102, 179, 255, 0.2);
    --shadow-medium: 0 4px 20px rgba(102, 179, 255, 0.3);
    --shadow-heavy: 0 8px 25px rgba(102, 179, 255, 0.4);
}

/* Hero Section */
.hostel-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    background: var(--gradient);
    background-image: url('https://images.unsplash.com/photo-1541829070764-84a7d30dd3f3?w=1920&h=1080&fit=crop&crop=center');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 70px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.85) 0%, rgba(0, 51, 102, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-item span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Blog Container */
.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.blog-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    width: 100%;
}

/* Blog Header */
.blog-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
}

.breadcrumb {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    color: #7C6B5A;
    font-size: 0.9rem;
}

.blog-meta > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-meta i {
    color: var(--secondary-color);
}

/* Table of Contents */
.table-of-contents {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.table-of-contents h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.25rem 0;
    display: block;
    transition: color 0.2s;
}

.table-of-contents a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Blog Sections */
.blog-intro {
    margin-bottom: 3rem;
}

.lead-paragraph {
    font-size: 1.2rem;
    color: var(--text-color);
    line-height: 1.7;
    font-weight: 400;
}

/* Quick Stats Section */
.quick-stats-section {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.quick-stats-section h3 {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quick-stats-section i {
    color: var(--secondary-color);
}

/* Desktop: Horizontal layout for Quick Stats */
.stats-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stats-container .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    min-width: 140px;
    transition: all 0.3s ease;
}

.stats-container .stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header i {
    color: var(--secondary-color);
}

.section-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Content with Images */
.content-with-image {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
    min-height: 300px;
}

.left-image {
    grid-template-columns: 350px 1fr;
}

.right-image {
    grid-template-columns: 1fr 350px;
}

.image-container {
    position: relative;
    min-height: 250px;
}

.blog-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
    transition: transform 0.3s ease;
    border: 3px solid var(--border-color);
}

.blog-image:hover {
    transform: scale(1.02);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(62, 44, 35, 0.85));
    color: white;
    padding: 1rem;
    border-radius: 0 0 12px 12px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.text-content {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.text-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.text-content p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.7;
}

/* Feature Highlights */
.feature-highlights {
    background: var(--background-color);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.feature-highlights h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #7C6B5A;
}

.feature-list i {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, var(--background-color), #FFF8E6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.info-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    color: #7C6B5A;
    font-size: 0.9rem;
}

.info-item strong {
    color: var(--text-color);
}

/* Mess Schedule */
.mess-schedule {
    background: var(--background-color);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.mess-schedule h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.schedule-item {
    color: #7C6B5A;
    font-size: 0.9rem;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.schedule-item strong {
    color: var(--text-color);
}

/* Facilities Grid */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.facility-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.facility-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--secondary-color);
}

.facility-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.facility-icon i {
    font-size: 1.5rem;
    color: white;
}

.facility-card h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.facility-card p {
    color: #7C6B5A;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Tips Container */
.tips-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tip-category {
    background: var(--background-color);
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--secondary-color);
}

.tip-category h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tip-category i {
    color: var(--primary-color);
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    color: #7C6B5A;
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
}

.tips-list li::before {
    content: "•";
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Call to Action */
.cta-section {
    background: var(--gradient);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    color: white;
    margin: 3rem 0;
}

.cta-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: #A8683F;
}

.btn-primary:hover {
    background: #F9F5F0;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #A8683F;
    transform: translateY(-2px);
}

/* Sidebar - REMOVED (No longer needed) */

/* Responsive Design */
/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .blog-container {
        max-width: 1400px;
        padding: 4rem 3rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .facilities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-container {
        gap: 3rem;
    }
    
    .stats-container .stat-item {
        min-width: 160px;
        padding: 2rem;
    }
}

/* Desktop (1200px-1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .blog-container {
        max-width: 1200px;
        padding: 3rem 2rem;
    }
    
    .content-with-image.left-image,
    .content-with-image.right-image {
        grid-template-columns: 350px 1fr;
    }
    
    .content-with-image.right-image {
        grid-template-columns: 1fr 350px;
    }
}

/* Tablet Large (1024px-1199px) */
@media (max-width: 1199px) and (min-width: 1024px) {
    .blog-container {
        padding: 3rem 1.5rem;
    }
    
    .content-with-image.left-image,
    .content-with-image.right-image {
        grid-template-columns: 320px 1fr;
    }
    
    .content-with-image.right-image {
        grid-template-columns: 1fr 320px;
    }
    
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tips-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet (768px-1023px) */
@media (max-width: 1023px) {
    .blog-container {
        padding: 2.5rem 1.5rem;
    }
    
    .content-with-image.left-image,
    .content-with-image.right-image {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .image-container {
        order: -1;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tips-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Mobile: Vertical layout for Quick Stats */
    .stats-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-container .stat-item {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Mobile Large (481px-767px) */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
    
    .blog-container {
        padding: 2rem 1rem;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-meta {
        gap: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-with-image.left-image,
    .content-with-image.right-image {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .image-container {
        order: -1;
    }
    
    .facilities-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tips-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Mobile: Vertical layout for Quick Stats */
    .stats-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stats-container .stat-item {
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
        padding: 1.25rem;
    }
    
    .quick-stats-section {
        padding: 1.5rem;
    }
    
    .quick-stats-section h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
}

/* Mobile Small (320px-480px) */
@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        flex-direction: row;
        gap: 1rem;
        justify-content: center;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .cta-content h3 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .facility-card {
        padding: 1.5rem;
    }
    
    .tip-category {
        padding: 1rem;
    }
    
    /* Extra small mobile: Stack Quick Stats vertically */
    .stats-container .stat-item {
        max-width: 200px;
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .quick-stats-section {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .quick-stats-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
}

/* Desktop Performance Optimizations */
@media (min-width: 1024px) {
    .blog-image {
        will-change: transform;
    }
    
    .facility-card {
        will-change: transform, box-shadow;
    }
    
    .stats-container .stat-item {
        will-change: transform, box-shadow;
    }
    
    /* Prevent layout shifts */
    .blog-container {
        contain: layout style;
    }
    
    .blog-content {
        contain: layout;
    }
    
    /* GPU acceleration for animations */
    .facility-card,
    .tip-category,
    .stats-container .stat-item {
        transform: translateZ(0);
        backface-visibility: hidden;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Animation for cards on scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.facility-card,
.tip-category {
    animation: fadeInUp 0.6s ease-out;
}

/* Hostel Carousel Styles */
.hostel-carousel {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background: white;
    transform: scale(1.1);
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .hostel-carousel {
        height: 300px;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .prev-btn {
        left: 10px;
    }
    
    .next-btn {
        right: 10px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hostel-carousel {
        height: 250px;
    }
    
    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
}

/* Responsive navbar margin adjustments for smaller screens */
@media (max-width: 768px) {
    .hostel-hero {
        margin-top: 65px; /* Reduced from 70px to match smaller navbar */
    }
}

@media (max-width: 640px) {
    .hostel-hero {
        margin-top: 62px; /* Further reduced for medium-small screens */
    }
}

@media (max-width: 480px) {
    .hostel-hero {
        margin-top: 58px; /* Most compact for very small screens */
    }
}
