/* ============================================
   ERAND TECH - COMPLETE STYLESHEET
   Dark Red Theme
   ============================================ */

/* ============================================
   1. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f7f3f0;
    color: #1e0e0b;
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================
   2. HEADER
   ============================================ */
.header {
    background: #3d0f0a;
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    color: #e6b17e;
}

.admin-badge {
    background: #5e1a13;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e6b17e;
}

.admin-badge i {
    color: #e6b17e;
}

.admin-toggle {
    background: #5e1a13;
    color: #fff;
    border: 1px solid #e6b17e;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    transition: 0.2s;
    display: inline-block;
}

.admin-toggle:hover {
    background: #7f2b22;
    transform: translateY(-2px);
}

.flex {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   3. SECTIONS
   ============================================ */
section {
    padding: 4rem 0;
    border-bottom: 1px solid #e1d3cd;
}

section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #3d0f0a;
}

.section-title i {
    color: #a34534;
    font-size: 1.8rem;
}

/* ============================================
   4. HERO SLIDER
   ============================================ */
.hero-section {
    padding: 0;
    border-bottom: none;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    height: 80vh;
    min-height: 450px;
    max-height: 700px;
    background: #2f0b07;
}

.hero-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    width: 90%;
    max-width: 800px;
    z-index: 2;
    padding: 2rem;
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.hero-btn-primary {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background: #e6b17e;
    color: #3d0f0a;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    border: 2px solid transparent;
}

.hero-btn-primary:hover {
    background: transparent;
    color: #e6b17e;
    border-color: #e6b17e;
    transform: scale(1.05);
}

.slide-counter {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.7;
    letter-spacing: 1px;
}

.hero-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.hero-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-btn:hover {
    background: #e6b17e;
    color: #3d0f0a;
    border-color: #e6b17e;
    transform: scale(1.1);
}

.hero-dots {
    position: absolute;
    bottom: 6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.8rem;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: 0.3s;
    border: none;
}

.hero-dot.active {
    background: #e6b17e;
    transform: scale(1.3);
}

.hero-dot:hover {
    background: #e6b17e;
}

/* ============================================
   5. PARTNERS SLIDER
   ============================================ */
.partners-slider-wrapper {
    overflow: hidden;
    position: relative;
}

.partners-track {
    display: flex;
    gap: 3rem;
    animation: scrollPartners 25s linear infinite;
    width: max-content;
}

.partner-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.partner-item img {
    height: 50px;
    width: auto;
    filter: grayscale(0.2);
    opacity: 0.7;
    transition: 0.3s;
}

.partner-item:hover img {
    opacity: 1;
    filter: grayscale(0);
}

.partner-name {
    font-size: 0.75rem;
    color: #7a4e42;
    font-weight: 500;
}

@keyframes scrollPartners {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   6. SERVICES GRID
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 20px rgba(62, 20, 14, 0.06);
    border: 1px solid #e6d6ce;
    transition: 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(62, 20, 14, 0.12);
}

.service-card i {
    font-size: 2.8rem;
    color: #a34534;
    margin-bottom: 1rem;
}

.service-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #3d0f0a;
}

.service-card p {
    color: #5e3a30;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ============================================
   7. BLOG
   ============================================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid #e6d6ce;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(62, 20, 14, 0.1);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 2px solid #e6d6ce;
}

.blog-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-content h4 {
    font-size: 1.1rem;
    color: #3d0f0a;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-content p {
    color: #5e3a30;
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0 1rem;
    font-size: 0.8rem;
    color: #7a4e42;
    flex-wrap: wrap;
}

.blog-meta i {
    margin-right: 4px;
}

.read-more {
    color: #a34534;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
    margin-top: auto;
    padding-top: 0.5rem;
}

.read-more:hover {
    color: #5e1a13;
    gap: 1rem;
}

/* ============================================
   8. PORTFOLIO SLIDER - COMPLETELY FIXED
   ============================================ */
.portfolio-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

.portfolio-slider {
    overflow: hidden;
    margin: 0 3rem;
    position: relative;
}

.portfolio-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 1.5rem;
    will-change: transform;
    width: 100%;
}

.portfolio-item {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e6d6ce;
    aspect-ratio: 4/3;
    transition: transform 0.3s ease;
}

.portfolio-item:hover {
    transform: scale(1.02);
    z-index: 2;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(61, 15, 10, 0.9));
    color: #fff;
    transform: translateY(30%);
    transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.9;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-overlay h5 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.portfolio-overlay p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.portfolio-link {
    color: #e6b17e;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.portfolio-link:hover {
    color: #fff;
    gap: 0.8rem;
}

/* ============================================
   9. TESTIMONIALS SLIDER - COMPLETELY FIXED
   ============================================ */
.testimonial-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

.testimonial-slider {
    overflow: hidden;
    margin: 0 3rem;
    position: relative;
}

