/* Fix for dropdown overflow in applications table */
.table-responsive {
    overflow: visible !important;
}
td {
    overflow: visible;
    position: relative;
}
/* Syntex Solutions - Custom CSS */

:root {
    /* Brand Colors inspired by logo */
    --primary-color: #1e5799;
    --secondary-color: #f39c12;
    --accent-color: #2c8fbd;
    --warning-color: #f39c12;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    
    /* Additional Colors */
    --primary-light: #3498db;
    --primary-dark: #1a252f;
    --secondary-light: #f1c40f;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #bdc3c7;
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%);
    --secondary-gradient: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 76px; /* Account for fixed navbar */
}

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

/* Bootstrap Color Overrides */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.btn-primary { 
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.text-warning { color: var(--warning-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: white;
}
.btn-warning:hover {
    background-color: var(--secondary-light);
    border-color: var(--secondary-light);
    color: white;
}

/* Navigation Styles */
.navbar {
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

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

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.4s both;
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.service-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    transition: transform 0.3s ease;
}
.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* Portfolio Grid - Legacy class for backwards compatibility */
.portfolio-item {
    position: relative;
}

/* Blog Cards */
.blog-card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.blog-card:hover {
    transform: translateY(-5px);
}

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

.blog-category {
    background: var(--secondary-gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
}

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

.btn-gradient:hover {
    background: var(--secondary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Section Styles */
.section-title {
    position: relative;
    margin-bottom: 3rem;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Stats Section */
.stats-section {
    background: var(--primary-gradient);
    color: white;
    padding: 4rem 0;
}

.stat-item {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--warning-color);
    display: block;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(30, 87, 153, 0.25);
}

/* Footer */
.bg-darker {
    background-color: #1a1a1a !important;
}

.footer-brand img {
    filter: brightness(0) invert(1);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--warning-color);
    transform: translateY(-3px);
}

/* Footer Links Styling */
footer a.text-light-emphasis {
    color: #b8b8b8 !important;
    transition: color 0.3s ease;
}

footer a.text-light-emphasis:hover {
    color: var(--warning-color) !important;
}

footer .text-light-emphasis {
    color: #b8b8b8 !important;
}

/* Newsletter Form */
.newsletter-form .form-control {
    border-radius: 25px;
    border: 2px solid #495057;
}

.newsletter-form .btn {
    border-radius: 25px;
    min-width: 120px;
}

/* ========================================
   COMPREHENSIVE RESPONSIVE DESIGN
   ======================================== */

/* Base Responsive Fixes for All Devices */
img {
    max-width: 100%;
    height: auto;
}

.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* Prevent horizontal scroll on mobile */
body {
    overflow-x: hidden;
}

/* Touch-friendly buttons and links */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-link,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ========================================
   TABLET DEVICES (768px - 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .hero-section {
        min-height: 80vh;
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .portfolio-overlay {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.8rem;
    }
}

/* ========================================
   MOBILE LANDSCAPE & SMALL TABLETS (768px)
   ======================================== */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
        margin-top: 0;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0 !important;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    /* Navigation - removed conflicting max-height rule, now handled by .navbar-logo class */
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
    
    .nav-link.active::after {
        display: none;
    }
    
    /* Sections */
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title::after {
        width: 60px;
    }
    
    /* Cards */
    .service-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Stats */
    .stat-item {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    /* Portfolio */
    .portfolio-overlay {
        padding: 1rem;
    }
    
    .portfolio-overlay h5 {
        font-size: 1.1rem;
    }
    
    .portfolio-overlay p {
        font-size: 0.9rem;
    }
    
    /* Blog Cards */
    .blog-card {
        margin-bottom: 1.5rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    /* Footer */
    .footer-brand {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .newsletter-form .form-control,
    .newsletter-form .btn {
        width: 100%;
        margin: 0 !important;
    }
    
    /* Tables */
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table td,
    .table th {
        padding: 0.5rem;
    }
}

/* ========================================
   MOBILE PORTRAIT (576px - 767px)
   ======================================== */
@media (max-width: 576px) {
    body {
        font-size: 14px;
        padding-top: 60px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
    
    /* Sections */
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 2rem 0 !important;
    }
    
    /* Cards */
    .service-card {
        padding: 1.25rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 1.5rem 1rem;
    }
    
    .form-control {
        font-size: 14px;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Portfolio Filter */
    .portfolio-filter .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ========================================
   EXTRA SMALL DEVICES (< 400px)
   iPhone SE, Small Androids
   ======================================== */
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title h2 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
}

/* ========================================
   LARGE SCREENS (1200px+)
   Desktop & Large Monitors
   ======================================== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.35rem;
    }
}

/* ========================================
   EXTRA LARGE SCREENS (1400px+)
   ======================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ========================================
   BROWSER-SPECIFIC FIXES
   ======================================== */

/* Safari iOS - Fix viewport issues */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        min-height: -webkit-fill-available;
    }
    
    /* Fix iOS input zoom */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Firefox - Smooth scrolling */
@-moz-document url-prefix() {
    html {
        scroll-behavior: smooth;
    }
}

/* Edge - Fix flexbox issues */
@supports (-ms-ime-align: auto) {
    .hero-buttons {
        display: -ms-flexbox;
    }
}

/* ========================================
   ORIENTATION SPECIFIC
   ======================================== */

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

/* ========================================
   HIGH DPI DISPLAYS (Retina)
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .navbar-brand img,
    .footer-brand img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========================================
   ACCESSIBILITY & TOUCH IMPROVEMENTS
   ======================================== */

/* Larger tap targets for mobile */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    .form-control,
    .card {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    /* Prevent text selection on buttons */
    .btn {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Smooth scrolling on iOS */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================
   ADMIN PANEL RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .admin-sidebar.show {
        left: 0;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Portfolio Filter */
.portfolio-filter {
    margin-bottom: 3rem;
    text-align: center;
}

.portfolio-filter .btn {
    margin: 0.25rem;
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.portfolio-filter .btn.active,
.portfolio-filter .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Portfolio Card Styles */
.portfolio-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
}

.portfolio-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f7fa;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    aspect-ratio: 16 / 9;
}

.portfolio-image-container::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.portfolio-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
    z-index: 1;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: rgba(30, 87, 153, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay,
.portfolio-card:focus-within .portfolio-overlay {
    opacity: 1;
}

.portfolio-card .card-body {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.overlay-buttons .btn {
    margin: 0.25rem;
}

.feature-box {
    padding: 2rem 1rem;
}

.feature-icon i {
    color: var(--primary-color);
}

.technologies .badge {
    font-size: 0.8rem;
}

/* Testimonials */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    border-left: 5px solid var(--primary-color);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
}

.testimonial-card p {
    padding-top: 2.5rem;
    margin-bottom: 0;
}

.testimonial-author {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.back-to-top.show {
    display: flex;
}

/* Admin Panel Styles */
.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    padding: 2rem 0;
}

.admin-nav a {
    color: #bdc3c7;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    display: block;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: white;
    background: rgba(255,255,255,0.1);
    border-left-color: var(--warning-color);
}

.admin-main {
    padding: 2rem;
    min-height: 100vh;
    background: #f8f9fa;
}

/* Desktop Logo Sizing - Remove reliance on inline sizing; prefer class-based sizing */
.navbar-brand .navbar-logo {
    height: 120px; /* desktop default (same as current) */
    width: auto;
    margin-top: -20px;
    margin-bottom: -20px;
    transition: height .18s ease;
}

/* Mobile: enlarge logo visually (override other rules) without increasing navbar height */
@media (max-width: 768px) {
    .navbar-brand .navbar-logo {
        height: 72px !important;    /* increased from 64px for better visibility */
        max-height: none !important;
        margin-top: -10px !important;
        margin-bottom: -10px !important;
    }

    /* make sure navbar text keeps its alignment */
    .navbar-brand .text-primary {
        line-height: 1;
        transform: translateY(0); /* prevent accidental vertical shift */
    }

    /* If there's a Bootstrap rule shrinking navbar-brand img, ensure we override it */
    .navbar-brand img, .navbar-brand .navbar-logo {
        max-height: none !important;
        height: auto; /* allow explicit height above to take effect */
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .back-to-top {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
