/* Custom CSS for StudentPortal Landing Page */

:root {
    --primary-color: #4f46e5;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f8f9fa;
    --text-muted: #6b7280;
    --border-radius: 12px;
    --box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

/* Mobile-first: prevent horizontal scrolling on all devices by default */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Increased offset for better section visibility */
}

body {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--dark-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Enhanced dropdown styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    margin: 0 0.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

/* Smooth scroll offset for all sections */
section[id] {
    scroll-margin-top: 100px; /* Modern way to handle scroll offset */
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    position: relative;
    text-decoration: none;
    transition: var(--transition);
}

.navbar-brand:hover {
    color: var(--secondary-color) !important;
    transform: scale(1.05);
}

/* Beta label styling */
.beta-label {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 8px;
    margin-left: 8px;
    vertical-align: top;
    position: relative;
    top: -2px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    animation: pulse-beta 2s infinite;
}

@keyframes pulse-beta {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: white;
    position: relative;
    overflow: hidden;
    padding-top: 120px; /* Add padding to account for fixed navbar */
    padding-bottom: 80px; /* Add bottom padding for wave */
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(79, 70, 229, 0.8);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-content {
    animation: fadeInUp 1s ease;
}

.hero-stats .stat-item {
    text-align: center;
    padding: 1rem;
}

.hero-stats h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-buttons .btn {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.hero-image {
    animation: fadeInRight 1s ease 0.3s both;
}

.image-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
    transform: rotateY(180deg);
}

/* Features Section */
#features {
    position: relative;
    z-index: 4;
    margin-top: 60px;
    padding-top: 5rem !important;
    background: #f8f9fa !important;
}

.feature-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
}

.feature-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* Storage Section */
.storage-content {
    padding: 2rem 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.storage-example {
    border-left: 4px solid var(--primary-color);
}

.example-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

/* Privacy Section */
.privacy-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.privacy-item i {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.privacy-item h5 {
    margin-bottom: 0.5rem;
}

.privacy-item p {
    opacity: 0.9;
    margin-bottom: 0;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    padding: 12px 24px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3730a3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

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

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

.btn-lg {
    padding: 15px 35px;
    font-size: 1.1rem;
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    height: 100%;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.testimonial-content {
    text-align: center;
}

.testimonial-content .stars {
    font-size: 1.2rem;
}

.testimonial-content p {
    font-style: italic;
    color: var(--text-muted);
    line-height: 1.6;
}

.testimonial-author h6 {
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.testimonial-author small {
    color: var(--primary-color);
    font-weight: 500;
}

/* Pricing Section */
.pricing-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: linear-gradient(135deg, var(--primary-color), #6366f1);
    color: white;
    padding: 8px 40px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transform: rotate(45deg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pricing-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.pricing-price {
    margin: 1rem 0;
}

.pricing-body ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.pricing-body ul li:last-child {
    border-bottom: none;
}

.pricing-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.02);
}

/* About Section */
.about-item {
    display: flex;
    align-items: flex-start;
}

.about-item i {
    font-size: 1.5rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.about-item h5 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.about-item p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 0;
}

.about-stats .stat-item {
    padding: 1rem;
}

.about-stats h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.about-image .image-placeholder {
    background: rgba(79, 70, 229, 0.1);
    border: 2px dashed var(--primary-color);
    color: var(--primary-color);
}

/* General Section Spacing */
section {
    position: relative;
    z-index: 2;
}

/* Ensure sections don't overlap */
section:not(.hero-section) {
    position: relative;
    z-index: 4;
    background: white;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: lightboxSlideIn 0.3s ease;
}

@keyframes lightboxSlideIn {
    from {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

#lightbox-image {
    max-width: 100%;
    height: auto;
    display: block;
    max-height: 70vh;
    object-fit: contain;
}

.lightbox-caption {
    padding: 20px;
    background: white;
    color: var(--dark-color);
}

.lightbox-caption h5 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.lightbox-caption p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-nav-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: auto;
}

.lightbox-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.lightbox-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-nav-btn:disabled:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: none;
}

/* Howto image hover effect */
.howto-image {
    transition: var(--transition);
    cursor: pointer;
}

.howto-image:hover {
    transform: scale(1.02);
}

.howto-image:hover img {
    filter: brightness(1.1);
}

/* Navbar CTA Button */
.navbar .btn-success {
    background: linear-gradient(135deg, var(--secondary-color), #0ea5e9);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.navbar .btn-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
}

.navbar .btn-success:hover::before {
    left: 100%;
}

.navbar .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #0ea5e9, var(--secondary-color));
}

.navbar .btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Prevent horizontal scrolling on mobile devices */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    /* Navbar mobile improvements */
    .navbar {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
    
    /* Ensure the main container doesn't overflow */
    .container, .container-fluid {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Constrain all rows and columns */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }
    
    .col, [class*="col-"] {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
    }
    
    .hero-section {
        padding: 100px 0 80px; /* Increased top padding for mobile to account for fixed navbar, added bottom padding */
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-stats h3 {
        font-size: 2rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .image-placeholder {
        padding: 2rem 1rem;
    }
    
    .image-placeholder i {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    /* Ensure no horizontal scrolling on small mobile devices */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        position: relative;
    }
    
    /* Ensure all images are responsive on mobile */
    img {
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* Prevent any element from overflowing */
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Force containers to stay within viewport */
    .container, .container-fluid {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* Ensure rows don't overflow */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
    }
    
    /* Fix any potential Bootstrap column issues */
    .col, [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
    
    /* Specific fixes for potentially problematic elements */
    .hero-wave svg {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .navbar-brand {
        max-width: calc(100vw - 100px) !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    
    /* Ensure buttons don't overflow */
    .btn {
        max-width: 100% !important;
        word-wrap: break-word !important;
        white-space: normal !important;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .hero-stats .row > div {
        margin-bottom: 1rem;
    }
    
    .benefit-item,
    .privacy-item,
    .about-item {
        flex-direction: column;
        text-align: center;
    }
    
    .benefit-item i,
    .privacy-item i,
    .about-item i {
        margin-bottom: 1rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3730a3;
}