.testimonial-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 1.5rem;
    will-change: transform;
    width: 100%;
}

.testimonial-item {
    flex: 0 0 calc(33.333% - 1rem);
    min-width: calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
}

.testimonial-card {
    background: #fff;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid #e6d6ce;
    text-align: center;
    height: 100%;
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(62, 20, 14, 0.08);
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid #e6b17e;
}

.testimonial-card i.fa-quote-left {
    color: #a34534;
    font-size: 2rem;
    opacity: 0.3;
    margin-bottom: 0.5rem;
    display: block;
}

.testimonial-card p {
    font-style: italic;
    color: #1e0e0b;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex: 1;
}

.testimonial-card h5 {
    color: #3d0f0a;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.testimonial-card small {
    color: #7a4e42;
    display: block;
    margin-top: 0.2rem;
    font-size: 0.85rem;
}

.testimonial-card .rating {
    color: #f59e0b;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ============================================
   10. SLIDER CONTROLS
   ============================================ */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #3d0f0a;
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.slider-btn:hover {
    background: #5e1a13;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.portfolio-prev,
.testimonial-prev {
    left: -1rem;
}

.portfolio-next,
.testimonial-next {
    right: -1rem;
}

.portfolio-dots,
.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d6c2b8;
    cursor: pointer;
    border: none;
    transition: 0.3s ease;
}

.dot.active {
    background: #a34534;
    transform: scale(1.3);
}

.dot:hover {
    background: #a34534;
    transform: scale(1.1);
}

/* ============================================
   14. RESPONSIVE - COMPLETELY FIXED
   ============================================ */
@media (max-width: 1024px) {
    .portfolio-item {
        flex: 0 0 calc(50% - 0.75rem) !important;
        min-width: calc(50% - 0.75rem) !important;
        max-width: calc(50% - 0.75rem) !important;
    }
    
    .testimonial-item {
        flex: 0 0 calc(50% - 0.75rem) !important;
        min-width: calc(50% - 0.75rem) !important;
        max-width: calc(50% - 0.75rem) !important;
    }
    
    .slider-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .portfolio-prev,
    .testimonial-prev {
        left: -0.5rem;
    }
    
    .portfolio-next,
    .testimonial-next {
        right: -0.5rem;
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-slider {
        height: 60vh;
        min-height: 350px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .hero-controls {
        bottom: 1.5rem;
        gap: 0.8rem;
    }
    
    .hero-dots {
        bottom: 4.5rem;
        gap: 0.6rem;
    }
    
    .hero-dot {
        width: 10px;
        height: 10px;
    }
    
    .portfolio-item {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        aspect-ratio: 16/10;
    }
    
    .testimonial-item {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }
    
    .portfolio-slider,
    .testimonial-slider {
        margin: 0 0.5rem;
    }
    
    .slider-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .portfolio-prev,
    .testimonial-prev {
        left: -0.25rem;
    }
    
    .portfolio-next,
    .testimonial-next {
        right: -0.25rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-image {
        height: 150px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 2.2rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 50vh;
        min-height: 300px;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .hero-btn-primary {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .portfolio-item {
        aspect-ratio: 4/3;
    }
    
    .slider-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .section-title i {
        font-size: 1.3rem;
    }
    
    .whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 1.8rem;
        bottom: 1rem;
        right: 1rem;
    }
    
    .testimonial-card {
        padding: 1rem;
    }
    
    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }
}

/* ============================================
   11. WHATSAPP FLOAT
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #25d366;
    color: #fff;
    width: 70px;
    height: 70px;
    border-radius: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    transition: 0.3s;
    z-index: 999;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #20b85f;
}

/* ============================================
   12. FOOTER
   ============================================ */
.footer {
    background: #3d0f0a;
    color: #dcc7bd;
    padding: 2rem 0;
    text-align: center;
}

.footer .container {
    font-size: 0.95rem;
}

/* ============================================
   13. UTILITY
   ============================================ */
.text-small {
    font-size: 0.85rem;
    color: #5e3a30;
    line-height: 1.5;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }



/* ============================================
   15. PRINT STYLES
   ============================================ */
@media print {
    .header,
    .footer,
    .whatsapp-float,
    .hero-controls,
    .slider-btn,
    .hero-dots,
    .portfolio-dots,
    .testimonial-dots {
        display: none !important;
    }
    
    section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
    
    .hero-slider {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    .hero-slide {
        position: relative !important;
        padding: 2rem !important;
    }
    
    .hero-content {
        position: relative !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        padding: 1rem !important;
        color: #1e0e0b !important;
    }
    
    .hero-overlay {
        display: none !important;
    }
    
    .hero-content h2 {
        color: #3d0f0a !important;
        text-shadow: none !important;
    }
    
    .hero-content p {
        color: #1e0e0b !important;
        text-shadow: none !important;
    }
}