<style>
     
             /* --- RESET & BASE STYLES --- */
        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: 'Inter', sans-serif;
            background-color: #f7f9fc; /* A very light, modern gray-blue background */
            color: #333;
        }

        /* --- HEADER STYLES --- */
        header {
            background: #fff;
          
            text-align: center;
            box-shadow: 0 1px 3px rgba(0,0,0,0);
            margin-bottom: 0rem;
        }

        h1.page-title {
            margin: 0;
            font-size: 2.5rem;
            font-weight: 800;
            color: #1a202c;
        }

        p.subtitle {
            color: #718096;
            margin-top: 0.5rem;
        }

        /* --- PORTFOLIO GRID --- */
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px 50px 20px;
        }

        .grid {
            display: grid;
            /* This creates a responsive grid that automatically fits 3 columns on desktop */
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 2rem;
        }

        /* --- PROJECT CARD STYLES --- */
        .card {
            background: #fff;
            border-radius: 12px;
            overflow: hidden; /* Ensures image stays inside rounded corners */
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 15px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            cursor: pointer;
        }

        /* Hover effect: lift up and deepen shadow */
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
        }

        .card-image-wrapper {
            height: 240px; /* Fixed height forces uniformity */
            width: 100%;
            background-color: #e2e8f0;
        }

        .card-image-wrapper img {
            width: 100%;
            height: 100%;
            /* THIS IS KEY: 'cover' crops the image to fill the space perfectly without stretching */
            object-fit: cover; 
        }
     
       .card-image-wrapper img {
          aspect-ratio: 16 / 9; /* Modern browsers support this */
          object-fit: cover;    /* Ensures the image covers the box without stretching */
          width: 100%;
      }

        .card-content {
            padding: 1.5rem;
        }

        /* Little colored tags for categories */
        .tag {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 50px;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            margin-bottom: 1rem;
        }

        /* Different colors for different tags */
        .tag.branding { background-color: #ebf8ff; color: #2c5282; }
        .tag.web { background-color: #f0fff4; color: #22543d; }
        .tag.hardware { background-color: #fff5f5; color: #742a2a; }
        .tag.event { background-color: #faf5ff; color: #44337a; }

        .card-title {
            font-size: 1.25rem;
            font-weight: 700;
            margin: 0;
            color: #2d3748;
        }
         .card-text {
              font-size: 0.95rem;     /* Slightly smaller than normal text */
              color: #666;            /* Dark gray instead of black */
              margin-top: 10px;       /* Space between title and text */
              line-height: 1.5;       /* Makes it easy to read */
          }
     /* Ensure the image link behaves like a block */
        a.card-img-link {
            display: block;
            text-decoration: none;
            color: inherit;
        }

        /* Ensure the title link inherits the dark color and font size */
        h2.card-title a {
            text-decoration: none;
            color: inherit; /* Keeps it dark gray/black */
            transition: color 0.3s ease;
        }

        /* Optional: Change color when hovering over the text */
        h2.card-title a:hover {
            color: #1565c0; /* Hubnet Blue */
        }
     
             /* A specific color for Desktop/Software projects */
        .tag.software { 
            background-color: #f3e8ff; /* Light Purple background */
            color: #6b21a8;            /* Dark Purple text */
        }
        
        img {
            /* Hjälper webbläsaren att förminska snyggt */
            transform: translateZ(0); 
            backface-visibility: hidden;
        }

        /* Container for the grid */
        .service-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 0rem;
            margin-top: 0rem;
        }

        /* Specific Tag Colors */
        .tag.design { background-color: #fff3cd; color: #856404; } /* Yellow/Gold */
        .tag.web { background-color: #d4edda; color: #155724; }    /* Green */
        .tag.hardware { background-color: #f8d7da; color: #721c24; } /* Red */     
     
    
    </style>
  
    <style type="text/css">
        body {
            padding-top: 0px;
        }

        /* Custom link colors */
        a, a:hover, a:focus {
            color: #523a76;
        }
            a:hover, a:focus {
                color: #000;
            }

        #main {
            margin-top: 0px;
        }
        /**
         * Har genererat custom CSS för Bootstrap 3 navbar från nedanstående adress:
         * https://twitterbootstrap3navbars.w3masters.nl/
         */
        .navbar-custom {
          background-color: #523a76;
          border-color: #432f60;
        }
        .navbar-custom .navbar-brand {
          color: #cdbfe3;
        }
        .navbar-custom .navbar-brand:hover,
        .navbar-custom .navbar-brand:focus {
          color: #b19cd3;
          background-color: transparent;
        }
        .navbar-custom .navbar-text {
          color: #cdbfe3;
        }
        .navbar-custom .navbar-nav > li > a {
          color: #cdbfe3;
        }
        .navbar-custom .navbar-nav > li > a:hover,
        .navbar-custom .navbar-nav > li > a:focus {
          color: #ffffff;
          background-color: transparent;
        }
        .navbar-custom .navbar-nav > .active > a,
        .navbar-custom .navbar-nav > .active > a:hover,
        .navbar-custom .navbar-nav > .active > a:focus {
          color: #ffffff;
          background-color: #432f60;
        }
        .navbar-custom .navbar-nav > .disabled > a,
        .navbar-custom .navbar-nav > .disabled > a:hover,
        .navbar-custom .navbar-nav > .disabled > a:focus {
          color: #cccccc;
          background-color: transparent;
        }
        .navbar-custom .navbar-toggle {
          border-color: #dddddd;
        }
        .navbar-custom .navbar-toggle:hover,
        .navbar-custom .navbar-toggle:focus {
          background-color: #dddddd;
        }
        .navbar-custom .navbar-toggle .icon-bar {
          background-color: #cccccc;
        }
        .navbar-custom .navbar-collapse,
        .navbar-custom .navbar-form {
          border-color: #412e5e;
        }
        .navbar-custom .navbar-nav > .dropdown > a:hover .caret,
        .navbar-custom .navbar-nav > .dropdown > a:focus .caret {
          border-top-color: #ffffff;
          border-bottom-color: #ffffff;
        }
        .navbar-custom .navbar-nav > .open > a,
        .navbar-custom .navbar-nav > .open > a:hover,
        .navbar-custom .navbar-nav > .open > a:focus {
          background-color: #432f60;
          color: #ffffff;
        }
        .navbar-custom .navbar-nav > .open > a .caret,
        .navbar-custom .navbar-nav > .open > a:hover .caret,
        .navbar-custom .navbar-nav > .open > a:focus .caret {
          border-top-color: #ffffff;
          border-bottom-color: #ffffff;
        }
        .navbar-custom .navbar-nav > .dropdown > a .caret {
          border-top-color: #cdbfe3;
          border-bottom-color: #cdbfe3;
        }
        @media (max-width: 767) {
          .navbar-custom .navbar-nav .open .dropdown-menu > li > a {
            color: #cdbfe3;
          }
          .navbar-custom .navbar-nav .open .dropdown-menu > li > a:hover,
          .navbar-custom .navbar-nav .open .dropdown-menu > li > a:focus {
            color: #ffffff;
            background-color: transparent;
          }
          .navbar-custom .navbar-nav .open .dropdown-menu > .active > a,
          .navbar-custom .navbar-nav .open .dropdown-menu > .active > a:hover,
          .navbar-custom .navbar-nav .open .dropdown-menu > .active > a:focus {
            color: #ffffff;
            background-color: #432f60;
          }
          .navbar-custom .navbar-nav .open .dropdown-menu > .disabled > a,
          .navbar-custom .navbar-nav .open .dropdown-menu > .disabled > a:hover,
          .navbar-custom .navbar-nav .open .dropdown-menu > .disabled > a:focus {
            color: #cccccc;
            background-color: transparent;
          }
        }
        .navbar-custom .navbar-link {
          color: #cdbfe3;
        }
        .navbar-custom .navbar-link:hover {
          color: #ffffff;
        }
        /* ----------------------------------------------------------------------------------- */
        .hideMe {
            display: none;
        }
        #cat {
            margin-top: 0px;
        }
        #advSearchBox {
            margin-top: 7px;
            margin-bottom: 7px;
        }
        #searchResult .page-header {
            margin-top: 1px;
        }

        /* Custom pointer style for input group addon */
        .input-group-addon {
            cursor: pointer;
        }

        /* Badge color */
        .badge.badge-purple {
            background-color: #523A76;
        }

        /* Paging */
        .pagination>.active>a, .pagination>.active>span, 
        .pagination>.active>a:hover, .pagination>.active>span:hover, 
        .pagination>.active>a:focus, .pagination>.active>span:focus {
            background-color: #523a76;
            border-color: #523a76;
        }
        .pagination > li > a {
            color: #523a76;
        }

        .media-striped li:nth-child(even) {
            background-color: #eeeeee;
        }
        
        #header .logo {
			float: left;
			width: 400px;
			height: 46px;
			text-indent: -9999px;
			margin: 30px 0 0;
			overflow: hidden;
			background: url(loggahubnetvit.png) no-repeat;
		}
		
		.eventful-badge,
        .eventful-badge * {
          margin: 0             !important;
          padding: 0            !important;
          border: 0             !important;
          text-align: center    !important;
          color: #CCC           !important;
          font-family: Arial    !important;
          text-decoration: none !important;
        }
        
        .eventful-large {
          position: relative    !important;
          width: 140px          !important;
          font-size: 15px       !important;
          line-height: 17px     !important;
          font-weight: bold     !important;
        }
        
        .eventful-medium {
          position: relative    !important;
          width: 100px          !important;
          font-size: 12px       !important;
          line-height: 13px     !important;
        }                     
                              
        .eventful-small {     
          position: relative    !important;
          width: 100px          !important;
          font-size: 11px       !important;
          line-height: 11px     !important;
        }
        
    </style>
  
/* Fix for the Hero Image */
.event-hero {
    width: 100%;
    margin-bottom: 20px;
}

.hero-img {
    width: 100% !important; /* Forces it to fill the col-sm-8 width */
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Fix for the Related Grid */
.related-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allows them to wrap on mobile */
}

.event-card {
    flex: 1;
    min-width: 200px; /* Ensures they don't get too skinny */
    text-decoration: none;
    color: inherit;
}

.card-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
}

.separator {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 30px 0;
}

/* Ensure the event container takes up the full width of its parent column */
.event-container {
    width: 100%;
    clear: both; /* Prevents floated elements from messing with the layout */
    text-align: left; /* Forces left alignment for everything inside */
}

/* Fix the separator position */
.separator {
    width: 100%;
    border: 0;
    border-top: 1px solid #ddd;
    margin: 40px 0 20px 0;
    clear: both; 
    display: block;
}

/* Force "Fler evenemang i" to be left-aligned */
.related-title {
    text-align: left !important;
    display: block;
    width: 100%;
    margin-bottom: 20px;
    clear: both;
}

/* Keep the related grid left-aligned on large screens */
.related-grid {
    display: flex;
    justify-content: flex-start; /* Ensures items start from the left */
    gap: 20px;
    flex-wrap: wrap;
}

/* Container for the whole result set */
.event-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Individual Card Styling */
.event-list-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.event-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-image-box {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-body-box {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-heading {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #007bff;
    font-weight: bold;
    height: 2.4em; /* Ensures titles align even if one is longer */
    overflow: hidden;
}

.card-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    gap: 10px;
}

.btn-primary, .btn-secondary, .btn-next-prev {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    text-align: center;
    flex: 1;
}

.btn-next-prev {
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1.2rem;
    text-align: center;
    flex: 1;
}

.btn-primary, .btn-next-prev, .btn-next-prev { background: #007bff; color: white; }
.btn-secondary { background: #f8f9fa; color: #333; border: 1px solid #ddd; }

/* This ensures the image box stays the same size for every card */
.card-image-box {
    width: 100%;
    height: 180px; /* Adjust height to your preference */
    overflow: hidden;
    background-color: #f0f0f0; /* Gray fallback if image fails to load */
}

/* This forces the image to fill the box without stretching */
.card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; /* Crops the image to fit perfectly */
    display: block;
}

.page-header .btn-primary, .btn-next-prev {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 10px;
}

.page-header .btn-primary:hover {
    background-color: #0056b3;
}

/* --- UPDATED HERO SECTION: LEFT ALIGNED & ROUNDED --- */

.event-hero-container {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: flex-start; /* Aligns content to the left */
    background-color: transparent;
}

.hero-full-img {
    /* Fixed width: set to 400px (bigger) but responsive on small screens */
    width: 400px !important; 
    height: 250px !important; /* Fixed height for uniformity */
    
    border-radius: 25px; /* Pronounced rounded corners */
    object-fit: cover;   /* Ensures image fills the 400x250 area without stretching */
    display: block;
    margin-left: 0;      /* Ensures no auto-centering */
    
    /* Adds a modern shadow to make the rounded edges pop */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); 
    transition: transform 0.3s ease;
}

.hero-full-img:hover {
    transform: scale(1.02); /* Slight lift on hover */
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .event-hero-container {
        justify-content: center; /* Center on mobile for better balance */
    }
    .hero-full-img {
        width: 90% !important; /* Take up most of the screen on phones */
        height: auto !important; 
    }
}

.btn-reset {
    margin-top: 5px;
    margin-bottom: 0x; /* Optional: adds space below it too */
}